Issue 129: boot0 error on HDDs with 4K sectors

Reported by Stef Home, Jul 25, 2011

It seems that boot0 does not work with HDD that have 4K sectors.

I got the following error : 

boot0: test
boot0: test
boot0: test
boot0: error

I've tested on Seagate 2TB HDD ST2000DL003

Comment 1 by Cosmosis Jones, Jul 28, 2011

Labels: Type:Enhancement Target:2.1 Type:Defect
Status: Accepted

Comment 2 by shawn b, Aug 17, 2011

I can confirm this is happening on a WD20EARS with chameleon r1400 
and chimera 1.4.1. Is this issue being looked at soon?

Comment 3 by abdeir abdeir, Aug 21, 2011

Same here except mine is 320Gb 7200rpm hdd, I tried with chameleon 
1000-1400 incuding nbi 0.8.3-0.8.5 and chimera 1.4.1.

Comment 4 by Zsolt L, Aug 27, 2011

For me also, Western Digital 500GB 2.5" 5400rpm Sata HDD, till 
now cannot install chameleon, it is good to see that I am not a 
stupid idiot, who cannot install a programm...
I hope it will be solved.

Comment 5 by ema, Aug 27, 2011

I have the same issues with a WD10EARS. Sometimes boot1h will 
"stick" if you boot in single user and install it 
manually, but most of the time it will be wiped just seconds after 
being copied.

Command to verify that boot1h is in the partition:
dd if=/dev/rdiskXsY of=testfile bs=512 count=2

If you run that right after the installation you will see some text 
in testfile. But I bet that if you wait 10 seconds and run it again 
then it's empty.

Comment 6 by Marcos Mejia, Aug 27, 2011

same issue here with WD10EARS.

Comment 7 by Cosmosis Jones, Aug 28, 2011

The issue about boot0 is for > 2tb.
Your comments about western digitals shows that WD is doing 
something to the disk and is not related to the size of the drive.

Comment 8 by Cosmosis Jones, Aug 28, 2011

Owner: jrcs

Comment 9 by Zsolt L, Aug 28, 2011

These HDDs have 4k sectors not 512b. That is the difference.

Comment 10 by Jeremy Agostino, Nov 13, 2011

Out of curiosity, has anyone with a 4kb sector drive tried 
installing their boot1h with "dd if=boot1h of=/dev/rdiskXsX 

Comment 11 by skip adam, Nov 22, 2011

I have tried this command and can confirm the error still persists 
"sudo dd if=boot1h of=/dev/rdisk0s2 bs=4096"

Comment 12 by Jeremy Agostino, Nov 23, 2011

I've got another thought. Can someone with a 4k sector drive 
download and burn a Linux LiveCD, preferably one with HFS+ drivers? 
I'd suggest PartedMagic ( 
Boot off of it and use the dd tool to copy the boot1h file in. Then 
wait a bit and copy it back out.

Comment 13 by skip adam, Nov 24, 2011

I just tried this, 
sudo dd if=boot1h of=/dev/sda2 bs=4096

and then this 
sudo dd if=/dev/sda2 of=boot1hout bs=4096 

my output is attached. 

I am using a WD20EARS drive with 4K sectoring. linux version Ubuntu 
10.04 / OS X 10.7.2. currently booting off a pendrive off a usb 
header inside the case. not ideal.

Comment 14 by skip adam, Nov 24, 2011

that worked. when copied using ubuntu's dd utility with the command 
above this worked. my hack now boots every time. not just the first 
time i tested. maybe this is an issue with the way osx handles 
4ksectors with its dd command. (maybe an older version from bsd?)

sudo dd if=boot1h of=/dev/sda2 bs=4096

Comment 15 by skip adam, Nov 24, 2011

thanks a lot. maybe the documentation could be updated to reflect 

Comment 16 by Jeremy Agostino, Nov 25, 2011

Awesome. Now we have to figure out what the difference is between 
GNU dd and what I presume is BSD dd. Perhaps chameleon downloads 
could include a newer build of dd (like we do with fdisk)?

Comment 17 by Jeremy Agostino, Nov 25, 2011

Would you (or anyone else) mind doing some more testing with dd? GNU 
coreutils contains the Linux version of the dd program, and there's 
a Mac OS X-compatible version of it. I'd like to test if that 
version will work like the Ubuntu one did for you.

First you need to wipe out the boot1h already on your disk. Boot the 
Linux system and run the command "dd if=/dev/zero of=/dev/sda2 
bs=1k count=1". Be very careful that you get the bs and count 
options right, /dev/zero is technically an infinite file so dd could 
zero out your disk...

Then use a loader disk to boot Mac OS X and install Macports ( and run the command "sudo 
port install coreutils" in Terminal. Then run the usual 
Chameleon install command with "gdd" instead of 
"dd". Report back on whether the boot loader works again 
or not.

Comment 18 by skip adam, Nov 25, 2011

I'd be happy to do that. should i use bs=4k instead of 1k. i'll do 
that when i get back after the weekend.

Comment 19 by Jeremy Agostino, Nov 25, 2011

Either should work (the chameleon boot loader is only 1k so the rest 
of the block is zeroed out anyway) but you can use 4k if you want to 
be consistent. Thank you for your help, by the way.

Comment 20 by Stef Home, Nov 26, 2011

I tried gdd from macports today. Unfortunately it does not work.

I also tried the dd from ubuntu live CD. That time it worked :) 
Thanks skip !

Comment 21 by Jeremy Agostino, Nov 26, 2011

Interesting. Perhaps the issue is caused by the kernel?

Comment 22 by wang yue, Nov 26, 2011

I also tried the dd from ubuntu live CD. That time it worked :) 
Thanks skip !

Comment 23 by adria vidal, Dec 20, 2011

booting from partedmagic and making dd if=boot1h of=/dev/sda2 

solved my 

boot0: error

on a   
Capacity:	2 TB 
Model:	WDC WD20EARX-00PASB0   

so seems to confirm a problem with dd binary and not a problem with 
advanced format.

Comment 24 by Esteban Michalowski, Jan 5, 2012

Guys,i have the "boot0 GPT test error" issue and i think 
im not understanding or missing a step. This is my diskutil list 
0:GUID_partition_scheme		*640.01 GB 	disk0	
1:	EFI			209.7 MB	disk0s1	
2:	Apple_HFSOSX	OSX	100.0 GB	disk0s2
3:Microsoft Basic Data		100.0 GB	disk0s3
4:Microsoft Basic Data	Datos	337.1 GB	disk0s4
5:Microsoft Basic Data		100.0 GB	disk0s5
6:	Linux Swap		2.7 GB		disk0s6

the disk0s2 is the partition which has OSX Lion on it. The thing is 
when i do "dd if=/dev/rdisk0s2 of=boot1hout bs=4096" once 
i have installed chimera (with tonymacx86 or chimera solo intaller), 
it start makingo boot1hout file with a lot of size (like if it were 
copying the full partition in that file). And if i do "dd 
if=/dev/disk0s2 of=boot1hout bs=4096", it says the disk is 
I want to get the boot1h file, to boot with a GNU/Linux 
distributtion and use its dd command. 
The question is, how do i get the boot1h file correctly?

Comment 25 by skip adam, Jan 5, 2012

ok if you do "dd if=/dev/rdisk0s2 of=boot1hout bs=4096" it 
will copy your hard drive to a file called boot1hout. you don't want 
to do that unless inspecting and then you would run "dd 
if=/dev/rdisk0s2 of=boot1hout bs=4096 count=1", the same 
happens with this command "dd if=/dev/disk0s2 of=boot1hout 

I'm not sure what this means

"I want to get the boot1h file, to boot with a GNU/Linux 
distributtion and use its dd command. 
The question is, how do i get the boot1h file correctly?"

I'm assuming what you're trying to do is boot linux to then use it's 
dd utility to copy the boot1h file to the hard drive.

1. Download Ubuntu-
2. burn .iso file to cd or dvd. (
3. reboot computer
4. at boot chime press del or whatever to get to bios (could be f2 
or f8 or f12 etc)
5. set cdrom as first boot drive
6. put cd in drive, reboot and load ubuntu live environment
7. identify your disk. look in system> administration> disk 
drives. find your partition number for OS X. remember it i'll use 
example '/dev/sdxy' replace this with your partition number(probably 
something like /dev/sda2)
8. download the boot1h file and put in the home folder 
9. open terminal (applications > accessories > terminal)
10. type "sudo dd if=boot1h of=/dev/sda2 bs=4096"
11. reboot and you're done.

any questions just a ask

Comment 26 by skip adam, Jan 5, 2012

sorry in step 10 type "sudo dd if=boot1h of=/dev/sdxy 
bs=4096" replacing sdxy with the partition you noted down in 
step 7

Comment 27 by skip adam, Jan 5, 2012

if you were asking for the boot1h file it can be downloaded in the 
main zip file of the chameleon package. it's also attached to my 
post above.

Comment 29 by Jeremy Agostino, Jan 5, 2012

On another note, did anyone file a bug with Apple about this?

Comment 30 by skip adam, Jan 5, 2012

i haven't done. i could do that it you's like.

Comment 31 by skip adam, Jan 5, 2012

bug report submitted

Comment 32 by Esteban Michalowski, Jan 5, 2012

@skip adam, i have the boot0 GPT test error issue in my hhackintosh 
with triple boot. The thing is when i install chimera, i have triple 
boot for some seconds, then it's been "removed" by my 
system, caused by 4k hdd. Someone said the solution is making dd of 
the boot1h file using GNU/Linux, because its dd work with a 4k 
sectors HDD. Thats why im making "dd if=/dev/rdisk0s2 
of=boot1hout bs=4096", i do it quckly when i install chimera... 
well, where can i download boot1h file? It wont delete my partittion 
info if i download and i manually do dd in linux, wont it?

Comment 33 by skip adam, Jan 5, 2012

@Esteban Michalowski

The boot1h file is in the chimera boot folder of the zip file you 
download to install chimera. 

don't try to copy it off the Hard drive in mac using dd. the dd 
doesn't work properly with the 4k sectors. if you copy the boot1h 
file to your mackintosh using mac's dd as in the instructions 
chances are your hard drive will remove it (this causes the boot0 
GPT error). to resolve use the same boot1h file in the zip folder 
and copy using the dd command using the Linux dd command (not mac's 
dd) the linux dd can handle 4k sectors and will align the file 
correctly so it is not removed by the system and then will allow you 
to triple boot.

we have worked out a solution to this problem.
Ignore the copying boot1h 'off' the drive. this was used earlier in 
this thread to diagnose the problem. 

the solution is to copy 'on' the boot1h file by using linux dd.

anyway about downloading the boot1h file. the boot1h file is in the 
installation package. I have also linked it in post 28. this is a 
working boot1h file working in my system.

Comment 34 by skip adam, Jan 5, 2012

boot1h --> HD not HD --> boot1h

Comment 35 by Esteban Michalowski, Jan 6, 2012

@skip adam, Well, that's all, it worked like a charm.
Finally i have my triple boot (OSX Lion, Windows, Ubuntu) working 
and booting without any problem and wihout iBoot CD. It's incredible 
that the implementation which makes Linux of "dd" works 
better than the Unix BSD one.
Thanks alot, see ya.

Comment 36 by skip adam, Jan 6, 2012

@Esteban Michalowski

you're welcome

Comment 37 by Esteban Michalowski, Jan 6, 2012

Guys, its me again. I know its a kind of offtopic, but i cant get 
info about this.

I have tripple boot, to do it, i have chimera installed in OSX 
partittion and this one is marked as active. With the time, windows 
stop booting ok, it gets error 0xc000000e. To solve that problem, i 
have to set windows partition as active(if i dont, repair option of 
windows cd doesnt find my windows instalation), boot with the 
Windows 7 cd, use the option "repair windows", and then i 
can boot normally again, but i insist, later i will get the same 
Its like windows doesnt like to be marked as an non actived 
partiton, and its stop working.
Is it possible to install chimera in main disk (i mean rdisk0) 
instead of OSX partittion (rdisk0s2), marking as active the Windows 
partition?. Should it work? If i try, is there any way to make 
"roll back"? thanks.

Comment 38 by Marco Masselli, Jan 13, 2012

Guys, i don't know anything about Kernel... but the dd command isn't 
open source? if yes we should be able to compile a new version from 
linux and use it in the installer of Chamaleon.

Comment 39 by Jeremy Agostino, Jan 13, 2012

Unfortunately it's not that simple. The GNU (Linux) version of dd 
won't just compile on OS X because it's not Linux. I don't have a 
hard drive with this sector format so I can't test myself, but 
someone should see if the dd version included with GNU binutils from 
Macports has the same issue. One would hope it's a specific 
implementation detail different between the two dd versions, not a 
difference between the Linux and Darwin kernels, that is causing the 
problem. If the gdd from Macports binutils works, then yes it should 
be possible to build a statically linked version to include with 
Chameleon. Of course the best option would be that Apple fixed the 
bug in their BSD dd.

Comment 40 by Mark Inkley, Jan 26, 2012

Thanks for everyone's input so far. I too tried building 10.6.8 
(Kakewalk) on a WDC WD20EARX-00ZUDB0 2TB disk and encountered the 
boot errors.  

Fortunately, I had a 10.6.4 build on seperate disk so I downloaded 
GNU coreutils-8.13 ( 
which I built without any problems.   

The resulting dd binary installed boot1h perfectly.
I don't believe this is a kernel issue, this version of dd.c 
compiles easily and works fine.
dd if=boot1h of=/dev/rdisk2S2 bs=4096

rebooted and it works fine.

Comment 41 by skip adam, Jan 26, 2012

ok here is the binary mentioned by Mark Inkley. I haven't got round 
to testing it yet but here it is for anyone interested. 
(coreutils-8.13.tar.gz compiled 64BIT) I will upload a 32BIT version 

  • dd - 99.27 kB

Comment 42 by skip adam, Jan 26, 2012

here is a zip file with 32 bit and 64 bit dd binaries from the 
coreutils package

Comment 43 by Ruben Ryapolov, Feb 13, 2012

I have this HD: WDC WD20EARX-00PASB0


and I have the boot0 error, can anyone help me fix it?

Comment 44 by skip adam, Feb 13, 2012

Read the posting, this issue has been pretty much solved, all the 
information required is in this thread. could a moderator possibly 
lock this thread down to stop more similar requests? don't really 
want my email spammed.

Comment 45 by Cosmosis Jones, Feb 13, 2012

Before we package this into the package..
is this DD statically compiled? 

.. i dont' want to have to deal w/ dynamic links

Comment 46 by skip adam, Feb 13, 2012

can you explain the difference. I have compiled this using 
and then copied the executable from the build directory.
i'm using an LLVM compiler

I would assume it was static linked however I have not passed any 
additional arguments other than which platform to build for (x86 and 
x86_64). it appears to work on all my machines, which would suggest 
static linking.

Comment 47 by watou smith, Feb 13, 2012

I have a WD10EADS that has always booted from an old Chameleon, and 
a WD10EARS that has never booted from any Chameleon or Chimera.  The 
WD10EARS gives
boot0: GPT
boot0: test
boot0: test
boot0: error
no matter what.

Comment 48 by skip adam, Feb 13, 2012

READ THIS THREAD before posting

Comment 49 by watou smith, Feb 13, 2012

I did.  Downloaded and boot1h from links above and ran the 

sudo dd/64/dd if=boot1h of=/dev/rdisk2s2 bs=4096

and the same problem as shown in comment 47 persists.  (It would 
seem to me that saying there is a bug in dd is at the same level as 
saying there's a bug in malloc -- i.e., there probably isn't, and 
the problem probably lies elsewhere.)

Comment 50 by Jeremy Agostino, Feb 13, 2012

A few people have been able to use the coreutils dd binary compiled 
on Mac OS X to install boot1h successfully, so perhaps there's 
another issue at work in your case.

Is it planned to include a coreutils dd binary in future chameleon 

Comment 51 by watou smith, Feb 13, 2012

All I can tell you is that I am one person for whom the coreutils dd 
binary provided failed to write the boot1h file successfully with 
the instructions provided above.  I verified by reading back the 
first 1KB of the partition, and it came back mostly zeros.  I 
seriously doubt that one dd utility versus another makes a reliable 
difference when dealing with 4K sector size disks.

Comment 52 by watou smith, Feb 13, 2012

Found this thread that shows that repeated attempts at writing 
boot1h have worked for WD10EARS (4K sector Advanced Format) drives.

An OS-level or lower problem will not be fixed (reliably) by using a 
different dd utility.  I assume Apple will eventually fix this bug 
(if they know about it). 

But in the meantime, if you change the post-flight script to loop 
over a write/read/verify of up to X times, you will 1) more likely 
leave behind a successful install, and 2) be able to report 
installation failure if all X attempts fail to write boot1h.

Comment 53 by watou smith, Feb 13, 2012

Three attempts was all I needed (see attached).

Comment 54 by watou smith, Feb 14, 2012

But there is definitely an OS- or Extension-level problem because 
boot1h is not really written to disk (see attached).

Comment 55 by skip adam, Feb 14, 2012

ok, fair enough, we'll need to continue looking into this then. will 
need more testing. For now use the linux dd commands off a live cd. 
I will look into this more when i'm off my exam period.

Comment 56 by Jeremy Agostino, Feb 14, 2012

That's demonstrating what other users experienced using the system 
dd. They would copy it in and copy it out, verifying that it was 
successful. Then they would copy it out a little later and it would 
be empty or corrupted.

Comment 57 by watou smith, Feb 14, 2012

The boot1h from comment 28 is now properly written using steps from 
comment 25.  All of my previous attempts to write it from 10.6.7 to 
a 10.6.8 disk, or from 10.6.8 to itself, failed as described 

Thank you skip and Jeremy.

Comment 58 by Ryan Rhee, Feb 21, 2012

I was able to get this to work using OS X's dd command instead of 

The trick I had to use was to write directly to /dev/disk0s2 instead 
of rdisk0s2. Of course, if disk0s2 is your root partition, then you 
can't really unmount it to write to it, so you'll have to boot into 
another OS X install to unmount that particular partition, and dd 
straight to the disk instead of going through the ramdisk.

The only thing I can think of that might cause this is that the 
rdisk's write cache/buffer isn't being written out to disk for some 

This also explains why re-writing a certain number of times might 
make this work, since repeated writes to the rdisk may force the 
write buffer to be flushed.

Comment 59 by Juri Schmidt, Feb 24, 2012

@Post 25
I am just trying and thinking about step 8. I mean I am really new 
to this topic, but where do I have to put the booth1 file exactly? 
is it the Home Folder on my Ubuntu release or on my Hackintosh hard 
I tried disjournaling my mac hdd. Under Ubuntu it wanted to install 
new software for reading hfs+ and the problem is again I can not 
write on that hard drive. This time Ubuntu tells me that I have no 
Permision to write on it.

Comment 60 by skip adam, Feb 25, 2012

home folder of the ubuntu release. you don't need to be able to read 
the HFS drive as dd is a byte level utility. make sure when you use 
dd you type sudo first

Comment 61 by Casey Fulton, Feb 27, 2012

For the record, the fix listed above also works with the Windows 
version of dd available here:

I was able to run "dd.exe bs=4k if=boot1h of=\\.\i:" and 
it worked perfectly next boot.

Comment 62 by Juri Schmidt, Feb 27, 2012

@skip adam, thank you I got it now. For some reason I don't get 
Admin permission when I boot from the Ubuntu CD if I type in 
terminal sudo dd... 
After that I tried it with Parted Magic, and copied the boot1h file 
into /root and startet terminal with the sudo dd.... comand.
I now have a good hackintosh build.
thanks again

Comment 63 by Brandon Dalzell, Mar 2, 2012

I think i made a grave error, please tell me if I did it wrong. 
I downloaded ubuntu, put the boot1h file in the home folder and ran 
the command "sudo etc" 

rebooted and got to the 
"Loading Operating System ..." 
with no boot errors. But it just sat there. I only have one 
partition on the hard drive(seagate 500g with 4k sectors.) And the 
dev command was to sda, should I of put it in sda1?

Comment 64 by Brandon Dalzell, Mar 2, 2012

Sorry for double posting but I am going to say that I made a mistake 
because now it wont let me even boot with iboot. I am going to 
attempt to wipe the drive from the Ubuntu livecd, and start over. So 
fething close to getting this fixed its annoying.

Comment 65 by ginga tringa, Apr 4, 2012

i have a problem. I follow every steps of the tutorial, and i have 
been done perfectly. Now there aren't error. But when i select my 
HDD appears this screen. what do i should do? thank to all! :)

Comment 66 by ginga tringa, Apr 4, 2012

i forget the image

Comment 67 by Cosmosis Jones, Apr 4, 2012

your photo has NOTHING to do with this issue.
Do Not spam issues.

Use google,forums, lastly irc for your problems.

This issue is far past being opened. Someone else has dd compiled 
utils, we will incorporate them. this is being closed.
Status: WontFix
Owner: ---

Comment 68 by watou smith, Apr 4, 2012

It was shown that which dd util one uses has no effect on this 
issue.  It is being closed in error, and some/all users of 4K-sector 
boot disks will fail to boot.  Bad move.

Comment 69 by Cosmosis Jones, Apr 4, 2012

Actually thats not true... The issue needs to be nailed down to 
emulated 512 vs non on certain drives.
the coreutils dd compiled by conti appears to be working.

Regardless this ticket is what it is a lot of info that needs to be 
coalesced into a real ticket, instead of 69 comments.

Comment 70 by watou smith, Apr 5, 2012

The coreutils dd compiled by conti did not work on a WD10EARS 4K 
sector 1TB disk. Please read comments from Feb 13.

Comment 71 by Cosmosis Jones, Apr 5, 2012

On Feb 13 i was busy preparing myself to deal with valentines day. 
i'm sorry i missed that post.
This is apples problem.
to get around it you have to to not dd to an rdisk.

so boot your usb installer and install that way.. without an rdisk.

dd if=boot1h of=/dev/diskXsY

Comment 72 by bugjah, May 30, 2012

hello all

I have had a SL/Ubuntu build on my ell Mini 10V running great for 6 
months, and this morning -suddenly- the boot0: error

I did not do anything (updates etc.) recently, so this is puzzling.

I have tried the dd if=boot1h ... fix in terminal BOTH in SL (using 
my instally USB disk) and in Ubuntu (which I can still boot into if 
I start up using he SL install).

I am able to copy the files, but the boot0: error persists.

any ideas?

many thanks!

Created: 12 years 9 months ago by Stef Home

Updated: 11 years 11 months ago

Status: WontFix

Followed by: 21 persons