Skip to content

Instantly share code, notes, and snippets.

@shitcoding
Created March 14, 2024 18:52
Show Gist options
  • Save shitcoding/24aa564d360a5e00c984484e8d6b5563 to your computer and use it in GitHub Desktop.
Save shitcoding/24aa564d360a5e00c984484e8d6b5563 to your computer and use it in GitHub Desktop.
Fix bootloader for ubuntu / pop os
# Pop OS: Repair the bootloader manual - https://support.system76.com/articles/bootloader/
# Unlock LUKS volume
sudo cryptsetup luksOpen /dev/nvme0n1p3 cryptdata
sudo lvscan
sudo vgchange -ay
# Mount unlocked LUKS volume
sudo mount /dev/mapper/data-root /mnt
# Mount EFI volume
sudo mount /dev/nvme0n1p1 /mnt/boot/efi
# Run the following to fix the bootloader (systemd-boot)
for i in dev dev/pts proc sys run; do sudo mount -B /$i /mnt/$i; done
sudo chroot /mnt
apt install --reinstall linux-image-generic linux-headers-generic
update-initramfs -c -k all
exit
sudo bootctl --path=/mnt/boot/efi install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment