summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-06-22 14:05:14 +0300
committerLars Wirzenius <liw@liw.fi>2022-06-22 14:51:29 +0300
commitb1856ce78329c849893747233bd53cdaba5fb958 (patch)
tree4e18420b5b6c626faa19313bb95fd3afd499414a
parentbe31f03edaccc91e2e12086178cd2442c6dfb2d4 (diff)
downloadv-i-b1856ce78329c849893747233bd53cdaba5fb958.tar.gz
Revert "fix: don't mount anything on root before debootstrap is run"
This reverts commit be31f03edaccc91e2e12086178cd2442c6dfb2d4. That change broke the image: file system damage.
-rwxr-xr-xv-i15
1 files changed, 7 insertions, 8 deletions
diff --git a/v-i b/v-i
index c8beaaf..8bdd6dd 100755
--- a/v-i
+++ b/v-i
@@ -299,6 +299,12 @@ 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"),
]
)
@@ -314,8 +320,6 @@ 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
@@ -341,13 +345,8 @@ 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