Skip to content

Instantly share code, notes, and snippets.

@njuettner
Last active June 18, 2023 14:46
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save njuettner/5b58c0880472c53f9d5ef43a74299d2b to your computer and use it in GitHub Desktop.
Save njuettner/5b58c0880472c53f9d5ef43a74299d2b to your computer and use it in GitHub Desktop.
Arch Linux not booting

Fix booting on Arch Linux

If UEFI is used for booting, BIOS needs to be changed!!!

Boot from a USB Stick

Decrypt partition space and name it root

cryptsetup luksOpen /dev/sdaX root

Mount drives

mount /dev/mapper/root /mnt 
# if lvm is used use volume group for root to mount, e.g. /dev/vg0/root /mnt
mount /dev/sdaX /mnt/boot
mount /dev/sdaX /mnt/boot/efi

Chroot into system

arch-chroot /mnt /bin/bash

reinstall the programs to be safe, need 'linux' so the *.img files are generated if WiFi is used probably you need to check wifi-menu first

pacman -S --force linux grub os-prober efibootmgr 

Create initial ramdisk images

mkinitcpio -p linux

Reinstall and configure grub on the drive

bootloader-id: name can be checked by looking into EFI/$PATH

grub-install --target=x86_64-efi \
             --efi-directory=/boot/efi \
             --bootloader-id=arch \ 
             --recheck
             --debug
             /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg

Ensure that Arch is the next thing to boot

efibootmgr -n 3

Leave

exit
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment