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.

I just installed ubuntu 12.04 using a different partition for the /boot (I don't know why exactly I did this, I remembered reading somewhere on the web about this). The thing is that after this operation, the grub is not showing at boot, so the computer is loaded directly into windows. The partitions available on my hdd look something like this:

  • ubuntu partition -> mounted /
  • swap area partition
  • ubuntu boot partition -> mounted /boot
  • windows partiton
  • windows system reserved partition (was created automatically)

What should I do in order to have grub showing at boot ? I searched for this kind of issues on the internet (including this website) and found that I could boot using a live cd and install a program called Boot-Repair and try using it to fix the problem. I'm thinking also of booting using the live cd and from a terminal to reinstall grub using another partition (the main /dev/sda I suppose).

What do you think ? What is the proper solution for this situation ? Perhaps editing the grub config file would be another option (I don't know exactly how, but it could work) ?

EDIT:

Since an internet connection wasn't available so I could install the Boot-Repair, what I did was the following:

  • Booted using a live CD and went to a terminal
  • mounted the ubuntu install partition, the initial separated /boot partition and also the /sys, /proc, /run, /dev
  • chrooted into the ubuntu install
  • reinstalled the grub using /dev/sda as location
  • updated grub

At this point the grub update said it detected two linux images, one free dos and another windows system. I thought everything was fine, so I restarted the computer. But when the grub shows up, there are only two options to select from, the free dos and the windows.

What did I do wrong ?

share|improve this question

3 Answers 3

Try this:

  1. Boot from an Ubuntu Live CD and go to terminal by pressing Ctrl+Alt+T.
  2. Install GRUB specifying the boot partition like this:

    sudo mount /dev/sdaN /mnt

    sudo grub-install –boot-directory=/mnt/boot /dev/sda

assuming /dev/sda is your primary drive and N is the /boot partition number.

If it does not work try the boot-repair method listed elsewhere.

Hope this helps

share|improve this answer
    
I did this (using --boot-directory, since -root-directory wasn't a valid option), did an update-grub also, but now I ended up with the grub command line (or something) each time I boot the computer. It is not displaying the os selection menu, it is just the grub, but in a command line environment :| –  misterjinx Sep 20 '12 at 6:11
    
I am not sure what the problem is now. Try the boot-repair from liveCD as described in the link above and see if that improves anything. –  user68186 Sep 20 '12 at 12:35
    
I updated the question with more info on what I did to fix the issue, but was just partially resolved. Thanks. –  misterjinx Sep 21 '12 at 6:54
up vote 1 down vote accepted

I finally succeeded repairing the boot using the Boot-Repair utility.

share|improve this answer

I'm thinking also of booting using the live cd and from a terminal to reinstall grub using another partition (the main /dev/sda I suppose).

I believe you have answered your own question. /dev/sda is the Master Boot Record of your drive. If at install you chose to install GRUB to the /boot partition (/dev/sda?), then the Windows bootloader is still remaining on the MBR. This is why it just boots straight through to Windows. Which ever bootloader is installed to the MBR is the one that your bios will launch. Once you have installed GRUB to /dev/sda and run sudo update-grub all your installed OSes should be added to the GRUB menu. Then just reboot and your GRUB menu should pop up automatically.

share|improve this answer
    
I reinstalled the grub as pointed by user68186, updated the grub, but now all I got when booting the computer is the grub command line, not a selection of operating systems. what can I do to fix this ? –  misterjinx Sep 20 '12 at 6:13

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.