Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Basically this tragic story has been told before around here. I installed Ubuntu on a partition on my hard drive but it corrupted my windows when it resized. Luckily for me there was a tiny factory image partition with all of windows ON it. I used that to reinstall windows back on the partition.

So on my computer I have three partitions on my harddrive: Windows Recovery Windows Ubuntu

Heres the problem: When I used the Recovery to re-install windows I am now unable to get to my ubuntu partition. I have tried all the options on the boot menu and none of them lead to Ubuntu.

How do I get to ubuntu again? I have a disk with ubuntu installed on it.

share|improve this question
    
Does RecoveringUbuntuAfterInstallingWindows in the Ubuntu wiki help at all? If not, tell us which of these steps you've tried, if any. –  frabjous Sep 3 '11 at 1:30

1 Answer 1

You will have to recover grub. That is the way I recommend:

I never got in trouble by using these instructions:
https://wiki.ubuntu.com/Grub2#Recover

First of all, you must start your system from a live cd. Then

"METHOD 3 - CHROOT

This method of installation uses the chroot command to gain access to the broken system's files. Once the chroot command is issued, the LiveCD treats the broken system's / as its own. Commands run in a chroot environment will affect the broken systems filesystems and not those of the LiveCD.

1) Boot to the LiveCD Desktop (Ubuntu 9.10 or later). Please note that the Live CD must be the same as the system you are fixing - either 32-bit or 64-bit (if not then the chroot will fail).

2) Open a terminal (Applications > Accessories > Terminal).

3) Determine your normal system partition - (the switch is a lowercase "L")

sudo fdisk -l

If you aren't sure, run

df -Th  

Look for the correct disk size and ext3 or ext4 format.

4) Mount your normal system partition:

Substitute the correct partition: sda1, sdb5, etc.

sudo mount /dev/sdXX /mnt  

Example: sudo mount /dev/sda1 /mnt

5) Only if you have a separate boot partition: sdYY is the /boot partition designation (for example sdb3)

sudo mount /dev/sdYY /mnt/boot 

6) Mount the critical virtual filesystems:

sudo mount --bind /dev  /mnt/dev
sudo mount --bind /dev/pts  /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys  /mnt/sys 

7) Chroot into your normal system device:

sudo chroot /mnt 

8) If there is no /boot/grub/grub.cfg or it's not correct, create one using

update-grub 

9) Reinstall GRUB 2:

Substitute the correct device - sda, sdb, etc. Do not specify a partition number.

grub-install /dev/sdX 

10) Verify the install (use the correct device, for example sda. Do not specify a partition):

sudo grub-install --recheck /dev/sdX 

11) Exit chroot: CTRL-D on keyboard

12) Unmount virtual filesystems:

sudo umount /mnt/dev/pts
sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt/sys 

13) If you mounted a separate /boot partition:

sudo umount /mnt/boot 

14) Unmount the LiveCD's /usr directory:

sudo umount /mnt/usr 

15) Unmount last device:

sudo umount /mnt 

16) Reboot.

sudo reboot 
"

share|improve this answer
    
Doesn't that Windows recovery thing recreate the partition table though? –  Jo-Erlend Schinstad Sep 3 '11 at 3:39
    
It seems like yes. –  desgua Sep 3 '11 at 9:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.