aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-08-17 20:10:02 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-08-17 20:10:02 -0300
commit8fa354282060ffc3bdd5901636e1d2686da12c59 (patch)
treec3d9a7ba96b8f5ff6f94d60a7c97df93f59e0c77
parent1477211c74d8be63342fb97c0fdb4d7bbe414348 (diff)
downloadhydra-8fa354282060ffc3bdd5901636e1d2686da12c59.tar.gz
hydra-8fa354282060ffc3bdd5901636e1d2686da12c59.tar.bz2
Provision: move boot device setup a bit to the top
-rwxr-xr-xshare/hydractl/provision16
1 files changed, 8 insertions, 8 deletions
diff --git a/share/hydractl/provision b/share/hydractl/provision
index 192ae69..cabb40e 100755
--- a/share/hydractl/provision
+++ b/share/hydractl/provision
@@ -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