PDA

View Full Version : [SOLVED] Restoring GRUB2 Defaults



ScripterJR
April 30th, 2010, 08:37 PM
Hey guys,

I just upgraded to Ubuntu 10.04 LTS and decided to make my boot pretty but I did something I shouldn't have and now it boots weirdly and it also closes weirdly. I wanted to know if there is a possible way to restore the default settings of GRUB2. If so, could you please tell me :P

Oh, I forgot to mention, I didn't edit grub.cfg, I only edited 10_linux.

Thank you.

oldfred
April 30th, 2010, 09:17 PM
You can always totally uninstall grub2 and reinstall it. Do not reboot in between as you may never get back in.

You may want to back up the grub directories:
GRUB 2 has three main parts:

1. /etc/default/grub - the file containing GRUB 2 menu settings.
2. /etc/grub.d/ - the directory containing GRUB 2 menu creating scripts.
3. /boot/grub/grub.cfg - the GRUB 2 configuration file, not editable.

Make sure you reinstall to the correct directory probably sda.
purge old and reinstall new to sda
sudo apt-get purge grub-pc grub-common
sudo mv /boot/grub /boot/grub_backup
sudo mkdir /boot/grub
sudo apt-get install grub-pc grub-common
sudo grub-install --recheck /dev/sda
sudo update-grub

ScripterJR
April 30th, 2010, 10:22 PM
You can always totally uninstall grub2 and reinstall it. Do not reboot in between as you may never get back in.

You may want to back up the grub directories:
GRUB 2 has three main parts:

1. /etc/default/grub - the file containing GRUB 2 menu settings.
2. /etc/grub.d/ - the directory containing GRUB 2 menu creating scripts.
3. /boot/grub/grub.cfg - the GRUB 2 configuration file, not editable.

Make sure you reinstall to the correct directory probably sda.
purge old and reinstall new to sda
sudo apt-get purge grub-pc grub-common
sudo mv /boot/grub /boot/grub_backup
sudo mkdir /boot/grub
sudo apt-get install grub-pc grub-common
sudo grub-install --recheck /dev/sda
sudo update-grub

Im stuck at sudo apt-get install grub-pc grub-common. Won't let me choose which device to install GRUB on.

oldfred
April 30th, 2010, 11:07 PM
Are you getting an error message or what screen are you seeing?

oldfred
April 30th, 2010, 11:33 PM
http://ubuntuforums.org/showthread.php?t=1298932

That link is for converting grub2 to old grub but has a warning about some servers not having all the packages. You might try changing servers (system, admin, software sources) and see if that makes any difference.

ScripterJR
April 30th, 2010, 11:42 PM
http://img30.imageshack.us/i/screenshotmfa.png/http://img30.imageshack.us/i/screenshotmfa.png/

It simply won't let me choose. I tried almost every key on my keyboard.

oldfred
April 30th, 2010, 11:56 PM
I thought I had a screen like that when I installed beta. You should only select sda. But I thought I just put an x in the box?? I worked for me. If you can skip this screen then you can manually install it, which I think the commands I already gave did.

If grub & grub common installed ok and it is just running the update exiting should be ok but then you still have to manually install:

sudo grub-install /dev/sda
If that returns any errors run:
sudo grub-install --recheck /dev/sda
Then:
sudo update-grub

ScripterJR
May 1st, 2010, 03:27 PM
That did the job thanks a lot :P I still think GRUB2 should have a command to restore defaults :D