2012-03-19 At work I started on a filesystem migrat ... 9 years ago
At work I started on a filesystem migration on a large raid-array. Large enough to use GPT partition tables, which was new to me. So I had to find out how to get GRUB2 running on a GPT disk, preferably without doing test-reboots before the real change. All this on a Ubuntu 11.10 system. I read about GPT booting with grub2 at Sysresccd-Partitioning-EN-The-new-GPT-disk-layout - SystemRescueCd and Booting from GPT which shows that (re-)installing grub2 to a GPT disk is still quite simple:grub-install /dev/sdgBut I want to check the new setup without multiple reboots (the system is in heavy use). I came across Boot Info Script which shows a lot of detail about the boot setup, including what I wanted to know:=> Grub2 (v1.99) is installed in the MBR of /dev/sdg and looks at sector 34 of the same hard drive for core.img. core.img is at this location and looks in partition 2 for ??.Now If I make sure all the right UUID values are in /boot/grub/load.cfg, /boot/grub/grub.cfg and /etc/fstab, the new disk should boot fine. Update: No it didn't, I got an error about the UUID in load.cfg, but I could continue grub2 with manual commands. I reran grub-install which strangely enough removed load.cfg completely. But afterwards the raid-array booted nicely.