1

I have an external hard drive which contains three primary partitions, two of them with an Ubuntu flavor each (14.04, 16.04), and the third contains just data. There is also an extended partition with a Windows 7, another Ubuntu, and a Swap partition, each one with its own partition. The reason for this mess is basically me wanting to have bootable backups of older systems where some of my work resides. The partitions in the extended partition have been pasted from an internal drive (copy and paste through Gparted). Now I would like to have GRUB in a such way that I can boot into any of the o.s.'s, if a need arises.

To install GRUB I have followed this post using a live usb: https://askubuntu.com/questions/145241/how-do-i-run-update-grub-from-a-livecd. I've installed it on the first primary partition which contains an Ubuntu 14.04. The GParted view of the partitions in the external drive.

What happens when I follow these steps is that the GRUB listings contain also the bootable partitions from the internal drive. If I let it boot from the default listing (the first in the list) it will give the error below, but still boots. If I try any other listing again, it gives the same error as below:

> attempt to read or write outside of disk hd0.
> press any key to continue.

After pressing a key, it returns to boot menu, and won't even boot from default listing.

Any insights of what could be going wrong or what I could try? What I want is to have GRUB installed in external drive, showing listings based only on bootable partitions of that external drive.

UPDATE 1:

The blkid gives the following: blkid_out

The contents of the grub.cfg file: grub.cfg

0

You can edit the /boot/grub/grub.cfg by hand. It is a normal text file. Remove the entries you do not want. Be sure you pick the grub.cfg on the partition you had mounted when you ran update-grub.

| improve this answer | |
  • Ok, I will try this today. – highWaters Aug 30 '19 at 11:50
  • I could get rid of extra entries by modifying the grub.cfg. However the problem from before, when I try to boot any of the rest, persists, i.e, "attempt to read or write outside of disk hd0. press any key to continue", also "no device found <name here>". So somehow it is not finding the device or partitions. Any idea? and thanks for your help :). – highWaters Aug 30 '19 at 17:43
  • I misunderstood that portion of your question. Sorry. I recommend this procedure: Download the Super GRUB2 disk and install it to a flash drive. Use it to boot into one of the Ubuntu installations on the external drive. Invoke update-grub (and grub-install, if necessary) from within the booted system. Using another drive is a bit cumbersome, but I observed this method to be more reliable. – Hermann Aug 30 '19 at 20:14
  • Thanks for the prompt response, I will give this a go! – highWaters Aug 30 '19 at 20:53
  • Hej I tried this, and when I select some entries I get the same message as before, in one case I get the grub prompt. – highWaters Aug 31 '19 at 19:21

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.