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

Re: Update GRUB to GRUB2 / Lenny to Squeeze



lrhorer wrote:

> 
>         I upgraded a box from "Lenny" to "Squeeze", but the update of
>         GRUB to
> GRUB2 failed.

        I've cobbled together a procedure which I think will work and which is
(I hope) safe:

1.  Comment out the entries for /dev/md1 in /etc/fstab 
and /etc/mdadm/mdadm.conf, and reboot the system.

2.  Mount /dev/hda1 to /boot.

3.  Upgrade GRUB, which should now understand both /etc/fstab
and /boot/grub/menu/lst.

4.  Reboot to make sure it works.

5.  Edit /boot/grub/grub.cfg and /boot/grub/device.map to let GRUB2 know
it should be booting from an array and to make sure it is loading the
RAID1 module.

6.  Umount /boot and create a new 1.0 superblock RAID1 array using only
/dev/hda1 and a missing member.  Mount the new array as /boot.

7.  Add the new array info into /etc/mdadm/mdadm.conf and
change /etc/fstab back to mount /dev/md1.

8.  Run update-initramfs to copy the new configuration into initrd.

9.  Reboot and make sure GRUB2 can now boot into the new array.

10. Add /dev/hdb1 into the new array, and re-sync the array.

11. Update /etc/mdadm/mdadm.conf with the full array info, getting rid
of the missing member, and remove the reference to the old array
altogether.

12. Run the GRUB update routine to remove the chain-load from GRUB
legacy.

13. Run update-initramfs to copy the final configuration into the initrd
(if GRUB update doesn't already do it.)

        I should be able to easily back out of the procedure at any point up to
step 10 if something goes wrong.  I'm a bit fuzzy around step 5.  Since
GRUB needs to know how to read an array, it needs the RAID module
available *BEFORE* it reads /boot/grub/device.map.  Should I run
grub-install at this point in order to load the module into the boot
loader in the MBR?  Some other utility?  What switches need to be used? 
Since the loaded man pages refer to GRUB legacy, I'm a little unsure.

        Comments?  Suggestions?


Reply to: