Grub disk: something automatic?

Dotan Cohen dotancohen at
Thu Jan 28 15:48:30 UTC 2010

> Hi Dotan, sorry I do not have an exact answer for you, but here are some
> suggestions to help with your situation.  Multiple hard drives can be a
> pain on modern Motherboards, because the Mobo can re-assign drive
> numbering on boot, (if you boot from CD-ROM on one controller then
> switch to a SATA hd on another controller, drive numbering between your
> IDE and SATA hard drives will be completed messed up.  Here are some
> strategies to alleviate the headaches:
> 1. If possible, arrange your hard drives so your primary linux partition
> is on your boot hard drives.  When bootstrapping grub, disconnect the
> other hard drives.  It's impossible for even grub to mix up the hard
> drive numbering when there is only hd0.  It will not matter how badly
> is inaccurate on future update-grub runs, since grub will now
> auto-fix itself based on UUID's.. (I'm really loving this new feature.)
> 2.  Install grub on the super-block of your filesystem  as well as the
> mbr.  (this won't work with XFS filesystem, since XFS does not leave
> space on the superblock)
> ex: grub-install /dev/sda1
> Then mark that partition as bootable in your partition editor.
> That way, whenever another OS or disk utility messes your MBR, *any*
> bootloader or repair disk will be able to chainload your grub that is
> safely installed on the partition.  From the lowly dos fdisk /mbr (or
> lilo -m /dev/sda) to simply install an old style dos MBR will be enough
> to get your linux booting again.
> While reading the grub documentation, I also saw reference that grub can
> now create it's very own boot partition to deal with these musical hard
> drive situations, which should be more reliable.  I haven't tested this
> myself yet (on to-do list) so can't offer guidance, but it's worth
> perusing the grub documentation wiki.

Thanks. I do try to keep my bootable partitions (and swap) on sda
whenever I can. I like the idea about copying grub to sda as well,
that looks handy.


Dotan Cohen

More information about the ubuntu-users mailing list