[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Grub2 on USB-Stick fails install

From: Jake Thomas
Subject: Re: Grub2 on USB-Stick fails install
Date: Thu, 29 Dec 2011 18:07:39 -0800

Is your first partition starting on sector 63 (the 64th sector)? Your MBR 
should be on sector 0, and then the next 62 sectors is the non-MBR part of 
track0, where Grub2 overflows into, unless the drive is GPT structured and a 
BIOS boot partition is present, in which case Grub2 overflows to there. Let's 
not mention block lists.

You could download gdisk (GPT fdisk) and just structure your thumb drive as 
GPT. The first sector will be a protective MBR, the next the GPT header, and 
the next 33 will be space for partition table entries. The last sector is a 
backup copy of the GPT header and the 33 before last are backup copies of your 
partition entries.

Notice that with GPT, the first 34 of the 62 sectors of the non-MBR part of 
track0 are now filled with GPT stuff, therefore Grub can't overflow into the 
non-MBR part of track0 with GPT. So it must instead overflow to a deticated 
BIOS boot partition, which I prefer, because it's dedicated for that purpose 
rather than useing space with no standardized purpose that's up-for-grabs.

Grub looks to the MBR partition table's first entry, and if its type is 0xEE, 
that's how it knows it's on a GPT-structured drive. Then it loads the rest of 
itself from the BIOS boot partition (the partition in the GPT with a type of 

I think gdisk would anaylate any issues you are having. Just make the first 
entry of the MBR partition table be of type 0xEE, and make one partition 64 
sectors big in the GPT of type EF02 for the BIOS boot partition. Andof course 
give yourself a partition for actual use

Also, are your partitions aligning on cluster boundries? Gdisk makes them line 
on them for you. You want each partition to have a whole number of clusters. 
Usually a cluster is 4 sectors, and a sector is usually 512 bytes. The start of 
each partition should be a sector whose number is divisible by 4 (for example, 
you could start a partition on sector 63 because that is the 64th sector, and 
64 is divisible by 4). And the end of each partition should be a sector number 
that is a number divisible by 4 minius one (but indexing from zero), for 
example, you can end a partition on sector 158, which is the 159th sector, 
which is one before the 160th sector, and 160 is divisible by 4.

It's recommended to have space between your partitions. I hear Apple recommends 
200 MiB, which I believe is 200 clusters.

grub-install will automatically know to overflow grub to the BIOS boot 
partition rather than to the non-MBR part of track0.

I structured a thumb drive as MBR-GPT hybrid with Grub2 for BIOS and for EFI 
with several things to boot. It's fun!

Sent from my iPhone

reply via email to

[Prev in Thread] Current Thread [Next in Thread]