1

I have a laptop (Dell E6520) with a second SSD installed in a drive caddy. Windows 7 is installed on the primary drive (legacy boot). The second drive has Ubuntu installed (ubuntu-13.10-desktop-amd64) along with an NTFS partition. I used bootRepair to repair common problems. The BIOS is set to boot from the primary drive. It boots to the selection window and allows selection of either the Linux or Windows, both of which boot normally.

HOWEVER, I if I pull the drive caddy and put the DVD device back in the system will not boot (grub rescue). From the bootRepair summary, I think the boot process it pointing to grub.cfg on the second drive and thus won't boot when that is pulled. http://paste.ubuntu.com/6733690/

Is it possible to put the boot files (grub.cfg) on the primary drive and set up the boot process to look there so that I can boot to Windows when the DVD device is installed and otherwise select Linux or Windows when the drive caddy is in?

0

This works if you can set the caddy's interface as first boot device (via the BIOS/UEFI, maybe).

First boot into Ubuntu and install grub to the caddy/external drive:

sudo grub-install /dev/sdX
sudo update-grub

Where sdX is the device representing the caddy. You can run lsblk -l to check for the correct letter, it might be something like sdb or sdc, I think. (If in doubt, just edit the question to add the output of lsblk -l.)

Reboot (with caddy plugged) and make sure that grub loads correctly and lets you boot both OS's correctly (check booting Ubuntu then check booting Windows).

Take out the caddy and restore the Windows bootloader on the primary drive (look at this help article for that). That way when the secondary drive is unplugged Windows will boot normally, otherwise grub will kick in. (This is my current setup, but with a portable USB drive vs an internal drive.)

  • My system did boot OK with the drive caddy and selection of both OS's. I did the grub-install and update-grub (which finds both linux on sdb and Windows on sda) and verified that it still works. However, I'm uncertain about rebuilding the MBR on sda. The system will not boot from sdb if I set that first in the BIOS (legacy boot). So I can only boot from sda at present. If I rebuild the MBR on sda, I'm concerned that it will only boot windows even with the drive caddy installed. – user240213 Jan 27 '14 at 22:50
  • Doesn't the caddy have a different "interface" to the primary drive? If so, just put the caddy to boot first in the BIOS. If the caddy isn't plugged Windows would boot automatically and, otherwise, grub would kick in. I am thinking of a USB drive vs a primary drive, so that you can put the USB as first boot option, for example. If that's not the case I would need to investigate this further :-) – edwin Jan 28 '14 at 0:47
  • The caddy shows up in the BIOS as a 'system device bay'. It is a SSD using a SATA interface. When I set this to boot first (i.e. sdb), I get "invalid device table!". When I boot to sda, I think it is pointing to grub.cfg on sdb which, if not present, won't boot. – user240213 Jan 28 '14 at 1:09
  • That's weird... I mean if grub is correctly installed to the SSD it should just boot without issues. I have never used a caddy, so don't take my word for it. Hopefully someone more experienced will enlighten us. (In the meantime, check the partitioning in the caddy and if grub is correctly installed to it. Add this information to the question by editing it.) – edwin Jan 28 '14 at 1:20

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.