You are not logged in.

#1 2024-05-19 03:13:12

Whatsisface
Member
Registered: 2019-09-16
Posts: 2

[SOLVED] Setting up GRUB with LUKS & Btrfs

I have an existing Arch install on one of my partitions, but due to some poor decisions while resizing my boot partition I no longer have any sort of functioning boot loader.

These are my partitions:

Device              Size    Type
/dev/nvme0n1p1     1000M    EFI System
/dev/nvme0n1p2      128M    Microsoft Reserved
/dev/nvme0n1p3    147.3G    Microsoft basic data
/dev/nvme0n1p4      990M    Windows recovery environment
/dev/nvme0n1p5     22.5G    Windows recovery environment
/dev/nvme0n1p6      1.5G    Windows recovery environment
/dev/nvme0n1p7    780.5G    Linux filesystem

I originally had it dual booted, but I can't boot into Windows anymore either. Ideally I could set up GRUB or something in /dev/nvme0n1p1 that would give me the option to boot into both, but I assume that would need me to set up secure boot which I wasn't using for Arch previously.

I have the Arch ISO handy and I'm trying to figure out the steps to mount the subvolumes, regenerate the fstab, and install GRUB (or an equivalent).

I formatted /dev/nvme0n1p1 for EFI following the install guide.

/dev/nvme0n1p7 has my existing Arch Linux files & the partition is encrypted with LUKS.
It's also has these subvolumes: @, @.snapshots, @home, @log, @pkg

cryptsetup luksOpen /dev/nvme0n1p7 data
mount -o subvol=@ /dev/mapper/data /mnt
mount -o subvol=@home /dev/mapper/data /mnt/home
mount -o subvol=@pkg /dev/mapper/data /mnt/var/cache/pacman/pkg
mount -o subvol=@log /dev/mapper/data /mnt/var/log
mount -o subvol=@.snapshots /dev/mapper/data /mnt/.snapshots
mount /dev/nvme0n1p1 /mnt/boot
arch-chroot /mnt

I tried setting up GRUB with this:

grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB

When I try booting into GRUB, it just gives me a GRUB command prompt, so I think I've done something wrong.

Last edited by Whatsisface (2024-05-19 03:46:10)

Offline

#2 2024-05-19 03:45:32

Whatsisface
Member
Registered: 2019-09-16
Posts: 2

Re: [SOLVED] Setting up GRUB with LUKS & Btrfs

I'd forgotten to run

grub-mkconfig -o /boot/grub/grub.cfg

A true facepalm moment.

Working now, I'll save the adventure of fixing Windows for another day.

Offline

Board footer

Powered by FluxBB