So, Windows, in it's neverending quest to outdo itself at causing hardship, decided to wreck my grub-efi from a completely separate drive. I booted to Windows yesterday and when I turned my back for a second it started "checking disks". Sure enough I was unable to get back into my Linux drive afterwards.
https://imgur.com/cY7wnvn
I managed to fix the problem after reading around but just wanted to post here to make sure I did everything right. Also because I'm not sure what exactly I did to change it (and also maybe because I'm proud I was able to fix a Linux problem by myself).
I pretty much followed this guide here:
https://wiki.debian.org/GrubEFIReinstall
I got rEFInder and it picked up my Debian no problem and I was able to get back in.
https://imgur.com/uHyyikV
https://imgur.com/NF5mxN9
I had a look around and to my eyes (keep in mind that I am an idiot) everything looked to be in the right place as far as I understand it:
https://imgur.com/Yztz6UB
https://imgur.com/StsX7C4
I finished the guide anyway and did the grub-efi reinstall and now everything is back to normal:
https://imgur.com/eIVrzd3
Hurrah.
I guess my question is, was it just as simple as a reinstall or could I have fixed it another way? AND, more importantly, is there anything I can do to guard against this happening again in the future??? (short of the poetic justice that would be throwing my Windows drive out a window)
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
SOLVED Windows ate my grub-efi
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: SOLVED Windows ate my grub-efi
Please replace your oversized images with URLs, we have forum users with limited bandwidth and this thread will cost them dear as it is now. TIA.
^ That presumes Debian's EFI system partition is /dev/sda1 (which is actually the default so the --disk & --part arguments can be omitted for that configuration).
Make a new NVRAM boot entry for Debian by running this command from a live ISO image (booted in UEFI mode):Rob2D wrote:could I have fixed it another way?
Code: Select all
# efibootmgr --disk /dev/sda --part 1 --create --label "Debian" --loader /EFI/Debian/shimx64.efi
deadbang
Re: SOLVED Windows ate my grub-efi
Yeah I can do that. I actually almost made them bigger at the timeHead_on_a_Stick wrote:Please replace your oversized images with URLs, we have forum users with limited bandwidth and this thread will cost them dear as it is now. TIA.
Yeah that's what I was after. I'll make a note of it.Head_on_a_Stick wrote:Make a new NVRAM boot entry for Debian by running this command from a live ISO image (booted in UEFI mode):^ That presumes Debian's EFI system partition is /dev/sda1 (which is actually the default so the --disk & --part arguments can be omitted for that configuration).Code: Select all
# efibootmgr --disk /dev/sda --part 1 --create --label "Debian" --loader /EFI/Debian/shimx64.efi
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: SOLVED Windows ate my grub-efi
You could also try running the grub-install command with the --removable option, which should allow the drive to be booted even without an NVRAM entry but Windows' bootmgfw.efi loader might take preference.
See https://www.rodsbooks.com/efi-bootloade ... ive-naming for more on this.
See https://www.rodsbooks.com/efi-bootloade ... ive-naming for more on this.
deadbang
Re: SOLVED Windows ate my grub-efi
Oh my god it happened again! This is ridiculous.
Micro$oft you absolute shower of scumbags!
Micro$oft you absolute shower of scumbags!