Stupid Ubuntu – Grub recovery on RAID

I definitely hate Ubuntu, is not linux.

root@ubuntu:~# cd /mnt
root@ubuntu:/mnt# mkdir md1
root@ubuntu:/mnt# mount /dev/md1 /mnt/md1/
root@ubuntu:~# mount -o bind /sys /mnt/md1/sys
root@ubuntu:~# mount -o bind /dev /mnt/md1/dev
root@ubuntu:~# mount -o bind /proc /mnt/md1/proc
root@ubuntu:~# chroot /mnt/md1 /bin/bash

root@ubuntu:~# ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 9 2012-02-05 11:00 455c4bdc-37d5-46ef-bb8b-d5b50c9e4e9a -> ../../md1

root@ubuntu:/# vim /boot/grub/grub.cfg

root@ubuntu:/# update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-33-generic-pae
Found initrd image: /boot/initrd.img-2.6.32-33-generic-pae
Found linux image: /boot/vmlinuz-2.6.32-28-generic-pae
Found initrd image: /boot/initrd.img-2.6.32-28-generic-pae
Found memtest86+ image: /boot/memtest86+.bin
done
root@ubuntu:/# grub-install /dev/sda
Installation finished. No error reported.
root@ubuntu:/# grub-install --recheck /dev/sda
Installation finished. No error reported.

root@ubuntu:/# cfdisk /dev/sda

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.