thefoul Posted September 5, 2007 Share Posted September 5, 2007 I don't know if this has been posted before. If my explanation turns out to be a duplicate please remove it! -----------------------------The landscape--------------------------------------------- You have all the hardware needed to run MacOSX. You have at least one system (either another hackintosh or a real mac) up and running. You have a 10.4.x install dvd that you are using to install your system. You have a free hard drive that you want to fully dedicate to MacOSX X86: you want to have it in single boot. -----------------------------The issue-------------------------------------------------- You have installed your new system but you cannot boot without using either the install dvd or the other system drive (already working). All you are returned with after each reboot is the white cursor on a black screen.... Why is this happening? Because many of the install dvds that we are using to install our hackintoshes are not able to write the Master Boot Record of our hard drives. The reason is simple: standard mac installation media are designed to install an efiboot file at the beginning of the first HFS+ active partition that is selected during the OS installation. As a result of that, our hardrive is left with a valid partition table storing our HFS+ partitions but no bootloader...Bear in mind that the hard disk that we are using has been prepared with an fdisk partitioning schema: all the partition managers for macosx won't be able to touch it and diskutil will touch it but only to re-write it.... The ideal solution is to write the bootloader without affecting the partition table. ------------------------------------Solution: just copy chain0 into the MBR!!!----------------------------- Now: any MBR is a 512 bytes block at the beginning of the hard drive. The composition of these 512 bytes is the following: 446 bytes for the bootloader (that is sought by the BIOS of your motherboard at start-up) 64 bytes for the partition table (that is sought by the bootloader to indicate the start-up active partition) 2 bytes for the fdisk schema signature Therefore it's all about writing in those 446 bytes without touching the other 66 that are following... The file that we must write there is chain0 and you can retrieve it from Internet or simply copy it from your 10.4.x install dvd: it's in the little partition that is invisible on your mac but accessible if you put the install dvd in a standard windows pc.... Copy the chain0 file in a folder and write down the exact path to it. Boot your machine from - the other hackintosh that is already working with our hard disk attached on an external USB port - a real mac with our hard disk attached on an external USB port - the install dvd by pressing F8 and entering -vs as booting options Why? Because we need to access our target hard drive with root privilges and while it is not "mounted". Use diskutil from the GUI to write down the system name of our target hard drive (i.e.: rdisk2) Drag the icon of our target hard drive into the Trashbin to umount it. Once you have are in the Terminal: - type su and enter the root's pw - type exactly the following command dd if=/[path to chain0]/chain0 of=/dev/[our target drive system name] count=1 bs=446 ...press enter and don't touch anything until the command has finished. You can then quit the Terminal, shutdown the machine, put our target hard drive back in your hackintosh and boot it using the Darwin bootloader. You won't need the install dvd any longer. --------------------------------------IMPORTANT !!! Read carefully!!!-------------------------------------------- Bear in mind that since your bootloader is not stored in your filesystem if you use the fdisk -u [target hard drive system name] command all you will get is an empty MBR....that command will clean those 446 bytes of your MBR!!! It can be used on standard systems with complete linear installations (in that case you will have the bootloader files stored on your filesystem). Link to comment https://www.insanelymac.com/forum/topic/62431-how-to-fix-the-no-booting-error-with-chain0/ Share on other sites More sharing options...
Sapam Posted September 5, 2007 Share Posted September 5, 2007 I guess if we don't have second hackintosh or mac at our disposal to write to the mbr, we can use any liveDVD of Linux to dd the chain0 file to the MBR... please correct me if am wrong. Link to comment https://www.insanelymac.com/forum/topic/62431-how-to-fix-the-no-booting-error-with-chain0/#findComment-442168 Share on other sites More sharing options...
thefoul Posted September 5, 2007 Author Share Posted September 5, 2007 I guess if we don't have second hackintosh or mac at our disposal to write to the mbr, we can use any liveDVD of Linux to dd the chain0 file to the MBR... please correct me if am wrong. Yes...even the same 10.4.x install dvd can work fine. At "Darwin bootloader" prompt you press F8 and type -v (verbose) -s (single user mode with a shell) as boot options. Once inside the shell all you have to do is to acquire root privileges and interrogate the partition table to get the target disk name. The command to do that should be fdisk -p [but please check the -p parameter before using it...jsut to be 100% sure] Then you can use the dd command to copy chain0 as explained... With linux live dvd it might be the same...the only thing you have to do is to save your chain0 file on a USB key....'cause I don't think Linux can natively read/write HFS+ partitions... Link to comment https://www.insanelymac.com/forum/topic/62431-how-to-fix-the-no-booting-error-with-chain0/#findComment-442185 Share on other sites More sharing options...
Sapam Posted September 5, 2007 Share Posted September 5, 2007 Anyway, it is a great guide.... Can you explain what happens to MBR when we install it as a second OS (lets say the first one is XP)? And how how does the boot loads up Darwin bootloader in the above case i just mentioned? Link to comment https://www.insanelymac.com/forum/topic/62431-how-to-fix-the-no-booting-error-with-chain0/#findComment-442189 Share on other sites More sharing options...
thefoul Posted September 5, 2007 Author Share Posted September 5, 2007 Can you explain what happens to MBR when we install it as a second OS (lets say the first one is XP)?And how how does the boot loads up Darwin bootloader in the above case i just mentioned? If you have Windows installed as primary active partition and you have the HFS+ partition as logic partition (maybe embedded into an extended partition)....you can copy chain0 in C:\ and add a specific line in boot.ini to have the macosx choice under the boot menu of ntldr. This means that when you boot your machine you are using the ntldr which give you the option to activate chain0...and this will trigger the Darwin bootloader. As a matter of facts you are nesting the macosx boot sequence into the ntldr process. Link to comment https://www.insanelymac.com/forum/topic/62431-how-to-fix-the-no-booting-error-with-chain0/#findComment-442210 Share on other sites More sharing options...
max1977 Posted September 5, 2007 Share Posted September 5, 2007 Thanks for the great guide... I've been looking for a solution to the chain0/MBR problem for a very loooong time and it will surely be helpful in the future. I'm bookmarking this post!! Max Link to comment https://www.insanelymac.com/forum/topic/62431-how-to-fix-the-no-booting-error-with-chain0/#findComment-442315 Share on other sites More sharing options...
Recommended Posts