summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-02-16 18:52:10 +0200
committerLars Wirzenius <liw@liw.fi>2022-06-21 16:04:32 +0300
commitbe31f03edaccc91e2e12086178cd2442c6dfb2d4 (patch)
tree031f2922e76d3b5129f5bd8ce25c7d0e3ede279d
parent88bc65839f50df16684ac1a828b5249e73448376 (diff)
downloadv-i-be31f03edaccc91e2e12086178cd2442c6dfb2d4.tar.gz
fix: don't mount anything on root before debootstrap is run
Sponsored-by: author
-rwxr-xr-xv-i15
1 files changed, 8 insertions, 7 deletions
diff --git a/v-i b/v-i
index 8bdd6dd..c8beaaf 100755
--- a/v-i
+++ b/v-i
@@ -299,12 +299,6 @@ def vmdb_spec(system, ansible_vars):
# ext4 seems like a safe choice. If you wanted another file
# system, sorry.
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"),
]
)
@@ -320,6 +314,8 @@ def vmdb_spec(system, ansible_vars):
steps.extend(
[
+ # Mount the root file system.
+ mount("root"),
# If we have a cached version of the installed system, unpack
# it now. Otherwise do nothing. Note that if you make any
# changes to the steps marked "unless: rootfs_unpacked", you
@@ -345,8 +341,13 @@ 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