Re: HOWTO: Restore GRUB (if your MBR is messed up)
Pelsia, I highly recommend that you install Windows (or whatever OS) INSIDE Ubuntu via VirtualBox. The advantages of doing this are numerous. One good thing is, you do not have to shut down Ubuntu to boot into Windows just to run a not-so-commonly-used program - you simply start up VirtualBox and boot up Windows inside Ubuntu and do your things.
You will experience some issues with USB devices. Read my blog for these issues and how to solve them:
http://gain4you.net/217/run-windows-...nux-desktop-os
I just documented that for myself - in case I forget it myself :-)
Re: HOWTO: Restore GRUB (if your MBR is messed up)
Thanks for these great contributions.
Unfortunately, before stumbling onto this thread I found another one that proved less than reliable. Result: total loss of all my data.
It really is a pretty dumb oversight of developers not to include a "grub restore" option on the boot disk. Especially given the innevitability of having grub wiped by the innevitable windows reload.
Its this kind of oversight that must make users wary of trying to set up dual boot systems.
Re: HOWTO: Restore GRUB (if your MBR is messed up)
Just installed windows vista over Ubuntu 9.10..
So there's no GRUB. But the only Live CD i could find is Ubuntu 8.04 LTS.
Would that be OK if i install GRUB using this live cd of version 8.04 over 9.10 ?
Re: HOWTO: Restore GRUB (if your MBR is messed up)
vnbuddy,
This solution worked for me. Thanks! I upgraded from 9.10 this morning and think I made the wrong choice, during the upgrade as to where grub should be installed. Doh!
Re: HOWTO: Restore GRUB (if your MBR is messed up)
Quote:
Originally Posted by
levis lover
Just installed windows vista over Ubuntu 9.10..
So there's no GRUB. But the only Live CD i could find is Ubuntu 8.04 LTS.
Would that be OK if i install GRUB using this live cd of version 8.04 over 9.10 ?
I don't think it'll work, 8.04 uses the legacy grub whereas 9.10+ use grub2... but i might be wrong, and if i am please do excuse me..
Re: HOWTO: Restore GRUB (if your MBR is messed up)
Sorry for the necro, but this topic needs updating. What's the latest method for restoration of grub with 10.04.2 LTS / Windows XP dual boot. Windows boots, from the start up menu, Ubuntu does not. Solution concisely, please, if at all possible. It is unknown ground for me. Thanks.
EDIT:
Never mind. Fixed it. For info, used the Debian 6.0.0 i386 Live CD, in rescue mode. Works fine.
Re: HOWTO: Restore GRUB (if your MBR is messed up)
Here are the few steps in which you can install Grub from CD
1.Boot from the Ubuntu Desktop
2. In Terminal tpye sudo fdisk -l .
It will display all partiton of the disk.
3. Mount the ubuntu partition drive
sudo mount /dev/sdXX /mnt
4.Only if you have a separate boot partition:
sudo mount /dev/sdYY /mnt/boot.
5. Mount the virtual filesystems:
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
6. To ensure that only the grub utilities from the LiveCD get executed, mount /usr
sudo mount --bind /usr/ /mnt/usr
sudo chroot /mnt
7. update-grub
or update-grub2
8.Now reinstall Grub
grub-install /dev/sdX (eg. grub-install /dev/sdaDo not specify the partition number.
9. Verify the install
sudo grub-install --recheck /dev/sdX
10. Exit chroot : CTRL-D on keyboard.
11. Unmount virtual filesystems:
sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt/sys
12. Unmount the LiveCD's /usr directory:
sudo umount /mnt/usr
13. Unmount last device:
sudo umount /mnt
14. Reboot.
sudo reboot.
Re: HOWTO: Restore GRUB (if your MBR is messed up)
THE METHOD I'M ABOUT TO SHOW YOU CAN BE DONE FROM:
. A LIVE DISK/CD/DVD
. A LIVE USB
. ANY OTHER LIVE MEDIA
. AN INSTALLED VERSION OF UBUNTU
The absolute EASIEST WAY, to (re)install GRUB is to use a little program called Boot-Repair. It does all that work to do with commands in the Terminal to reinstall GRUB for you, and it's really noob friendly, with a simple GUI, that you merely have to indicate which OS you want as your main Operating System etc, IF YOU WANT TO! This is all under advanced options, but really, it's not so advanced, anyway to get Boot-Repair:
Do this in the Terminal:
Code:
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update && sudo apt-get install -y boot-repair-ubuntu
Now, run the program (search for it in Unity, or go to: System ----> Administration ----> Boot Repair, in Gnome 2/ Classic Mode in 11.04 Natty Narwhal)
Then, once the program is done reinstalling GRUB (should take at max 2 minutes), do this:
This is probably not necessary, but it will just eradicate the potential for any errors, whatsoever!
Info for this can be found by:
a) going to: https://help.ubuntu.com/community/Boot-Repair
b) messaging me here.
Hope this helped...
x-D :guitar:
Re: HOWTO: Restore GRUB (if your MBR is messed up)
Forgive me if this has already been mentioned, but Rescatux has saved my GRUBby butt on more than one occassion!
Highly recommended... http://www.supergrubdisk.org/rescatux/
Re: HOWTO: Restore GRUB (if your MBR is messed up)
Quote:
Originally Posted by
x-D
THE METHOD I'M ABOUT TO SHOW YOU CAN BE DONE FROM:
. A LIVE DISK/CD/DVD
. A LIVE USB
. ANY OTHER LIVE MEDIA
. AN INSTALLED VERSION OF UBUNTU
The absolute EASIEST WAY, to (re)install GRUB is to use a little program called Boot-Repair. It does all that work to do with commands in the Terminal to reinstall GRUB for you, and it's really noob friendly, with a simple GUI, that you merely have to indicate which OS you want as your main Operating System etc, IF YOU WANT TO! This is all under advanced options, but really, it's not so advanced, anyway to get Boot-Repair:
Do this in the Terminal:
Code:
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update; sudo apt-get install -y boot-repair
Now, run the program (search for it in Unity, or go to: System ----> Administration ----> Boot Repair, in Gnome 2/ Classic Mode in 11.04 Natty Narwhal)
Info for this can be found by:
a) going to:
https://help.ubuntu.com/community/Boot-Repair
b) messaging me here.
Hope this helped...
x-D :guitar:
Hello
little update:
- the package to install is now "boot-repair" (not "boot-repair-ubuntu").
- And i confirm Boot-repair automatically does grub-update, so doing it manually is not necessary.