Skip to content

Instantly share code, notes, and snippets.

View tobikris's full-sized avatar
🍪

Tobias Krischer tobikris

🍪
View GitHub Profile
@tobikris
tobikris / repair-dualboot-bootloader.sh
Last active April 14, 2024 22:47 — forked from Tamal/set-chroot.sh
Setting up chroot from a live image in Fedora. Regenerate grub2 for Fedora.
$ # Use Live CD to boot
$ sudo su # Switch to root
$ fdisk -l # Get names of root, boot & EFI partition names. you can also use blkid
$ # http://dadadom.de/2020/04/11/fix-fedora-uefi-boot-with-encrypted-partitions/
$ udiskctl unlock -b /dev/nvme0n1p6 # unlock root luks partition
$ mount /dev/mapper/fedora_fedora-root /mnt # mount root partition
$ mount /dev/mapper/fedora_fedora-var /mnt/var
$ mount /dev/nvme0n1p5 /mnt/boot # mount boot partition