]> gitweb.fluxo.info Git - hydra.git/commitdiff
Provision: move boot device setup a bit to the top
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 17 Aug 2018 23:10:02 +0000 (20:10 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 17 Aug 2018 23:10:02 +0000 (20:10 -0300)
share/hydractl/provision

index 192ae694e88ef4e0515643bde4ed43fdcdf2a717..cabb40e2f10810fc1c14dbbd767b5bde32f1b0ca 100755 (executable)
@@ -449,6 +449,14 @@ EOF
   fi
 fi
 
+# Boot device must be available before installing kernel and initramfs.
+if [ "$grub" == "y" ] && [ "$encrypt" != "y" ]; then
+  echo "Boot device setup..."
+  hydra_sudo_run mkfs.ext4 $boot_device
+  hydra_sudo_run mount $boot_device $WORK/boot
+  echo "$reboot_device /boot ext4 defaults,errors=remount-ro 0 2" | $SUDO tee -a $WORK/etc/fstab > /dev/null
+fi
+
 # Kernel.
 echo "Installing kernel..."
 cat <<-EOF | $SUDO tee $WORK/etc/initramfs-tools/modules > /dev/null
@@ -469,14 +477,6 @@ else
   kernel_arch="$arch"
 fi
 
-# Boot device must be available before installing kernel and initramfs.
-if [ "$grub" == "y" ] && [ "$encrypt" != "y" ]; then
-  echo "Boot device setup..."
-  hydra_sudo_run mkfs.ext4 $boot_device
-  hydra_sudo_run mount $boot_device $WORK/boot
-  echo "$reboot_device /boot ext4 defaults,errors=remount-ro 0 2" | $SUDO tee -a $WORK/etc/fstab > /dev/null
-fi
-
 # Kernel.
 $APT_INSTALL linux-image-$kernel_arch -y