You are not logged in.
Hi!
I've got a librebooted ThinkPad x200 and struggle booting into my fresh installation of Arch. Libreboot comes with its own GRUB (i.e. no need to install GRUB through Arch) and I just can't point the Libreboot GRUB to the Arch install.
I configured Arch to use luks1 (heard that Libreboot doesn't support luks2), lvm and btrfs. I didn't find any info about Libreboot on the ArchWiki, but found a guide for Parabola which I have been following (I know it's not Arch, but better than nothing).
This is what the system looks like (view from arch-chroot):
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 686.9M 1 loop
sda 8:0 0 465.8G 0 disk
└─sda1 8:1 0 465.8G 0 part
└─lvm 254:0 0 465.8G 0 crypt
├─vgroot-swap 254:1 0 7G 0 lvm
└─vgroot-root 254:2 0 458.8G 0 lvm /home
/
sdb 8:16 1 28.7G 0 disk
├─sdb1 8:17 1 783M 0 part
└─sdb2 8:18 1 15M 0 part
# ls -lA /boot
total 86528
-rw------- 1 root root 50966832 Oct 9 12:05 initramfs-linux-fallback.img
-rw------- 1 root root 26626302 Oct 9 12:04 initramfs-linux.img
-rw-r--r-- 1 root root 11005696 Oct 9 11:53 vmlinuz-linux
# cat /etc/mkinitcpio.conf
MODULES=(btrfs i915)
BINARIES=()
FILES=()
HOOKS=(base udev autodetect modconf block keyboard keymap encrypt lvm2 fsck filesystems)
And this is the error message after reboot, in the GRUB console.
Could someone please tell me what I am doing wrong?
Last edited by goldmund (2022-10-16 13:48:53)
Offline
Are you using subvolumes? If so, see the btrfs wiki page for details of how to set this up.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Are you using subvolumes? If so, see the btrfs wiki page for details of how to set this up.
I believe I set them up correctly, it should be according to the Wiki:
# cryptsetup luksFormat --type luks1 /dev/sda1
# cryptsetup open /dev/sda1 lvm
# pvcreate /dev/mapper/lvm
# vgcreate vgroot /dev/mapper/lvm
# lvcreate -L 4G vgroot -n swap
# lvcreate -l +100%FREE vgroot -n root
# mkfs.btrfs /dev/mapper/vgroot-root
# mount /dev/mapper/vgroot-root /mnt
# cd /mnt
# btrfs subv create @
# btrfs subv create @home
# btrfs subv create @snapshots
# cd
# umount /mnt
# mount -o compress=zstd,subvol=@ /dev/mapper/vgroot-root /mnt
# mkdir /mnt/home
# mount -o compress=zstd,subvol=@home /dev/mapper/vgroot-root /mnt/home
Offline
The problem indeed seems to be with btrfs. I've just tried an empty HDD where I installed ext4 and booting into it through Libreboot worked.
So the question is: how to adjust this command inside GRUB console in such a way that GRUB finds it in the encrypted '@' btrfs subvolume?
linux /boot/vmlinuz-linux root=/dev/vgroot/root cryptdevice=/dev/sda1:root
Sorry for being so dumb... I have read so much already in the ArchWiki! I just need a kick in the right direction...
Offline
What I was thinking of was https://wiki.archlinux.org/title/Btrfs# … me_as_root. I've never used btrfs, but I remembered this could cause issues and I guessed your lsblk output might look the way it did if / etc. were subvolumes. However, this comes with lots of caveats since, as I say, I've never used btrfs myself.
However, that wouldn't cause the grub error you're seeing I don't think, unless /boot is on your root volume?
Last edited by cfr (2022-10-10 00:01:18)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
So the question is: how to adjust this command inside GRUB console in such a way that GRUB finds it in the encrypted '@' btrfs subvolume?
linux /boot/vmlinuz-linux root=/dev/vgroot/root cryptdevice=/dev/sda1:root
Try...
linux /boot/vmlinuz-linux root=/dev/vgroot/root rootflags="subvol=/@" cryptdevice=/dev/sda1:root
Offline
Thanks for your help, unfortunately this still hasn't worked as I am still seeing:
error: file '/boot/vmlinuz-linux' not found.
Could it perhaps have something to do with setting the variable 'root' as:
set root='vgroot-root'
?
It really goes over my head, I've been playing with this for hours!
Offline
After 2 weeks of fruitless and desperate attempts, I have finally figured it out.
This is the correct configuration in the GRUB console:
cryptomount -a
set root='lvm/matrix-rootvol'
linux /@/boot/vmlinuz-linux root=/dev/mapper/matrix-rootvol rootflags=subvol=@ cryptdevice=/dev/sda1:root rw
initrd /@/boot/initramfs-linux.img
boot
Additionally, I have renamed the LVM volume group and logical volumes to their recommended names.
Luks1 is also not needed, the current version (20220710) of Libreboot can handle luks2 as long as you convert the key to pbkdf2:
cryptsetup luksConvertKey --pbkdf pbkdf2 /dev/sdX
More info is on the Libreboot website.
Arch is now booting! Thanks a lot for your help.
Last edited by goldmund (2022-10-16 14:23:42)
Offline