This night I completely unplugged my Linux SSD and reinstalled Windows on another hard drive.

I plugged in the Linux-SSD again after the installation, but when I tried to boot it my computer wanted to boot to Windows. I went to the BIOS and changed the boot order back to how it was before (my machine always booted to Linux on default). Normally I'd be shown GRUB 2.0 for some seconds, but then my Windows wanted to repair the Linux drive (!), on which screen I immediately pressed the reboot-button. My Windows shouldn't even touch my Linux-SSD, that's why they are on separate disks ...

I went to the BIOS again and set the Boot Mode to UEFI only (I actually believe it was on UEFI and Legacy before on the working machine). After this, my computer prompts

"Reboot and Select Proper Boot device or Insert Boot Media in selected Boot device and press a key"

Before the windows-reinstallation I had to manually chose to boot from the Windows-SDD, as Windows didn't even had an entry in the GRUB (for maxmimum separation within one case).

Can someone explain me what happened to my Linux drive or the bootloader of which I thought it was located on the Linux partition, and how I can fix this to boot to Linux again?

Might it be that Windows made some changes to the BIOS so the BIOS doesn't find the Linux bootloader?

Additional info/status quo:

efivar-tester in arch-chroot:

About to test empty [runs through]
About to test one skips at:
testing efi_get_variable()
FAIL: "one"(line 212) (-1) get size test failed: wrong size: 1 should be 2 (append may be at fault)

I am inexperienced with EFI.

modprobe efivars on Live system:

modprobe: FATAL: Module efivars not found in directory /lib/modules/4.16.3-301.fc28.x86_64
  • 2
    Many UEFI forget UEFI boot entries on drives that are unplugged. It may change entry to some sort of default that really does not work. Look at this: sudo efibootmgr -v. Your entry should show shim or grub in details. If not you may just need a new UEFI entry or reinstall grub which also adds new UEFI boot entry. If external drive it only boots from /EFI/Boot/bootx64.efi. If UEFI finds a hard drive entry in ESP, it may boot Ubuntu. Do you have separate ESP on Linux drive or only in Windows drive? – oldfred Dec 21 '19 at 18:41
  • They use separate ESPs. I hadn't reinstalled my Windows on my desktop PC since the update to Windows 10 and definitely not after I installed Arch Linux. True, I never unplugged the hard drives after installation of OS from this particular motherboard, I didn't know that unplugging the drive might change the boot entry. So it might not have anything to do with the reinstallation. I never ran into problems with Windows after multiple reinstallations of Arch. I am talking about internal drives. So I need to set up a Live Stick in order to get access to some console, right? I will try that. – Melissa Loos Dec 21 '19 at 20:20
  • May be best to see details, use ppa version with your live installer (2nd option) or any working install, not older Boot-Repair ISO: Please copy & paste link to the Boot-info summary report ( do not post report), the auto fix sometimes can create more issues. help.ubuntu.com/community/Boot-Repair Always best to have working live installer for every version you have installed. And if Windows a repair/recovery flash drive, even if many repairs can be done internally with f8 into its own repair console. – oldfred Dec 21 '19 at 20:30
  • I am using Arch, and I prefer to learn to fix it via commandline, without a boot repair tool. But your comment already helped me to narrow down how to search for further information, so I will play around with my Arch-Iso-Stick which by coincidence runs with a more or less recent version :) – Melissa Loos Dec 21 '19 at 21:01
  • all i had to do was reinstalling GRUB ^^' – Melissa Loos Dec 21 '19 at 21:44

In my case a reinstallation of GRUB via Archiso Live Stick was sufficient using the commands in arch-chroot:

mkinitcpio -p linux
grub-install --target=x86_64-efi --efi-directory=boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg

Might be that the first and last command aren't necessary, will check that the next time I run into the same problem.

I am still looking for technical, in-depth explanations of what exactly might have happened when I unplugged the disk, as I want to not only be able to fix this issue, but also to fully understand the problem.

| improve this answer | |
  • 1
    I think unplugging drive, loses UEFI entry. Most UEFI seem to auto find Windows, but not LInux to restore an entry. I might run Boot-Repair's Summary report before & after, but really be looking at UEFI boot menu entries with efibootmgr. – oldfred Dec 21 '19 at 22:16

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.