PDA

View Full Version : [ubuntu] Whoops - where is grub?



bigalxyz123
June 12th, 2011, 03:42 AM
Hello forum,

I have a Toshiba Satellite Pro laptop, about 2 years old.

For some time it has been running in a dual-boot configuration, Windows 7 and Ubuntu (currently 11.04).

My Windows partition started to have lots of problems - slow running, crashing, updates not installing, etc. so I decided to reinstall W7 from scratch. At the moment it's running fine. Unfortunately the grub bootup screen has disappeared - the laptop just boots up to Windows now, and that's that. I can't run Ubuntu and I can't access the Ubuntu partition from Windows (in order to retrieve some important files).

HELP! Is there a simple solution to this problem?

Many thanks,

Alan.

wojox
June 12th, 2011, 04:02 AM
Easiest way I've found is to reinstall Grub2 from a Live-CD (https://help.ubuntu.com/community/Grub2#Copy%20LiveCD%20Files)

Quackers
June 12th, 2011, 04:05 AM
Yes, you can boot from the live cd and select "try Ubuntu" then re-install grub to the mbr of the hard drive.
First you will need to identify which partition is your Ubuntu root partition. You can do that by opening gparted or by running in the terminal
sudo fdisk -l That's a lower case L not a 1.
Once you have identified your Ubuntu root partition you can run the following commands in the terminal - substituting your partition instead of /dev/sdXY (for example /dev/sda5) and your drive by changing /dev/sdX in the second command (eg if your root partition is /dev/sda5 then your drive would be /dev/sda).

sudo mount /dev/sdXY /mnt
sudo grub-install --root-directory=/mnt /dev/sdX If no errors are reported you can reboot and Ubuntu should boot directly.
If so, open a terminal and run
sudo update-grub when you should see the Windows Loader recognised as grub.cfg is run.

FreymanX
June 12th, 2011, 04:06 AM
Heres what I would do. I would burn a CD with Ubuntu 10.04

Then I would restart my PC and press F12 to go boot up with CD

I would make your computer all Linux

Download an .ISO Image of Windows 7 and burn it to a CD a repeat step 2

Then finally start over and dual boot all over again.

wojox
June 12th, 2011, 04:10 AM
Heres what I would do. I would burn a CD with Ubuntu 10.04

Then I would restart my PC and press F12 to go boot up with CD

I would make your computer all Linux

Download an .ISO Image of Windows 7 and burn it to a CD a repeat step 2

Then finally start over and dual boot all over again.

What???

MARP1961
June 12th, 2011, 08:55 AM
Download an iso. image of Windows 7? Have I missed something?

bigalxyz123
June 12th, 2011, 12:10 PM
@wojox/Quackers - many thanks - that worked nicely. Root partition was /dev/sda6. The only slightly unexpected thing is that I didn't need to do the final 'sudo upgrade-grub' command because upon the first reboot, the full grub screen reappeared, as if by magic, exactly as it was before.

Regards
Alan

Quackers
June 12th, 2011, 12:51 PM
Yes, update-grub is run during the process. The guide says that it may not be necessary to run it :-)
Glad everything is working now :-)