After trying to post this on #libreboot, it was taken as flooding, and I
can't connect anymore :
menuentry 'Load Operating System (incl. fully encrypted disks) [o]'
--hotkey='o' {
# GRUB2 handles (almost) every possible disk setup, but only the location of
# /boot is actually important since GRUB2 only loads the user's config.
# LVM, RAID, filesystems and encryption on both raw devices and partitions in
# all various combinations need to be supported. Since full disk encryption
is
# possible with GRUB2 as payload and probably even used by most users, this
# configuration tries to load the operating system in the following way:
# 1. Look for user configuration on unencrypted devices first to avoid
# unnecessary decryption routines in the following order:
# 1) raw devices and MBR/GPT partitions
search_grub ahci
search_grub ata
# 2) LVM and RAID which might be used accross multiple devices
lvm="lvm/matrix-rootvol lvm/matrix-boot"
raid="md/0 md/1 md/2 md/3 md/4 md/5 md/6 md/7 md/8 md/9"
for vol in ${lvm} ${raid}; do
try_user_config "(${vol})"
done
# 2. In case no configuration could be found, try decrypting devices. Look
# on raw crypto devices as well as inside LVM volumes this time.
# The user will be prompted for a passphrase if a LUKS header was found.
for dev in ahci0 ata0 ${lvm}; do
cryptomount "(${dev})"
done
# 3) encrypted devices/partitions
for i in 0 1; do
for part in 1 2 3 4 5; do
for type in ahci ata; do
cryptomount "(${type}${i},${part})"
done
done
done
# 3) encrypted devices/partitions
search_grub crypto
# 4) LVM inside LUKS containers
for vol in ${lvm}; do
try_user_config "(${vol})"
done
# Last resort, if all else fails
set root=ahci0,1
for p in / /boot/; do
if [ -f "${p}vmlinuz" ]; then
linux ${p}vmlinuz root=/dev/sda1 rw
if [ -f "${p}initrd.img" ]; then
initrd ${p}initrd.img
fi
fi
done
# Last resort (for GA-G41-ES2L which uses IDE emulation mode for SATA)
set root=ata0,1
for p in / /boot/; do
if [ -f "${p}vmlinuz" ]; then
linux ${p}vmlinuz root=/dev/sda1 rw
if [ -f "${p}initrd.img" ]; then
initrd ${p}initrd.img
fi
fi
done
}
according to this https://libreboot.org/docs/gnulinux/grub_cbfs.html and
https://libreboot.org/docs/gnulinux ,
this is where I'm supposed to modify the file, and put this in there
(modified of course): cryptomount -a
set root='lvm/matrix-root'
linux /vmlinuz root=/dev/mapper/matrix-root
cryptdevice=/dev/mapper/matrix-root:root
initrd /initrd.img
That's not clear enough for me. Am I supposed to replace the whole section,
to replace only some part?
Last question, do I absolutely have to reimport the modified grub file into
the ROM image, or can I only put it renamed as libreboot_grub.cfg in
/boot/grub/ ? I see both options, this is conusing to me.
Right now I have to boot manually of course.