Skip to content

Instantly share code, notes, and snippets.

@Lauriy
Created November 22, 2024 23:03
Show Gist options
  • Save Lauriy/12cad550e143bea31b7f713f1f099e40 to your computer and use it in GitHub Desktop.
Save Lauriy/12cad550e143bea31b7f713f1f099e40 to your computer and use it in GitHub Desktop.
sudo cryptsetup luksOpen /dev/nvme0n1p7 linux-root # decrypt LUKS
sudo vgscan
sudo vgchange -ay
sudo lvdisplay
sudo mkdir /mnt/linux
sudo mount /dev/vglinux/root /mnt/linux # yours might be named ubuntu-vg
sudo mount /dev/nvme0n1p2 /mnt/linux/boot # in case you have a separate unencrypted /boot
sudo mount /dev/nvme0n1p1 /mnt/linux/boot/efi
sudo mount --bind /dev /mnt/linux/dev # so the makeshift system would be aware of stuff
sudo mount --bind /proc /mnt/linux/proc
sudo mount --bind /sys /mnt/linux/sys
sudo mount --bind /run /mnt/linux/run
sudo chroot /mnt/linux # enter what you have created
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ubuntu --no-nvram
update-grub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment