1

I installed linux on a external hard drive but when the external hard drive is unplugged I cannot access windows(kind of grub appers, but grub is in the external hard drive), only if I put the external HD back and will appear grub and I select windows and then on windows remove the HD and windows works normally. Is that any way to use windows normally like before without the needed of plug the HD?

1
  • You have two ideas which do not match: 'Grub appears' and 'the drive on which grub is written is not plugged in'. Since grub appears it is written on the internal drive.
    – Hennes
    Feb 16, 2016 at 14:29

1 Answer 1

2

Apparently you installed grub to the internal drive. You probably have its modules and grub.cfg on the external drive, but the boot code (or EFI binary for UEFI system) was installed to the MBR (and post-MBR gap / BIOS boot partition) of the internal drive. I bet you see the grub RESCUE shell when you have the external drive unplugged.

The solution is to re-install grub properly. For example, if

  • /dev/sda: internal Windows drive
  • /dev/sdb: external Linux drive

What you have done is probably:

  • grub-install /dev/sda, which consists of the implied option --boot-directory /boot, while /boot is on /dev/sdb

What you should do is:

  • grub-install /dev/sdb

Please be noted that the /dev/sdX namings can change among boots. So make sure you check with lsblk or findmnt to confirm which drive is the Linux drive before running this.

Then fix the MBR of the internal (Windows) drive: https://technet.microsoft.com/en-us/library/cc749177%28v=ws.10%29.aspx

0

You must log in to answer this question.

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