PDA

View Full Version : [SOLVED] Grub2 Error



Penguin Guy
April 5th, 2010, 04:26 PM
I upgraded Grub Legacy to Grub2 and it was giving me an error 15 when I booted. I finally found out that for some reason grub2 wasn't properly installed. Here's how you install it if you can't gain access to the system. If you can gain access to the system, skip to step 3.


Boot into the live CD
Chroot into the real system

Find which partition the real system is installed on with sudo fdisk -l
Make a directory to mount it at with sudo mkdir -p /mnt/computer
Change to that directory with cd /mnt/computer/
Mount it with sudo mount /dev/sd?? /mnt/computer/
Link /dev/ and /proc/ with sudo mount -B /dev/ /mnt/computer/dev/ & sudo mount -B /proc/ /mnt/computer/proc/
Change root with sudo chroot /mnt/computer/

Make sure grub2 is up-to-date with update-grub2
Install grub2 to the MBR on one of your drives with grub-install /dev/sd? (if you only have one, it'll be /dev/sda)

stlsaint
April 5th, 2010, 04:28 PM
You say you 'installed' grub2...does that mean you originally had legacy and wanted to go up to grub2?

Penguin Guy
April 5th, 2010, 04:33 PM
You say you 'installed' grub2...does that mean you originally had legacy and wanted to go up to grub2?
Yes, I upgraded from Grub Legacy to Grub2. Sorry for not making myself clear.

oldfred
April 5th, 2010, 06:24 PM
Error 15 often means grub2 is confused with grub legacy. When in your chroot did you total uninstall old grub and do a full re-install of grub2?

#purge old and reinstall new to sda
apt-get purge grub grub-pc grub-common
mv /boot/grub /boot/grub_backup
mkdir /boot/grub
apt-get install grub-pc grub-common
apt-get install --reinstall grub-pc
grub-install /dev/sda
grub-install --recheck /dev/sda
update-grub