PDA

View Full Version : OSX broke after trying to change mach_kernel


oneshot
03-29-2009, 06:40 AM
Well I became impatient and thought that a file I had was voodoo. So I replaced my current Mach_Kernel with the file that I thought was voodoo but I guess it wasn't....

ANYWAYS now when I start up OSX86, my screen just flashes before it even goes through any of the "code" stuff and restarts....

Am I completely screwed or is there any way to fix it... =/

cmdshft
03-29-2009, 06:52 AM
Depends. What distro did you use and did it offer a option for kernel installation? If so, only install the kernel OR you could copy the kernel that boots your installation disc right to your startup disk.

Boot the DVD to the installer, then run terminal.app. It's under Utilities in the installer menubar.

cp /mach_kernel /Volumes/<startup disk name>

Example: cp /mach_kernel /Volumes/iMac

If your startup disk has a space in it's name, it's as follows:

cp /mach_kernel /Volumes/Macintosh\ HD

Also, I would suggest that when you first start terminal, you do the following:

ls /

This will show you a list of all the files in the root of the DVD filesystem. This way you know exactly the name of your kernel (some install DVD's have things like mach_kernel.voodoo as the kernel name). If the name is not mach_kernel, then just use the right name and it will most likely work and allow you to boot your system again.

oneshot
03-30-2009, 06:17 AM
Thank you for the detailed walkthrough.

I did all the steps and this is what I got?

http://i116.photobucket.com/albums/o9/joe_vinci/DSC00019.jpg

I started up my HD and its doing the same thing. Did I do something wrong?

I am very greatfull for the support so far

erick2red
03-30-2009, 01:20 PM
read carefully he says:
cp /mach_kernel /Volumes/<startup_disk_name>/
where <startup_disk_name> it's the name of the startup disk of your system.

lanceomni
03-30-2009, 04:27 PM
You may also use quotes around names with spaces.

/"Folder with space"/file.txt
Is equal to this
/Folder\ with\ space/file.txt

When you do get back up and running I would recommend making a backup copy of the kernel that works so that in the case that this happens again you can boot using the option -v mach_kernel.backup to load the original
cp -R /mach_kernel /mach_kernel.backup

oneshot
03-31-2009, 02:49 AM
@eric2red

I'm not seeing what I did wrong?

Isn't my startup disk what I named my Hardrive?

http://i116.photobucket.com/albums/o9/joe_vinci/Picture1-8-1.png

erick2red
03-31-2009, 01:13 PM
@eric2red

I'm not seeing what I did wrong?

Isn't my startup disk what I named my Hardrive?

http://i116.photobucket.com/albums/o9/joe_vinci/Picture1-8-1.png
your missing some space after "/mach_kernel" you must write

cp /mach_kernel /Volumes/OSX\ HD/
cd /Volumes/OSX\ HD/
chmod 644 mach_kernel
chown 0:0 mach_kernel

oneshot
04-01-2009, 09:16 AM
Oh my god thank you soooo much! Now my system actually loads. BUT It's stalling at this part and won't boot any further.


http://i116.photobucket.com/albums/o9/joe_vinci/DSC00044.jpg

I have no idea what USBF is? My guess is it has to do with my USB er something but Idk whats up with it?

erick2red
04-01-2009, 01:16 PM
try booting with "-x" (safe boot), so u can see if it really boot.
And i see in your screenshot something message about PS2Nub kext, so if you have both mouse and keyboard through usb ports, then i think u can erase that kext, just to fix issues.

oneshot
04-02-2009, 06:10 AM
the booting with -x didn't change anything. same exact screen.

any other ideas?

erick2red
04-02-2009, 01:02 PM
try "-x -v" and write down what's the last line your seeing

oneshot
04-03-2009, 01:05 AM
http://i116.photobucket.com/albums/o9/joe_vinci/DSC00045.jpg

last string is RTL8139: :fixEnetFlowControl - Flow Control is disabled

erick2red
04-03-2009, 02:26 PM
are u sure all what u did was replace the kernel??

try boot "-s", the check boot volume, mount for write-read access, and then:

cd /System/Library
chmod -R 755 Extensions/
chown -R root:wheel Extensions/
touch Extensions/
rm -Rf Extensions.mkext
diskutil repairpermissions /


and reboot using "-v -f" flags

lanceomni
04-03-2009, 03:26 PM
Also try disabling your network card in the BIOS. See if that gets you any further. Sometimes the system will hang at the next line but not display it.

oneshot
04-05-2009, 06:02 AM
are u sure all what u did was replace the kernel??

try boot "-s", the check boot volume, mount for write-read access, and then:

cd /System/Library
chmod -R 755 Extensions/
chown -R root:wheel Extensions/
touch Extensions/
rm -Rf Extensions.mkext
diskutil repairpermissions /


and reboot using "-v -f" flags

I booted with "-s" but it just booted the same way? And I don't know how I would mount for write-read access?

EDIT

I used those commands (with my brothers help) using the terminal on the install disk. I also made sure they were being applied to my OSX HD and not to the install disk. Anyways It did not change anything at all...Still the same screen. The reason I changed my kernel in the first place was because I was getting the error where I could not mount a .dmg disk image or whatever it's called. I got the "mounting disk" kernel panic after installing the 9.6.0 kernel based on voodoo.Then after replacing the kernel with another kernel that I believed was my old 9.5.0 voodoo kernel, I started to have this proble. I have no idea if that information would help but I really need to be able to access my OSX HD and it is getting very frustrating not being able to do so.

lanceomni
04-07-2009, 01:39 PM
We could try downloading the 9.5.0 Voodoo kernel from their website, placing it on a usb thumb drive and install it on your machine.

Getting the Kernel
Voodoo Website: http://code.google.com/p/xnu-dev/
This is a DMG so you are going to want to copy the mach_kernel to the root of you thumb drive. If you do not have a mac to open the DMG, I have downloaded it and repackaged it into a ZIP file and uploaded it here: http://rapidshare.com/files/218278593/Voodoo.zip
I would recommend making sure the USB drive's label is one word with no spaces

Installing the kernel
So now you have the kernel on a thumb drive. Plug the drive in and boot your install disk. Open Disk Utility to see where your USB drive's partition is mounted. Should be listed under "Mount Point". It is generally /volumes/YOURDRIVESLABEL Now open Terminal and follow the commands below.

2. Copy the new kernel from your USB thumb drive to the root directory. Replace "usbdrive" with your drive's label. Replace "osx" with your hard drive's label.
cp -r /Volumes/usbdrive/mach_kernel /Volumes/osx/mach_kernel3. Correct ownership for all kernels. Replace "osx" with your hard drive's label.
chown root:wheel /Volumes/osx/mach_kernel*4. Correct permissions for all kernels. Replace "osx" with your hard drive's label.
chmod 644 /Volumes/osx/mach_kernel*If you have spaces in drive names like /Volumes/my drive with spaces/ you have two options. One is quotes and the other is to strike them.
1. Using quotes:
/Volumes/"my drive with spaces"/
2. Striking them using \:
/Volumes/my\ drive\ with\ spaces/

erick2red
04-07-2009, 01:58 PM
i'm agree with lanceomi, cause if u just replace the kernel i don't see how u can't go back to your previous state by replacing the old kernel.

oneshot
04-08-2009, 12:38 AM
Wow thank you both eric2red and lanceomni for ALL your help and time spent writing up directions on terminal commands. Also thank you lanceomni for uploading the .zip file of the voodoo kernel!

Both of you were a tremendous help.
I can't thank you enough.

My system is up and running perfectly.

Thank you.

lanceomni
04-08-2009, 01:23 AM
Good to hear