0

I installed Ubuntu 12.04 for use on an old Windows machine. It is installed on an external USB hard disk. I installed grub on the MBR of the internal hard disk, so if I connect the external hard disk and power up the computer, I initially get the Windows boot loader, which offers Windows and Ubuntu. If I select Windows, I boot into Windows and if I select Ubuntu, I get the Ubuntu/grub boot menu (which also offers Windows) and can boot into Ubuntu. Everything is fine.

If I start up the computer with the external hard disk disconnected, it immediately drops to the grub rescue shell

error: no such device: df9058b0....
grub rescue>

It doesn't even display the Windows boot loader, it goes straight to grub rescue. I went to the BIOS setup and disabled booting from the external HD, and it made no difference.

This concerns me because it means I need to have the external Ubuntu disk - (with that specific UUID) - connected even if I want to boot into Windows.

Can grub be configured so that the it drops into rescue only if I try to boot from it via the grub menu?

  • You have installed grub on your internal disk as boot loader. Grub needs /boot from the Ubuntu disk to start. – Soren A Jun 06 '17 at 13:33

1 Answers1

0

Oops, you put grub (legacy) onto the wrong disk (MBR), now it needs its files on the external disk to even show a menu.

  1. While you can run Ubuntu, intall grub onto your external disk (sdb?), and check that you can successfully boot from it and also boot windows.

OK, the boot fails. Is the external disk using MSDOS partitioning? If it GPT, you will need to add a small (1-2M) partition (no formatting) with the grub-bios flag. Then reinstall grub and try again.
OK It's MSDOS.


Logical partition, boot flag, makes no difference to Ubuntu. Is that the grub prompt you are seeing? Lots of answers like Boot error > no such device: grub rescue but your case is simpler -- You can boot grub from sda, and run Ubuntu on sdb. From there, you should be able to simply install grub to sdb. Just to check, you are not running in UEFI mode are you? Maybe a more recent release like 16.04 would be better, and drop back to lubuntu if full ubuntu is too much for you machine.


  1. Then you will need to restore the old Windows boot MBR onto your internal disk, so it only boots Windows.
  2. In the BIOS, select to boot the external disk first in the bootorder, and put the internal disk second (or both after CDROM if you prefer).

Booting should offer grub when the USB disk is present, and when not, the internal disk should boot Windows.

ubfan1
  • 17,838
  • Wrong .. grub is on the internal disk. But /boot which is needed for grub to load, is (of course) on the external disk where Ubuntu is installed. AND the problem was the error that occurs when the external disk IS NOT present, so it wont help changing the boot order. – Soren A Jun 06 '17 at 13:29
  • Grub is actually in multiple places. But the boot loader part is in the MBR of internal drive and grub.cfg and most of rest is in install. So If grub boot loader in external and BIOS set to boot external first it will boot. And in BIOS you can make internal drive second in boot order and if it is repaired to have Windows boot loader in MBR it will boot when external disconnected. – oldfred Jun 06 '17 at 13:37
  • @ubfan1 I did a 'grub-install /dev/sdb'. Now if I select the external hard disk from the BIOS boot menu, it tries to boot from it, but displays "GRUB" and hangs. – Paul Richter Jun 06 '17 at 13:38
  • @urbfan1 It's MSDOS, not GPT. The Ubuntu partition is a logical partition, and the boot flag is set. – Paul Richter Jun 07 '17 at 02:01