I have a fresh laptop with a clean hard drive. I made a bootable pen drive of Ubuntu 16.04.1 LTS and booted it to the computer. I then Installed using the install wizard on the system. it completed and asked me to restart, I restarted and everything worked wonderfully. I shut the laptop down removed the pen drive and rebooted and it said no bootable operating system was found. But when I put the pen drive back in the system started up fine. I am pretty novice and have had difficulty following some of the other solutions to this problem. I did make sure that my system was set to boot from the hard drive in BIOS but that all I have really done. Can anyone take the time to explain the process of using the terminal to program the system to boot from the hard drive like it should? I used the partitioning program when installing so it created a partition for the booting and flagged it as booting. I just need to know what code to run through to get to the solution. Any help would be appreciated

  • 1
    Can you run sudo update-grub and see if that fixes things? Check the /sys/firmware directory, if an efivars directory exists, you are in UEFI mode, in that case, did you install to the hard disk in UEFI mode? – ubfan1 Nov 9 '16 at 20:02
  • How would I run sudo update grub? – noahdukehart Nov 9 '16 at 21:10
  • Open a terminal window by pressing ctrl-alt-t. Then type sudo update-grub The system will prompt you for a password, type it in. Nothing will show while you type, the cursor will not move. Then hit enter. Then the command will run and some output will appear in the terminal window. When it has finished, power off the system, remove the USB, and power it on. – Organic Marble Nov 9 '16 at 21:41
  • /usr/sbin/grub-probe: error: failed to get canonical path of `/cow'. – noahdukehart Nov 10 '16 at 2:07
  • I got this error – noahdukehart Nov 10 '16 at 2:08

The problem is almost certainly that your GRUB installation is split across both disks -- the GRUB binary itself resides on your hard disk (either on the EFI System Partition [ESP] if the computer boots in EFI/UEFI mode or in the MBR and post-MBR sectors if the computer boots in BIOS/CSM/legacy mode), but because your main installation is on the USB flash drive, the GRUB configuration file and some other critical files reside there.

If I'm right, there are, broadly speaking, at least three ways to fix this problem:

  • Move GRUB entirely to the hard disk -- To do this, you should create a /boot partition on your hard disk. Such a partition can be fairly small (~500MB is likely to be enough). You'd need to adjust /etc/fstab to mount this partition automatically, move the current /boot directory's contents to the new partition, and re-install GRUB. The trouble with this approach is that your USB drive will no longer be portable; it will work only on the computer on which you install the system.
  • Move GRUB entirely to the USB drive -- You can move GRUB so that it resides entirely on the USB drive. Once done, you may need to use the computer's built-in boot manager to select which OS to boot. Details of how to do this depend on whether your system uses BIOS-mode or EFI-mode booting:
    • BIOS -- In BIOS mode, simply doing a sudo grub-install /dev/sdb (or whatever the USB device is) will re-install GRUB; however, you must then restore the MBR of /dev/sda (or whatever the hard disk is) so that it holds the Windows boot loader. This is basically a Windows task.
    • EFI -- In EFI mode, you must ensure that the USB flash drive has an ESP, then reconfigure /etc/fstab so that the USB drive's ESP is mounted instead of the hard disk's ESP and re-install GRUB with sudo grub-install. You may also need to delete the EFI/ubuntu directory from the hard disk and/or adjust EFI boot options using the efibootmgr utility.
  • Abandon GRUB -- Most boot loaders don't spread their configuration files across disks the way GRUB does, and so are likely to work better. Details vary depending on what boot loader you use, though. For EFI, my page on the subject covers available options. I don't know of a page that succinctly summarizes BIOS options, though. In either event, you'd need to install the new boot loader using whatever procedures it requires, and possibly clean up the old GRUB installation in some way. You may also need to re-install the Windows boot loader in some cases.

There are some other hybrid or more exotic options, but I'll leave it at these since they're the most practical and broadly applicable.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.