Monday, April 11, 2011

(Re)Install grub lvm raid

Assume: Reinstalled grub after windows to boot a raid called Linux

1. Boot into a live disc
2. Install mdadm and lvm2
3. Probe modules
  • $sudo modprobe raid5 dm-mod
4. Assemble raid array
  • $sudo mdadm --assemble --scan
5. Mount array from either /dev/*RAIDNAME* or /dev/mapper/*PARTITIONNAMES*
  • $sudo mount /dev/Linux/UbuntuRoot /mnt
  • #If you have a seperate /boot
  • $sudo mount /dev/Linux/UbuntuBoot /mnt/boot
6. Mount and bind system resources
  • $sudo mount --bind /dev /mnt/dev
  • $sudo mount --bind /proc /mnt/proc
  • $sudo mount --bind /var /mnt/var
  • $sudo mount --bind /sys /mnt/sys
  • $sudo mount --bind /dev/pts /mnt/dev/pts
7. Copy Internet connection settings to mnt
  • $sudo cp /etc/resolv.conf /mnt/etc/
8. Chroot into existing raid/lvm
  • $sudo chroot /mnt
9. Update and remove grub
  • $sudo apt-get update
  • $sudo apt-get remove grub-pc --purge
10. When finished install grub-pc which will scan for partitions
  • $sudo apt-get install grub-pc
It will try to ask for email information, just hit enter for default.

11. Pick which drives to install grub onto
12. $exit
$exit

No comments:

Post a Comment