Last active
March 15, 2024 18:41
-
-
Save MarkusGnigler/c2b2a81b28b1efa21b3b9b4e98d378bb to your computer and use it in GitHub Desktop.
chroot into fedora installation with luks encrypted disks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo su | |
#display/search for boot partition | |
fdisk -l # or lsblk -f | |
# encrypted luks partition | |
cryptsetup luksOpen /dev/nvme0n1p3 disk | |
# mount all | |
mkdir -p /mnt/boot/efi | |
mount /dev/mapper/disk /mnt/ | |
mount /dev/nvme0n1p1 /mnt/boot | |
mount /dev/nvme0n1p2 /mnt/boot/efi | |
for dir in /dev /proc /sys /run ; do mount --bind $dir /mnt/root$dir ; done | |
#for dir in /dev /proc /sys /run /var/run /usr /bin ; do mkdir -p /mnt$dir && mount --bind $dir /mnt$dir ; done | |
chroot /mnt | |
chroot /mnt/root /usr/bin/bash | |
echo "You're in ..." | |
# commands for fixing | |
dnf upgrade --refresh | |
dnf reinstall kernel* | |
dnf reinstall grub2-efi grub2-pc grub2-pc-modules grub2-tools-efi grub2-tools-extra shim | |
dracut --kver 6.1.9-200.fc37.x86_64 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment