How to fix “No bootable device” after Ubuntu installation

When installing Ubuntu on a disk partitioned with a GUID partition table (GPT), the Ubuntu installer doesn’t set the boot flag correctly on the partitions, and on computers with older bioses (like my Intel ICH9 board), the BIOS will not recognize the disk as bootable and will refuse to start the boot loader, claiming that “No bootable device found”.

The solution is to set the boot flag on the boot partition (the real one in the GPT) as well as on the “protective MBR partition”:

  1. Start your computer with the Ubuntu live CD again, and select “try Ubuntu before installing”
  2. When the Ubuntu desktop loads, open the dash and start “gparted”
  3. When gparted starts, select your boot drive and from that select your boot partition – usually the first Linux partition on the drive, and right click it and select “flags” in the menu. In the flags dialog check “boot”.
  4. Open the dash again and start “terminal”
  5. In the terminal type “sudo fdisk /dev/sda” (or whatever your boot drive is). You’d get a bunch of warning about the disk using a GPT scheme – ignore them. type “a” to set the bootable flag and choose partition “1”. Finally type “w” to write out your changes.

Now its safe to reboot and your old computer should have no problem starting the boot loader now.

4 Responses to “How to fix “No bootable device” after Ubuntu installation”

  1. connor:

    Thank you very much for this.

    When I run the sudo fdisk command on my partition I get an error:

    The device presents a logical sector size that is smaller than
    the physical sector size. Aligning to a physical sector (or optimal
    I/O) size boundary is recommended, or performance may be impacted.

    When I run:

    ubuntu@ubuntu:/$ sudo fdisk -l

    WARNING: GPT (GUID Partition Table) detected on ‘/dev/sda’! The util fdisk doesn’t support GPT. Use GNU Parted.

    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disk identifier: 0x58deec22

    Device Boot Start End Blocks Id System
    /dev/sda1 1 976773167 488386583+ ee GPT
    Partition 1 does not start on physical sector boundary.

    My Ubuntu OS was working fine after install but I shut down my computer and now can’t boot back into it!

  2. Oded:

    Connor: you seem to be using an “advanced format” drive – like the new drives from WD and Segate. My system’s drive is not an “advanced format” (though several of my media drives are), so I wasn’t aware of this issue.

    Setting the boot flag on the protective MBR record is what probably broke your system. Possibly only the GRUB boot code was broken or the entire MBR should be recreated.

    To fix, try following the procedure in http://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd

    If that doesn’t work, try to recreate the MBR by starting the Ubuntu LiveCD, going into the terminal, running gdisk on your system drive and using the option “n”.

  3. connor:

    Okay thank you for the tutorial link. It was going good but this is my new error (following their steps):

    ubuntu@ubuntu:~$ sudo chroot /mnt
    root@ubuntu:/# grub-install /dev/sda
    /usr/sbin/grub-setup: warn: This GPT partition label has no BIOS Boot Partition; embedding won’t be possible!.
    /usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
    /usr/sbin/grub-setup: error: will not proceed with blocklists.
    root@ubuntu:/# grub-install –recheck /dev/sda
    /usr/sbin/grub-setup: warn: This GPT partition label has no BIOS Boot Partition; embedding won’t be possible!.
    /usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
    /usr/sbin/grub-setup: error: will not proceed with blocklists.

    • connor:

      okay, got rid of this error by changing the flag on my partition to ‘bios_grub’ and continued with the installation steps and everything went fine. However, when I rebooted all I get is a blinking white underscore!!

Leave a Reply