[Boot direct Windows] Dual boot does not work -> PC boots only to windows (after Ubuntu 10.10 installation)

Asked by Dvir

I have installed Ubuntu 10.10 from a CD.
it's installed in parallel to Windows XP (prof).
I have two Hard disks, and I've chosen to partition the main one, where Windows is installed.
After installation was completed, without showing any errors, it starts with Windows XP, instead of allowing me to chose between the two.
I can see that the disk has been partitioned since Windows only sees its' part.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Solved by:
Dvir
Solved:
Last query:
Last reply:
Revision history for this message
Nitesh Mistry (mistrynitesh) said :
#1

Before answering the question, I would just like to know whether you installed windows after installing ubuntu?

Revision history for this message
Dvir (darpus) said :
#2

Windows was already installed when I tried out and then installed ubuntu 10.10.

Revision history for this message
Nitesh Mistry (mistrynitesh) said :
#3

Seems like you need to reinstall grub. Follow instruction mentioned on the page linked below:

https://help.ubuntu.com/community/Grub2#Reinstalling%20GRUB%202

Revision history for this message
Dvir (darpus) said :
#4

I'll try reinstalling GRUB2 this afternoon.
Thank you.

Revision history for this message
Dvir (darpus) said :
#5

Hi,
I did not succeed in reinstalling grub.
Here's what I've done:
* fdisk -l to find the ubuntu partition.
* mount of that partition
* executed "sudo grub-install --root-directory=/mnt/ /dev/sdb5"
However, this last part did not succeed. I got a warning saying I shouldn't do that, and that I should use "force" and give it some more flags.

I tried to do method 2:
But I couldn't find the relevant folders under the desired location. I could find /media/<something>/<lots of letters> which I think matches the ubuntu partition, but it didn't have the bin, boot, and other directories in it.
I tried to run a similar command to this anyway:
sudo grub-setup -d /media/7848138a-41a0-4eba-8aed-d1b625ac8759/boot/grub /dev/sdb5
But it saied that it couldn't find the device.

I didn't try method 3.

Do you think it would be a good idea to try and disconnect the 2nd hard disk, and reinstall ubuntu?
What would happen to the partitioning that it did the previous time? (I know it took place, because Windows can only see its' partition).

Thanks.

Revision history for this message
delance (olivier-delance) said :
#6

If you boot directly into Windows, it means that your first bootable disk is Windows one and you failed to install Grub2 on its MBR...and it's a good news! It will allow us to choose a better way.
To avoid modifying your Windows disk (which was, I presume, your goal), make Windows second disk in boot order. Depending of your motherboard, you can modify setup of BIOS or physically switch SATA cables.

Now try first to boot.

If you boot on Ubuntu disk, but you haven't Windows, run command
     sudo update-grub
and reboot.

If you don't boot, you'll have to reinstall Grub2.
Your Ubuntu disk should be sda ("should" as we see now strange way of enumerating disk in 10.10).
Command should be:
   sudo mount /dev/sda1 /mnt # if sda1 contains folder "/boot"
   sudo grub-install --root-directory=/mnt/ /dev/sda

Revision history for this message
Dvir (darpus) said :
#7

Here's what finally worked, and what I think was the reason:

Since I have 2 hard disks, I assumed that boot loader (grub2) was installed on the wrong disk.
The partitioning worked fine on the disk I wanted.

I simply disconnected the 2nd HD (without the partitioning) and installed ubuntu again, where I manually chose the partition I wanted to install to (the one created in the 1st installation), and indicated that grub2 should be installed on that disk.
That's it -> now I have the two OS present on the same HD, and I can chose between the two during startup.

Note: reconnecting the 2nd HD is problematic, since grub cannot recognize the original disk once this is done (I assume the ID is changed for some reason), but I can live with that.

Revision history for this message
Nitesh Mistry (mistrynitesh) said :
#8

>Note: reconnecting the 2nd HD is problematic, since grub cannot recognize the original disk once this is done (I assume the >ID is changed for some reason), but I can live with that."

Not entirely sure of this, but you can try to exchange the sockets on the motherboard where the hds are connected. Try to grab some information on master/slave configuration of your hdds and BIOS. That might help.

Revision history for this message
Nitesh Mistry (mistrynitesh) said :
#9

Off-course delance already suggested it. :)