From: Silvio Rhatto Date: Mon, 4 Jul 2016 21:34:01 +0000 (-0300) Subject: Load lvm after running cryptomount on bootfde X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=080e08db94ea1d40e2542337688ca91fca3cceb3;p=bootless.git Load lvm after running cryptomount on bootfde --- diff --git a/templates/grub.cfg b/templates/grub.cfg index 35827db..de8e8e9 100644 --- a/templates/grub.cfg +++ b/templates/grub.cfg @@ -26,8 +26,9 @@ set menu_color_highlight=yellow/red # Usage: bootfde [source] [target] # function bootfde { + # Loads luks module you can access kernel and initrd from + # the inside your encrypted OS! insmod luks - insmod lvm set volume=${1} @@ -51,6 +52,11 @@ function bootfde { cryptomount lvm/${volume} set root=(crypto0) + + # Load the LVM module just after loading the encrypted volume + # so Grub can detect volumes that are inside it. + insmod lvm + echo "Loading ${volume}..." linux /boot/vmlinuz-${version} root=/dev/mapper/${target} cryptopts=target=${target},source=${source} ro quiet echo 'Loading initial ramdisk ...'