Tuesday, October 28, 2008

Make secondary install bootable


This post explain how to make a Leopard (hackintosh) secondary install bootable, any computers that has more then one OSX86 installd have a primary install and secondary install, a secondary install can be install on USB driver, Disk-On-Key, another partition, as long as you can boot more then one OSX86 on that computer, that means that you will load the working OSX86 and from there repair the non-bootable OSX.
for only and primary install read this post.

please note that this proccess will work for MBR and GUID partition scheme, if you don't know what this means, or want to learn how to check which of the two partition scheme you have then you can read this post.

in order to make your secondary partition bootable, please follow these next steps:
1. boot into your working OSX86 partition
2. download this file and extract it, for this post i will extract it in the root folder / so now i have a folder named: /MakeBootable
3. make sure you know what partition scheme you have (MBR or GUID)
4. open terminal (Applications->Utilities) and write the following commands
5. sudo -s (and write your password)
6. cd /MakeBootable (this is the folder you downloaded and extracted at step 2)
7. diskutil umount force /Volumes/Leopard (replace the word Leopard with your non-bootable drive name)

the result should look like this:

Volume Leopard on disk1s1 forced unmounted

if you don't know the name of the drive (that is non-bootable) then you can write this:
mount -t hfs

then you get a list of all known drives in your system the result should look like this:
/dev/disk0s2 on / (hfs, local, journaled)
/dev/disk1s1 on /Volumes/Leopard (hfs, local, journaled)

8. now write the command:
dd if=./mbr/boot1h of=/dev/rdiskXsY bs=512 count=1
(replace the letter X with your non-bootable drive number and the letter Y with your non-bootable partition number, in this example it will be: rdisk1s1)
also if you have MBR partition scheme then leave the word mbr as written in the example, if you have a GUID partition scheme then write guid instead of the mbr word then it should look like this: dd if=./guid/boot1h of=/dev/rdiskXsY bs=512 count=1

the result should look like this:
1+0 records in
1+0 records out
512 bytes transferred in 0.008498 secs (60250 bytes/sec)
9. write the command:
dd if=./mbr/boot0 of=/dev/diskX bs=400 count=1
(replace the letter X with the number of the non-bootable disk, in this example it will be 1 then for this example it should look like this: disk1)
also if you have MBR partition scheme then leave the word mbr as written in the example, if you have a GUID partition scheme then write guid instead of the mbr word then it should look like this: dd if=./guid/boot0 of=/dev/diskX bs=400 count=1

the result should look like this:
1+0 records in
1+0 records out
400 bytes transferred in 0.018606 secs (21498 bytes/sec)

10. write the command:
diskutil umount force /Volumes/Leopard
(replace the word Leopard with your non-bootable drive name)

the result should look like this:
Volume DiskOnKey on disk1s1 forced unmounted

11. write the command:
./startupfiletool -v /dev/diskXsY ./boot_v8
(replace the letter X with your non-bootable drive number and the letter Y with your non-bootable partition number, in this example it will be: disk1s1)

the result should look like this:
HFS+ filesystem detected
Looking for 1 word free
reading 4096,4096
Marking word 196
writing back 4096,4096
allocated blocks 32 at start 6272


now the disk should be bootable and should be able to boot on his own, you may do the steps in this post or this post as a completeing procedure in order to make sure that the OSX is the first partition to boot from.

Shay.

No comments:

 
the menu is from: Milonic DHTML menus