Ubuntu will only boot off of a USB

I installed Ubuntu 12.04 today from a USB and the install went fine ( I replaced Windows XP with it). But when I tried to restart my computer nothing happened; a couple of minutes later I tried booting it from the USB again and it launched the installed version of Ubuntu. I can remove my USB after that point. Is there anyway for it to boot from just the hard drive or will I keep on having to boot from my USB all the time?


Solution 1:

In case the link fails one day, here's what the great hero wilee-nilee* said (these directions solved the same problem on my notebook, too!):*

----Originally Posted by wilee-nilee----

Sounds like you have the grub bootloader installed in the usb's master boot record rather than the HD you installed Ubuntu to.

Since you can get to the Ubuntu install boot to it and run these commands. The first is to identify the HD.

sudo fdisk -l

You will see something like this, yours will show the the usb as well.


Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1209d5dd

   Device  | Boot   |  Start      | End        | Blocks    | Id  | System
/dev/sda1  | *      |  2048       |  83015679  | 41506816  |  7  | HPFS/NTFS/exFAT
/dev/sda2  |        |  83015680   | 150210559  |  33597440 |  7  | HPFS/NTFS/exFAT
/dev/sda3  |        | 150212606   | 312580095  | 81183745  | 5   | Extended
/dev/sda5  |        |  150212608  |  212791295 |  31289344 |  83 | Linux
/dev/sda6  |        |  212793344  |  242360319 |  14783488 |  83 | Linux
/dev/sda7  |        |  242362368  |  308369407 |  33003520 |  83 | Linux
/dev/sda8  |        |   308371456 |  312580095 |   2104320 |  82 | Linux swap / Solaris

Now I can see that my HD is actually sda, and the partitions have sda and a number like sda1.

sda is the master boot record area. So Identify the HD and then run this command to load grub to your mbr, I will use sda in this command make sure you use the letter for your HD,

sudo grub-install /dev/sda

Then run this to update grub and reboot and grub should show if the HD is first in the boot order in the bios.

sudo update-grub

----end of wilee-nilee's quote----

(for clarity) last step = first give the command 'sudo update-grub', and after that reboot!

(don't copy the numbers behind sda, sdb etc. : HD's 'identification' is just the three letters, without the number.