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

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
Rob2D
Posts: 5
Joined: 2020-02-14 12:34

SOLVED Windows ate my grub-efi

#1 Post by Rob2D »

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)
Last edited by Rob2D on 2020-02-18 18:17, edited 1 time in total.

User avatar
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

#2 Post by Head_on_a_Stick »

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.
Rob2D wrote:could I have fixed it another way?
Make a new NVRAM boot entry for Debian by running this command from a live ISO image (booted in UEFI mode):

Code: Select all

# efibootmgr --disk /dev/sda --part 1 --create --label "Debian" --loader /EFI/Debian/shimx64.efi
^ 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).
deadbang

Rob2D
Posts: 5
Joined: 2020-02-14 12:34

Re: SOLVED Windows ate my grub-efi

#3 Post by Rob2D »

Head_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 I can do that. I actually almost made them bigger at the time :lol:
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):

Code: Select all

# efibootmgr --disk /dev/sda --part 1 --create --label "Debian" --loader /EFI/Debian/shimx64.efi
^ 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).
Yeah that's what I was after. I'll make a note of it.

User avatar
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

#4 Post by Head_on_a_Stick »

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.
deadbang

Rob2D
Posts: 5
Joined: 2020-02-14 12:34

Re: SOLVED Windows ate my grub-efi

#5 Post by Rob2D »

Oh my god it happened again! This is ridiculous.

Micro$oft you absolute shower of scumbags! :evil:

Post Reply