Skip to content

Instantly share code, notes, and snippets.

@ericr3r
Last active January 2, 2020 18:04
Show Gist options
  • Save ericr3r/2c55beade85e56100e29c9ea6573dd3d to your computer and use it in GitHub Desktop.
Save ericr3r/2c55beade85e56100e29c9ea6573dd3d to your computer and use it in GitHub Desktop.
Arch Grub Recovery - custom for my partitions
# Open encyryped filesystem
cryptsetup open --type luks /dev/nbme0n1p6 vg0
# Mount the filesytem
mount /dev/mapper/vg0-root /mnt # /mnt is the installed system
swapon /dev/mapper/vg0-swap # Not needed but a good thing to test
mkdir /mnt/boot
mount /dev/nvme0n1p5 /mnt/boot
mkdir /mnt/boot/efi
mount /dev/nvme0n1p1 /mnt/boot/efi
# 'install' fstab
genfstab -pU /mnt >> /mnt/etc/fstab
# Enter the system
arch-chroot /mnt /bin/bash
# Regenerate initrd image
mkinitcpio -p linux
# Setup grub
grub-install
# then run:
grub-mkconfig -o /boot/grub/grub.cfg
# Exit new system and go into the cd shell
exit
# Unmount all partitions
umount -R /mnt
# Reboot into the new system, don't forget to remove the cd/usb
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment