Chameleon

Issue 43: boot0hfs on GPT disk

Reported by Khalifazarul Izwan, Nov 4, 2010

Installed boot0hfs on GPT disk like this:-
fdisk440 -u -f /usr/standalone/i386/boot0hfs -y /dev/disk0

The bootloader stuck at:-
boot0: test
boot0: done
boot1: error

diskutil list:-
/dev/disk0
    #:                       TYPE NAME   SIZE       IDENTIFIER
    0:      GUID_partition_scheme       *160.0 GB   disk0
    1:                        EFI        209.7 MB   disk0s1
    2:                  Apple_HFS OSX    79.7 GB    disk0s2
    3:       Microsoft Basic Data        79.8 GB    disk0s3

Comment 1 by valv, Nov 5, 2010

you missed the stage1 boot file;
do this instead (replace X & Y accordingly):
sudo -s
cd package
./fdisk -f ../sym/i386/boot0hfs -u -y /dev/rdiskX

dd if=../sym/i386/boot1h of=/dev/rdiskXsY
mkdir /Volumes/EFI
mount_hfs /dev/diskXsY /Volumes/EFI
cp ../sym/i386/boot /Volumes/EFI

fdisk -e /dev/rdiskX
p
f 1
w
y
	
q
If u don't know what that does mean, go to the forum and post 
questions there, not issues :)

Comment 2 by Khalifazarul Izwan, Nov 6, 2010

Sorry, I forgot to mention that I did execute both commands:-
fdisk440 -u -f /usr/standalone/i386/boot0hfs -y /dev/disk0
dd if=/usr/standalone/i386/boot1h of=/dev/rdisk0s1

and it stuck here:-
boot0: test
boot0: done
boot1: error

If I execute these commands:-
fdisk440 -u -f /usr/standalone/i386/boot0 -y /dev/disk0
dd if=/usr/standalone/i386/boot1h of=/dev/rdisk0s1
I'm able to boot but since I set it up to dual-boot with windows 7, 
I use boot0hfs instead because I want the windows partition set to 
active partition (hibernate issue).

When I use boot0hfs, whether I set the EFI partition or windows 
partition as active partition, it still stuck & won't continue 
to boot.

Comment 3 by Khalifazarul Izwan, Nov 6, 2010

BTW, I use Chameleon 2 RC5 rev. 629 (Trunk 619).

Comment 4 by Khalifazarul Izwan, Nov 11, 2010

1) Re-format disk - GUID/GPT - 2 partitions
2) Install OSX
3) Setup EFI partition:-
newfs_hfs -v EFI /dev/rdisk0s1
4) Mount EFI partition
5) Untar all files & folders (Extensions, Boot.plist, etc) to 
EFI partition.
6) Unmount EFI partition
7) Re-format 2nd partition to FAT32 - for Windows 7
8) Install Windows 7
9) Boot to OSX using external boot disk (USB)
10) Install Chameleon 2 RC5 r629:-
fdisk440 -u -f /usr/standalone/i386/boot0hfs -y /dev/disk0
dd if=/dev/rdisk0s1 count=1 bs=512 of=/tmp/origbs
cp /usr/standalone/i386/boot1h /tmp/newbs
dd if=/tmp/origbs of=/tmp/newbs skip=3 seek=3 bs=1 count=87 
conv=notrunc
dd of=/dev/rdisk0s1 count=1 bs=512 if=/tmp/newbs

Result, stuck at:-
boot0: test
boot0: GPT
boot0: test
boot0: done

diskutil list:-
/dev/disk0
   #:                       TYPE NAME                    SIZE       
IDENTIFIER
   0:      GUID_partition_scheme                        *160.0 GB   
disk0
   1:                        EFI                         209.7 MB   
disk0s1
   2:                  Apple_HFS OSX                     80.0 GB    
disk0s2
   3:       Microsoft Basic Data                         79.5 GB    
disk0s3

fdisk /dev/rdisk0:-
Disk: /dev/rdisk0   geometry: 19457/255/63 [312581808 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
---------------------------------------------------------------------
---
 1: EE 1023 254  63 - 1023 254  63 [         1 -     409639] 
<Unknown ID>
 2: AF 1023 254  63 - 1023 254  63 [    409640 -  156290904] HFS+    
   
*3: 07 1023 254  63 - 1023 254  63 [ 156962688 -  155356936] 
HPFS/QNX/AUX
 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused  
   
Thank you for your help.  ;D

Comment 5 by Khalifazarul Izwan, Nov 11, 2010

I tried it again with FAT32 EFI partition.
(continue from previous)
1) Remove the Windows 7 partition using Disk Utility
2) Resize the OSX partition to cover all spaces available
3) Install boot0
fdisk440 -u -f /usr/standalone/i386/boot0 -y /dev/disk0
4) Set EFI partition as active partition
(Reboot - found able to boot into OSX)
5) Change the EFI partition filesystem from HFS to FAT32 (when I 
said "change", I meant erase/format):-
newfs_msdos -F 32 -v EFI /dev/rdisk0s1
6) Restore the EFI contents
7) Reinstall disk loader & whatnot:-
fdisk440 -u -f /usr/standalone/i386/boot0hfs -y /dev/disk0
dd if=/dev/rdisk0s1 count=1 bs=512 of=/tmp/origbs
cp /usr/standalone/i386/boot1f32 /tmp/newbs
dd if=/tmp/origbs of=/tmp/newbs skip=3 seek=3 bs=1 count=87 
conv=notrunc
dd of=/dev/rdisk0s1 count=1 bs=512 if=/tmp/newbs
(Reboot - found able to boot into OSX)
8) Split the partition to two. 2nd partition for Windows 7.
9) Reinstall Windows 7.
10) Boot into OSX using external boot disk (USB)
11) Reinstall disk loader & whatnot:-
fdisk440 -u -f /usr/standalone/i386/boot0hfs -y /dev/disk0
dd if=/dev/rdisk0s1 count=1 bs=512 of=/tmp/origbs
cp /usr/standalone/i386/boot1f32 /tmp/newbs
dd if=/tmp/origbs of=/tmp/newbs skip=3 seek=3 bs=1 count=87 
conv=notrunc
dd of=/dev/rdisk0s1 count=1 bs=512 if=/tmp/newbs

Result:-
Finally, able to boot into Windows 7 & OSX with boot0hfs.

I don't know why it doesn't work when I tried earlier.

Wish list:-
Please, please, please add support for EFI partition with HFS 
filesystem. I don't like FAT32 since it produced a lot of 
"dot" (.) files.

Comment 6 by Ben Hooker, Nov 11, 2010

It already supports HFS

Comment 7 by Khalifazarul Izwan, Nov 12, 2010

Have you tried on GUID/GPT disk? EFI partition with HFS+ filesystem?

Comment 8 by Khalifazarul Izwan, Nov 12, 2010

You can do better than saying "it already supports HFS". 
What I'm missing here?

Comment 9 by Ben Hooker, Nov 12, 2010

Chameleon already supports an HFS+ EFI partition on a GUID disk. Why 
don't you try before making assumptions? :)

Comment 10 by Khalifazarul Izwan, Nov 12, 2010

Hmm...If you read carefully, you'll know I didn't make any 
assumption. :)

Comment 11 by Khalifazarul Izwan, Nov 12, 2010

Please read the title.

Comment 12 by Ben Hooker, Nov 12, 2010

first, why don't you just use boot0. Then, once you get that 
working, install boot0hfs.

Comment 13 by Khalifazarul Izwan, Nov 12, 2010

I already did that. I already tried many possible solution/setup but 
it still have problem. Have you tried it yourself?

Comment 14 by Ben Hooker, Nov 12, 2010

Yes.

Comment 15 by Khalifazarul Izwan, Nov 14, 2010

I just want to update here. The boot0hfs issue on my Acer Aspire 
9420 with HFS+ EFI partition has been solved with help from 
Blackosx.

Please visit this thread for more information:-
http://forum.voodooprojects.org/index.php/topic,1671.msg8717.html#msg
8717

Comment 16 by Cosmosis Jones, Jun 2, 2011

if this is still an issue please reopen and reference trunk
Status: Invalid

Created: 13 years 5 months ago by Khalifazarul Izwan

Updated: 12 years 10 months ago

Status: Invalid

Followed by: 3 persons

Labels:
Priority:Medium
Type:Defect