Problem running Ubuntu 11.10 alongside Windows 7

Asked by Daria An

During the installation, I chose Ubuntu to be installed alongside Windows 7 and didn't change the space the system chose to be reserved for Ubuntu. The installation appeared to be uneventful, but after reboot there was only Windows 7 available for booting, while Linux hasn't even been listed there. Windows loaded Ok and the hard drive was missing the exact space reserved for Ubuntu. Well, I would understand it if there were some obvious errors during installation process, but everything seemed to be Ok. Is there any chance to restore the reserved space on hard drive? Maybe just to try another Ubuntu version? Thanks in advance.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu ubiquity Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Chris (fabricator4) said :
#1

It sounds like grub has not been installed and configured correctly. Here's the instructions for fixing grub:

=================8<----------------------------------------
What you need to do is boot the LiveCD and chroot into the Ubuntu system, then re-install grub2

First thing to do is identify what the device name of the Live file system is. In most cases this will be /dev/sda, especially if it's the only hard drive in the computer.

A little more complicated is to identify which partition Ubuntu lives on. This will depend on exactly how you installed Ubuntu so it's best to check and be sure. Once you've booted the LiveCD use either Disk Manager or Gparted to look at the hard drive and identify the Ubuntu root (/) partition that you set up. You would be looking for an ext4 partition of the correct size.

For the purposes of these instructions I'm going to assume the correct device (drive) is /dev/sda and that the partition is /dev/sda3. You should substitute the correct device names as appropriate.

Firstly, open a terminal windows and mount the Ubuntu root partition:

sudo mount /dev/sda3 /mnt

Next, export the LiveCD filesystem to the root filesystem on the drive:

sudo mount ‐‐bind /dev /mnt/dev
sudo mount ‐‐bind /proc /mnt/proc
sudo mount ‐‐bind /sys /mnt/sys

Now change the root filesystem to the hard disk:

sudo chroot /mnt

Now re-install grub2 to /dev/sda:

sudo grub-install /dev/sda

Lastly, update the grub menu:

sudo update-grub

and it will find all OS's on your system and add them to the grub menu. You can now reboot and enjoy your dualboot system:

sudo reboot
=================8<----------------------------------------

Can you help with this problem?

Provide an answer of your own, or ask Daria An for more information if necessary.

To post a message you must log in.