Grub and logical partitions
mschwendt at gmail.com
Sat Jul 31 08:41:07 UTC 2010
On Fri, 30 Jul 2010 18:33:53 -0700, Daniel wrote:
> On 07/30/2010 03:21 PM, Timothy Murphy wrote:
> > Can grub boot from a logical partition?
> > It seems from my reading that it cannot.
> > But I found that I could in fact boot from /dev/sda5
> > if I used grub interactively, starting with
> > root (hd0,4)
> > then using tab to look for kernel and initrd
> > and finally booting.
> > However, if I put exactly the same commands in grub.conf
> > the boot failed, with "File not found ...".
> > (Nb I am not using LVM, sda5 is a logical partition
> > within the extended partition sda4.)
> > Can some guru explain this to me please.
> It can if you set the MBR for each boot partition.
Be careful here. There is only one Master Boot Record. By definition, the
MBR is the first sector of the storage medium, which also holds the
partition table and is located in front of the first partition. What you
refer to is the Partition Boot Sector, the first sector of a partition.
> For example:
> grub> find /grub/stage1
> In my setup, 4 is a front-end, MBR for the
> entire drive and the boot partition has a single
> grub directory with all of the stages, splash, grub.conf
> and no kernel/initrc/mem/etc., nothing above the grub
> directory. Just make sure that the grub directory is the
> latest grub that supports ext4. The grub.conf file
> contains only chainloaders such as:
> title Fedora 13
> rootnoverify (hd0,6)
> chainloader +1
> title Ubuntu 10
> rootnoverify (hd0,8)
> chainloader +1
'rootnoverify' should only be necessary, if the primary GRUB doesn't
understand the filesystem used on the chainloaded partition.
If the MBR's GRUB is a recent one like from Fedora 13 or Rawhide,
you can use 'root' instead of 'rootnoverify'.
'savedefault' in a GRUB example without explaining it is not good.
It is not needed.
More information about the users