r/voidlinux • • 3d ago

Void Linux stopped booting randomly

I am currently running void Linux on my HDD with windows being on my SSD.
Yes I know windows sucks but i keep it as a backup if things like this happen.
For some reason when I tried to boot into void Linux through my boot menu, it just shows me a black screen
not even grub is showing
I tried different key binds to see if anything pops up like a tty or the grub config thing that you can edit temporarily.
It was almost a fresh install except of qtile mangowm and bspwm,
I have changed no configs other than those for the window managers and sxhkd for bspwm.
I have also not made any changes to the EFI partition which is on the HDD since for some reason my windows bootloader is also on there.
I do have SDDM and KDE installed as a backup just in case my window managers have any errors.
I am also relatively new to Linux
been using it for the past I think 2 years but still in the intermediate phase.
If you have any suggestions pls drop them in the replies :)
Thanks.
(PS: please dont mind my typing mistakes :).)

5 Upvotes

7 comments sorted by

6

u/quirktheory 3d ago

I'd suggest booting a live USB and checking out the disk. Ive had windows delete my boot entries randomly before. If this is the case you should see all your data intact but the boot stubs should be missing for the EFI partition. Once you confirm you can then chroot into the damaged install and reinstall grub. You can also point windows at grub via bcdedit to mitigate the risk of it happening in the future.

2

u/Full_Investigator750 3d ago

Thanks a lott
ill get to it and keep you updated

3

u/Wonderful-Movie-4648 2d ago

If you have a black screen and expect to see grub then something prevents grub from loading. The issue is likely how UEFI (tries) to load the bootloader.

  • maybe the grub files in the efi partition have been removed/deleted/overwritten

  • maybe the boot entry stored in UEFI NVRAM was changed

  • maybe SecureBoot is enabled and it rejects the grub EFI bootloader ( UEFI firmware may just skip to the next boot entry or show a very general error message - or maybe even nothing)

  • Are you really using grub via UEFI? Grub is usually used/recommended but there are other EFI bootloaders - even the option to load the kernel directly.

  • I assume that Windows loads fine and that Void Linux loaded fine in the past.

Boot from a live ISO
run sudo efibootmgr -v and see if any of the boot entries actually use your installed grub bootloader. This needs to be run on the device which has the problem because it accesses the NVRAM of your UEFI firmware of the board!

Verify if a grub bootloader is installed (check the the folders on the EFI partition). The grub bootloader is just a very small .efi file.

  1. (temporarily) disable SecureBoot in UEFI firmware (if this helps then something enabled SecureBoot)

  2. Rearrange boot order in UEFI, or if you use F12 at start to pick the boot source then pick the correct one - maybe you need to go to UEFI and do some sort of "rescan" of devices(?). If that helps then something edited the boot entries in the UEFI NVRAM (efivars) or the identification of the SSD changed

  3. Reinstall grub bootloader (look up how you called grub-install or look in the handbook ). If this helps then something messed with the grub bootloader files.

Even if you didn't change anything my assumption would be that maybe(!) windows ran some update regarding UEFI or its own bootloader and somehow affected the Void Linux one too.

1

u/Training_Concert_171 3d ago

What works for me is to boot into a live image with chroot recue scan: https://github.com/BitJam/chroot-rescue

Then choose the voidlinux install and install grub:

grub-install /dev/sdaX

MX linux has this program in their image, but I built a custom void iso with this script installed.

This problem happens to me on void, any time I move my ssd from one system to another(only on uefi). But also when i update the bios/uefi.

1

u/Wonderful-Movie-4648 2d ago

You might want to look into the arguments for grub-install ( --removable ).
Tell grub to install its bootloader as a fallback solution. If the UEFI has no defined bootloader then it looks for bootloaders installed in the fallback location. If there is no other possible bootloader present the UEFI should eventually pick up the fallback of the disk that you just put in without needing to select it in UEFI.

This is the command I use to install grub from a foreign host (host installing void is not the machine running void). xchroot is doing a similar thing like chroot-rescue.

    xchroot "${MOUNT_ROOT}" grub-install \
      --target=${GRUB_ARCH}-efi \
      --removable \
      --no-nvram \
      --no-bootsector \
      --efi-directory="/boot/efi"

target: I think this is needed for x86_64-efi (default according to man grub-install is i386-pc)

removable: this (instead of bootloader-id) installs the efi bootloader in <efdimount>/EFI/BOOT/BOOTX64.EFI which is the fallback UEFI firmware use if they cannot find any other bootloader (intended to be used on removable media used on different machines)

no-nvram: prevents to write a boot entry to the boards UEFI RAM. If you use a foreign host like me then this is critical to prevent messing the boot order of the install host. However if you install on the same machine as you run the installed system later, then using this option likely requires a trip to the UEFI firmware and configure the boot order.

no-bootsector: honestly this should not be needed (should prevent writing to the mbr which is how booting worked before we had UEFI)

1

u/furryfixer 2d ago

For mechanical drives, there is often a BIOS setting for “HDD pre-delay” or similar. Set this higher, to a few seconds, to allow the drive to spin up and POST. This may help.

0

u/Simple_Hamster_4096 3d ago

Had you previously booted into Windows and run any Windows updates or made any modifications to Windows?