diff options
author | rtkapiper <andy.piper@arcticwolf.com> | 2023-07-11 17:51:50 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2023-07-14 15:30:39 +0000 |
commit | e74b33172b7298ec08177af4d1ee9fba147e7845 (patch) | |
tree | 208f7bee1426065669ced8caffeb2d2bd851fc12 | |
parent | 072472c4107ee3c6e81962038c0d77da16d0d931 (diff) | |
download | vmdb2-e74b33172b7298ec08177af4d1ee9fba147e7845.tar.gz |
grub_plugin.py: mount /proc before calling get_image_loop_device
Update grub_plugin.py to mount the `/proc` filesystem before calling
`get_image_loop_device()`, because the `/proc` filesystem is required by
the `lvs` command used to probe for a rootfs inside LVM volumes.
-rw-r--r-- | vmdb/plugins/grub_plugin.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vmdb/plugins/grub_plugin.py b/vmdb/plugins/grub_plugin.py index 1bfdda8..b28d502 100644 --- a/vmdb/plugins/grub_plugin.py +++ b/vmdb/plugins/grub_plugin.py @@ -152,6 +152,7 @@ class GrubStepRunner(vmdb.StepRunnerInterface): tag = values["tag"] or values["root-fs"] or None root_dev = state.tags.get_dev(tag) chroot = state.tags.get_builder_mount_point(tag) + self.bind_mount_many(chroot, ["/dev", "/sys", "/proc"], state) image_dev = values["image-dev"] or None if image_dev is None: @@ -174,7 +175,6 @@ class GrubStepRunner(vmdb.StepRunnerInterface): quiet = values["quiet"] - self.bind_mount_many(chroot, ["/dev", "/sys", "/proc"], state) if efi_dev: pn = efi_dev[-1] vmdb.runcmd(["parted", "-s", image_dev, "set", pn, "esp", "on"]) |