]> gitweb.fluxo.info Git - bootless.git/commitdiff
Load lvm after running cryptomount on bootfde
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 4 Jul 2016 21:34:01 +0000 (18:34 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 4 Jul 2016 21:34:01 +0000 (18:34 -0300)
templates/grub.cfg

index 35827dbf0eb00b0e7e704fd82b16567b7641fc3a..de8e8e9bd4c49c2a2d570c589f138084011a3682 100644 (file)
@@ -26,8 +26,9 @@ set menu_color_highlight=yellow/red
 # Usage: bootfde <volume> <kernel-version> [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 ...'