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

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,705