Skip to content

Commit fe652ad

Browse files
committed
Skip /etc/machine-info during live installs (#2036199)
/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>
1 parent 898217e commit fe652ad

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎pyanaconda/modules/payloads/payload/live_image/installation.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ def _install_tar(self):
363363
"--exclude", "./boot/loader",
364364
"--exclude", "./boot/efi/loader",
365365
"--exclude", "./etc/machine-id",
366+
"--exclude", "./etc/machine-info",
366367
"-xaf", self._tarfile,
367368
"-C", self._sysroot
368369
]
@@ -437,6 +438,7 @@ def _install_image(self):
437438
"--exclude", "/boot/loader/",
438439
"--exclude", "/boot/efi/loader/",
439440
"--exclude", "/etc/machine-id",
441+
"--exclude", "/etc/machine-info",
440442
os.path.normpath(self._mount_point) + "/",
441443
self._sysroot
442444
]

‎tests/unit_tests/pyanaconda_tests/modules/payloads/payload/test_module_payload_live.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ def test_install_image_task(self, exec_with_redirect, os_sync):
109109
"--exclude", "/boot/loader/",
110110
"--exclude", "/boot/efi/loader/",
111111
"--exclude", "/etc/machine-id",
112+
"--exclude", "/etc/machine-info",
112113
mount_point + "/",
113114
"/mnt/root"
114115
])
@@ -181,6 +182,7 @@ def test_install_tar_task(self, exec_with_redirect, os_sync):
181182
"--exclude", "./boot/loader",
182183
"--exclude", "./boot/efi/loader",
183184
"--exclude", "./etc/machine-id",
185+
"--exclude", "./etc/machine-info",
184186
"-xaf", f.name,
185187
"-C", "/mnt/root"
186188
])

0 commit comments

Comments
 (0)