I'd try one of two things (or try the first and if it fails try the second) before reinstalling:
#1: Physically reinstall grub2 (packages and all).
#2: Revert to legacy grub.
To update the package list and remove/install packages we need to add a few steps to the mount & chroot. Look here please for full explanation:
http://ubuntuforums.org/showpost.php...2&postcount=10
Whether you choose option #1 or #2 first make sure we're properly mounted, etc:
Code:
sudo umount /mnt/dev/pts && sudo umount /mnt/dev && sudo umount /mnt/proc && sudo umount /mnt
Yes those steps are to unmount but I want to know if that returns any errors, if so refer to the aforementioned link about individual commands to properly unmount.
Then mount and chroot:
Code:
sudo mount /dev/sda1 /mnt && sudo mount --bind /dev /mnt/dev && sudo mount --bind /proc /mnt/proc && sudo mount --bind /dev/pts /mnt/dev/pts && sudo cp /etc/resolv.conf /mnt/etc/resolv.conf && sudo chroot /mnt
Code:
dpkg-divert --local --rename --add /sbin/initctl
Code:
ln -s /bin/true /sbin/initctl
Now, just to gather more info about partitions:
and:
Code:
parted /dev/sda print
Then backup the old grub folder and create a new one:
Code:
mv /boot/grub /boot/grub_backup
Then purge grub2:
Code:
apt-get --purge remove grub-pc grub-common os-prober
Now if you chose option #1 only if you want to give grub2 another try:
Code:
apt-get update && apt-get install grub-pc
Code:
grub-install /dev/sda
If that appeared to succeed or you just want to see if the system will boot:
Code:
sudo umount /mnt/dev/pts && sudo umount /mnt/dev && sudo umount /mnt/proc && sudo umount /mnt
If you chose to try option #1 and it failed mount & chroot again and we'll try legacy grub:
Code:
sudo mount /dev/sda1 /mnt && sudo mount --bind /dev /mnt/dev && sudo mount --bind /proc /mnt/proc && sudo mount --bind /dev/pts /mnt/dev/pts && sudo cp /etc/resolv.conf /mnt/etc/resolv.conf && sudo chroot /mnt
Code:
dpkg-divert --local --rename --add /sbin/initctl
Code:
ln -s /bin/true /sbin/initctl
Then once again backup the old grub folder and create a new one (I'm assuming that /boot/grub_backup has already been used):
Code:
mv /boot/grub /boot/grub_backup2
Code:
apt-get --purge remove grub-pc grub-common os-prober
Code:
apt-get update && apt-get install grub
You'll be asked if you want to create a /boot/grub/menu.lst - yes, you do, so type y and enter!
Code:
grub-install /dev/sda
Now we need a grub shell:
Code:
find /boot/grub/stage1
Should show (hd0,0) so:
Code:
sudo umount /mnt/dev/pts && sudo umount /mnt/dev && sudo umount /mnt/proc && sudo umount /mnt
And if all went well you should have a bootable OS.
Is that clear as mud? Maybe I should have separated the steps for option #1 and #2 better
Sometimes I almost confuse myself
Bookmarks