0

I had Windows 7 and Ubuntu on my hard drive working without any problems, but after installing a program called "Acronis True Image" and using its "try and decide" function, I lost GRUB.

How do I recover the Ubuntu installed on my hard drive? Do I use my USB device or CD?

Edit: Ok, thanks for your answers, but I think I was not very clear ... happens every time I run the application "Try and decide" from "Acronis True Image" I lose the GRUB, what I want is to boot the ubuntu operating system on my computer from my USB Device whenever I need it without having to restore the GRUB increasingly

  • See http://askubuntu.com/questions/88384/how-can-i-repair-grub-how-to-get-ubuntu-back-after-installing-windows for various ways to reinstall GRUB or repair GRUB. – user68186 Jan 08 '14 at 21:04
  • Ok, thanks for your answers, but I think I was not very clear ... happens every time I run the application "Try and decide" from "Acronis True Image" I lose the GRUB, what I want is to boot the ubuntu operating system on my computer from my usb drive each time you need without having to restore the GRUB increasingly – Guillermojortizr Jan 08 '14 at 21:22
  • You can install GRUB in the USB drive. Then set put the USB as the first device in BIOS> Boot priority. That way, if the USB is plugged in, it will show GRUB and let you choose Ubuntu. If the USB device is not plugged in, it will boot Windows. – user68186 Jan 08 '14 at 22:05
  • Apparently Acronis nuke the bootloader (GRUB) each time you do that. I don't think this is related to Ubuntu and must consult the manual of Acronis to make sure that that's the desired/designed behavior. If it isn't report it to Acronis. – Braiam Jan 09 '14 at 02:06

1 Answers1

0

To recover Windows 7, you can follow the instructions at Ubuntu boots to grub rescue : Use the Windows Repair Disk to boot into a command prompt on Windows 7 and then run the following commands:

bootrec.exe /FixMbr

Then, to recover Ubuntu, you can follow the instructions at Ubuntu boots to grub rescue :

Boot from a liveCD or a LiveUSB.

Confirm the partition number of your main partition. GParted can help you here. I'm going to assume in this answer that it's /dev/sda2, but make sure you use the correct partition number for your system!

Mount your partition after making sure your hard drive IS /dev/sda2:

sudo mount /dev/sda2 /mnt  # make sure that sda2 is correct!

Bind mount some other necessary stuff:

for i in /sys/proc/run/dev; do sudo mount --bind "$i" "/mnt$i"; done

chroot into your Ubuntu install:

sudo chroot /mnt

At this point, you're in your install, not the live CD, and running as root. Update grub:

update-grub

If you get errors, go to step 7. (Otherwise, 7 is optional.)

Depending on your situation, you might have to reinstall grub:

grub-install /dev/sda
update-grub 

I'm not sure if this is necessary, but it doesn't hurt. If everything worked without errors, then you're all set:

exit
sudo reboot

At this point, you should be able to boot normally.

K7AAY
  • 17,202