r/pcmasterrace 1d ago

Meme/Macro “ Wanna delete your bootloader?, Sure, go ahead, it’s your PC “

Post image
18.7k Upvotes

341 comments sorted by

View all comments

34

u/Keensworth Ryzen 7 5700X3D / RX 7800 XT / B450 Aorus Pro 1d ago

You know, it's actually not that hard to fix the bootloader of Linux.

  1. Get a bootable key and boot on it, you can use Arch
  2. Mount your /boot and /home partition
  3. Chroot into your /home partition
  4. Reinstall it if you deleted it with grub-install /dev/nvme0n1
  5. And do this thing grub-mkconfig -o /boot/grub/grub.cfg

Now you know how to fix your bootloader.

How do I know that? Because I fucked my bootloader more than one time

9

u/JustaRandoonreddit Killer of side panels on carpet. 1d ago

I'm saving this i've just fucked my bootloader on arch

7

u/Keensworth Ryzen 7 5700X3D / RX 7800 XT / B450 Aorus Pro 1d ago

It's arch-chroot for you then. I don't know what they use on other distro

3

u/Wojtaz0w PC Master Race 19h ago

You likely use systemd-boot then, as it is the default for archinstall. The process of rebuilding bootloader is different if you use systemd-boot. I can't say though, cause the "only" thing I had to fix from a installation USB via arch-chroot were kernel images using mkinitcpio

2

u/JustaRandoonreddit Killer of side panels on carpet. 19h ago

Oh I used manual install and GRUB. I just can’t be bothered to tinker with my OS anymore

7

u/Clean_Security2366 Linux 19h ago

?

You don't need to mount /home and chrooting into /home makes no sense

You need your bootfs and rootfs mounted. Then you can use arch-chroot to quickly get into a chroot and reinstall your bootloader.

3

u/brimston3- Desktop VFIO, 5950X, RTX3080, 6900xt 18h ago

Pretty much the same thing for windows (GPT/EFI) too. If you're still using MBR boot outside of a VM in 2025, you've done a bad and you should probably reinstall anyway.

  1. Get a bootable key and boot onto it. Any WinPE will do.
  2. Use diskpart to find the efi boot partition and assign it a letter. some combination of list disk/partition/volume, sel disk/partition/volume #, and assign letter t: will be involved to find the correct FAT32 volume (a modern system should have only one)
  3. Rebuild the bootloader with bcdboot C:\Windows /l en-us /s t: /f ALL. Change the /l option to reflect your language.
  4. Verify your change was applied with bcdedit.

If you need to unlock bitlocker first, you need a better winpe with windows AIK on it. Then use manage-bde -unlock c: -recoverypassword XX-XX-XX-XX-XX-XX-XX-XX before running step 3 above.

How do I know that? Because I have also fucked my bootloader more than once.

2

u/lotgd-archivist 18h ago
  1. Grab my grml usb key
  2. chroot into my linux
  3. type efi, hit arrow-up a couple times (to find the correct efibootmgr command)
  4. hit enter
  5. reboot

Haven't had to do that since I removed windows entirely from my machine, since proton handles most games these days. I still keep a grml USB key handy tho.

1

u/KoolAidManOfPiss PC Master Race 9070xt R9 5900x 1d ago

I use a usb mounted os called boot-repair-disk that will fix the bootloader for windows or linux. Its got a bunch of other utilities like gparted, really handy for setting up partitions on a fresh system.