Ubuntu won’t boot without USB stick

Ubuntu SplashAs some of you may remember, a few weeka ago I posted an article about installing Ubuntu from USB (If you can’t remember, check it out!), which explained how to get an ISO running on a machine without an optical device. Well it turns out that wasn’t entirely the end of the situation for some…

Ubuntu wont boot – black screen?

It seems that there is a bug in Precise Pangolin which means that if you install your OS from a USB flash disk or hard drive, the important grub screen sometimes gets installed back onto this device.

If this is the case, Ubuntu won’t boot and a black screen is all you’ll see when you boot without the USB disk in the machine. You may have a flashing white character in the top left too. Both of these mean the computer is waiting to receive instructions on what operating system it should load. Sadly, it should get this information automatically via the grub screen.

Fixing Ubuntu’s boot problem

To solve this problem, first off open up terminal and run the following:

sudo fdisk -l

(Thats a lowecase L, not a 1)

This will show you the partition tables on your machine.

The screen shot below shows what my partition table looked like:

Ubuntu Partition Table

The important thing to notice is what your hard drive is called. Using the information I can see my 250Gb drive is the disk labelled /dev/sda, which is what I’d expect. SD* are mass storage devices and they’re labelled in order, so SDA is the primary one it found, SDB is the secondary, aka my USB disk.

Now simply run this command, replacing “/dev/sda” with the disk label your system is running on.

sudo grub-install /dev/sda

Hopefully you’ll see this message: Installation finished. No error reported.

At this point, shut down the machine and remove your USB device.

Booting the machine should now use the new master boot record, MBR, and find the new grub scripts installed on your hard drive.

Hopefully you’ll boot straight into Ubuntu without your USB being plugged in now.

Phew!

Hope this helps you out

12 thoughts on “Ubuntu won’t boot without USB stick

  1. Sir, please help me out
    My Ubuntu is not booting and not running without USB if I remove my USB Ubuntu closes instantly with it
    I tried your way
    But it says fdisk-l not found

    I have Samsung r528 laptop
    And 18.04 Ubuntu

    1. Sir I didn’t it again with fdisk- l everything happened it said that no error reported

      Then I restarted my laptop
      But without USB it still not happening

      I am thinking of reinstalling it

      It is very nice of you to helping me so much

      Thank you

    2. Sir I did it again with space
      Everything happened, this message also came up installation finished no error reported
      I shut down my laptop and
      Now this message came up

      “error : no such device: c029a1aa-8897-4b23-9daa-d4b536da4d33.
      error: unknown filesystem.
      Entering rescue mode…
      Grub reascue> _ ”

      And nothing happening

  2. Thank Yu very much sir. U r a genius. I was about to reinstall ubuntu, but Yu saved lot of my time. Thanks a lot again

Leave a Reply to nick Cancel reply

Your email address will not be published. Required fields are marked *