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
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