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

Where is GRUB2's pointer to LVM LV / filesystem containing /boot?



Where does GRUB2 store its pointer information about which block
device holds the filesystem containing /boot/grub (specifically,
when using GPT partitioning)?

Can that information be displayed (e.g., to see it before and after
trying to change it, to confirm the change and which devices it's
pointing to, to try to avoid getting stuck in an unbootable state)?



(I meant to set up my system to have /boot on a RAID1 array, while
having all other filesystems on LVM logical volumes (on top of other
RAID1 arrays).

However, I apparently forgot to configure /boot when I installed
(using the Squeeze installer), so /boot is just part of the root
filesystem (on an LVM logical volume).

Surprisingly (because I thought GRUB2 handled only RAID1 but not LVM),
GRUB2 and my system boot fine.  I can see, via command completion in
GRUB2's boot-time command-line mode, that GRUB2 detects all my LVM
logical volumes.


So how does the lower layer of GRUB2 know in which (virtual) block
device to look to find /boot (to get to the configuration in
/boot/grub)?

It seems that the GRUB2 installer must have stored some data with
the GRUB2 code in the special GPT partition that the installer's
partitioner calls the "BIOS Boot partition" and parted lists as being
of type "bios_grub".

Does GRUB2 store a UUID or something else?  If it's a UUID, what's it
the UUID of? (a filesystem? a virtual block device (e.g., and LVM
logical volume or an mdadm RAID array)?)
)


I think I want to move /boot to the RAID1 array I originally intended
for it (so that booting into GRUB2 depends only on the /boot RAID1
array, and not also on the integrity of my LVM volumes).


After I copy/move /boot to the RAID1 array,
1. how do I tell GRUB2 to look in the new place? and
2. how do I see the setting in the bios_grub partition (or wherever)
   to try to confirm that I got things right before I reboot and
   hope GRUB2 and my system boot back up?



Thanks,
Daniel





Reply to: