Skip to content

Commit

Permalink
Skip /etc/machine-info during live installs (#2036199)
Browse files Browse the repository at this point in the history
/etc/machine-info should not be installed to the system, for
the same reason we don't install /etc/machine-id: it should be
system-specific, not the same for every install from the same
live image.

This should fix live installs with systemd 250+ not booting due
to the bootloader config snippets being named based on the
KERNEL_INSTALL_MACHINE_ID from the live image /etc/machine-info,
but grub2-mkconfig expecting them to be named according to the
installed system's newly-generated /etc/machine-id.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
  • Loading branch information
AdamWill committed Jan 5, 2022
1 parent 898217e commit fe652ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Expand Up @@ -363,6 +363,7 @@ def _install_tar(self):
"--exclude", "./boot/loader",
"--exclude", "./boot/efi/loader",
"--exclude", "./etc/machine-id",
"--exclude", "./etc/machine-info",
"-xaf", self._tarfile,
"-C", self._sysroot
]
Expand Down Expand Up @@ -437,6 +438,7 @@ def _install_image(self):
"--exclude", "/boot/loader/",
"--exclude", "/boot/efi/loader/",
"--exclude", "/etc/machine-id",
"--exclude", "/etc/machine-info",
os.path.normpath(self._mount_point) + "/",
self._sysroot
]
Expand Down
Expand Up @@ -109,6 +109,7 @@ def test_install_image_task(self, exec_with_redirect, os_sync):
"--exclude", "/boot/loader/",
"--exclude", "/boot/efi/loader/",
"--exclude", "/etc/machine-id",
"--exclude", "/etc/machine-info",
mount_point + "/",
"/mnt/root"
])
Expand Down Expand Up @@ -181,6 +182,7 @@ def test_install_tar_task(self, exec_with_redirect, os_sync):
"--exclude", "./boot/loader",
"--exclude", "./boot/efi/loader",
"--exclude", "./etc/machine-id",
"--exclude", "./etc/machine-info",
"-xaf", f.name,
"-C", "/mnt/root"
])
Expand Down

0 comments on commit fe652ad

Please sign in to comment.