0

I recently installed Ubuntu 14.04.02 on a 10 year old desktop simply as something to do, and with an extra hard drive lying around, I decided to install Turnkey Linux Fileserver solely on the second hard drive (I figured that if I wanted a file server, I would want more space and to have a newer drive). I ran the server for a bit, and it installed it's own Grub on the system. Ubuntu is not an option on the bootloader, so to get back to Ubuntu I tried taking out the new drive, but after the Dell screen it goes directly into Grub rescue mode. I followed some other advice and reinstalled the hard drive and used 'sudo apt-get purge grub-PC' from the Turnkey CLI, and after doing that, I am sent straight to Grub rescue mode without a chance to boot to Turnkey. Is it possible that the issue is that Grub was installed on a different hard drive than Ubuntu? Another thing is that I purged grub, grub-legacy, and grub-PC (only grub-PC worked), but here it is messing with my boot. And yes, when installing Turnkey, I was careful not to wipe Ubuntu.

2 Answers 2

2

On a BIOS-based computer (which your 10-year-old system almost certainly is), a boot loader installs to the Master Boot Record (MBR) of the hard disk -- that is, its first sector. Note the singular: boot loader. Whatever boot loader resides in the MBR controls the boot process.

This can become more complex if you've got multiple disks, since each disk has its own MBR. In theory, you can install one boot loader in one disk's MBR and another boot loader in the other one and then use the BIOS's built-in boot manager to switch between them. In practice, though, setting things up in this way requires either knowledge of how to do it or luck. My suspicion is that your Turnkey Linux version of GRUB has overwritten the Ubuntu version of GRUB on your first hard disk, leaving the second disk untouched.

There are at least two reasonably painless solutions to this problem:

  • Prepare a Super GRUB 2 Disk and boot from it. With luck, this will give you a menu enabling you to boot either Ubuntu or Turnkey. Boot to Ubuntu, open a Terminal Window, and type sudo grub-install /dev/sda followed by sudo update-grub.
  • Run the Boot Repair tool from any emergency disk you can get booted. (An Ubuntu installation utility should work.) This will re-install GRUB and set it up.

Ideally, either method will detect both your Ubuntu and your Turnkey installations and get them both booting. In practice, it's possible that one will work and the other won't; or maybe even neither will work. You'll just have to try one and, if it doesn't work, try the other. In a worst-case scenario you might need to dig into the "guts" of GRUB, which is not pretty; but try these easier fixes first. Try them in whatever order you like, and if one works, do not try the other one, on the "if it ain't broken, don't fix it" principle.

1

You may use Boot-Repair CD to restore your Ubuntu GRUB.

1
  • 1
    yeah, and choose the HDD correctly when it asks you. Jul 6, 2015 at 19:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .