summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-06-21 13:09:07 +0000
committerLars Wirzenius <liw@liw.fi>2022-06-21 13:09:07 +0000
commited626db8f74c405e5c69d577e5425a4782e743fe (patch)
tree924899052d5713bba4a974c4ae55343adce640cc
parentc264f7ac39e6a10742130ed9889505f24b1be3f4 (diff)
parent3c70d31061bd44f148720b6d94e20ac0abbc6e74 (diff)
downloadv-i-ed626db8f74c405e5c69d577e5425a4782e743fe.tar.gz
Merge branch 'liw/fixes-rebase' into 'main'
doc: add comment about what step does See merge request larswirzenius/v-i!25
-rwxr-xr-xv-i14
1 files changed, 8 insertions, 6 deletions
diff --git a/v-i b/v-i
index b34555a..0e38cc6 100755
--- a/v-i
+++ b/v-i
@@ -248,6 +248,7 @@ def grub(device, root, efi):
def vmdb_spec(system, ansible_vars):
device = "{{ image }}"
steps = [
+ # Create partition table.
mklabel(device),
# Create a partition for UEFI to boot from.
mkpart(device, "efi", "0%", "500M"),
@@ -300,10 +301,6 @@ def vmdb_spec(system, ansible_vars):
mkfs("root", "ext4"),
# Mount the root file system.
mount("root"),
- # Mount /boot on top of the root file system.
- mount("boot", dirname="/boot", mount_on="root"),
- # Mount /boot/efi.
- mount("efi", dirname="/boot/efi", mount_on="boot"),
]
)
@@ -326,6 +323,7 @@ def vmdb_spec(system, ansible_vars):
# vmdb2 won't do that automatically for you.
unpack_rootfs("root"),
debootstrap("root"),
+ virtual_filesystems("root"),
apt(
"root",
[
@@ -344,8 +342,12 @@ def vmdb_spec(system, ansible_vars):
# If we didn't unpack an existing cache archive, make one now.
# Otherwise, skip this step.
cache_rootfs("root"),
- # This MUST be after the debootstrap step.
- virtual_filesystems("root"),
+ # Mount /boot on top of the root file system. This MUST be done after the
+ # debootstrap step: otherwise the root file system isn't empty, and then
+ # debootstrap fails.
+ mount("boot", dirname="/boot", mount_on="root"),
+ # Mount /boot/efi.
+ mount("efi", dirname="/boot/efi", mount_on="boot"),
# Create /etc/fstab (and, if LUKS is used, /etc/crypttab).
fstab("root"),
# These MUST come after the fstab step so that they add the