Red Hat Bugzilla – Bug 1467939
Fatal error during installation after setting /var as a mountpoint
Last modified: 2017-07-10 11:04:23 EDT
Description of problem:
Receiving a fatal error after setting up the disk to have /var in a separate partition.
Version-Release number of selected component (if applicable):
RHEL Atomic Host 7.4
Steps to Reproduce:
1. Boot up 7.4 ISO to Anaconda installer
2. Select US English language/keyboard.
3. Select 'Installation Destination'
4. Select 'I will configure partitioning' under 'Other storage options'
5. Click Done
6. Click 'Click here to create them automatically'
7. Click + and add /var as a mountpoint with a valid capacity for your configuration. I used 5GiB.
8. Click Done and confirm the changes.
9. Click on 'Begin Installation'
The following error occurred while installing. This is a fatal error and installation will be aborted.
systemd-tmpfiles ['--create', '--boot', '--root=/mnt/sysimage/ostree/deploy/rhel-atomic-host/deploy/8018f95c2f2f38a79e68f174dd5888b53769c0e4adcd89c87a802219091c9d0e.0', '--prefix=/var/lib/rpm'] exited with code 1
Successful installation of Atomic Host
I am installing through libvirt using the 7.4 Installation ISO.
Created attachment 1294657 [details]
I noticed while debugging this that the systemd-tmpfiles we have is sort of ignoring `--prefix`; I get a bunch of files created if I do `--prefix=/var/home`. But, things do succeed if I entirely drop `--prefix`.
The systemd in e.g. F26 works correctly with this.
I also confirmed that the RHEL 7.3 systemd-tmpfiles honors --prefix correctly.
So this patch gets us past the bug:
diff --git a/pyanaconda/packaging/rpmostreepayload.py b/pyanaconda/packaging/rpmostreepayload.py
index da7650d3b..003f3a05f 100644
@@ -300,8 +300,12 @@ class RPMOSTreePayload(ArchivePayload):
# matching NSS configuration inside Anaconda, and we can't "chroot" to
# get it because that would require mounting the API filesystems in the
- for varsubdir in ('home', 'roothome', 'lib/rpm', 'opt', 'srv',
- 'usrlocal', 'mnt', 'media', 'spool/mail'):
+ # Note this version differs from Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1467939
+ rpmdblink = iutil.getSysroot() + '/var/lib/rpm'
+ os.symlink('../../usr/share/rpm', rpmdblink)
+ for varsubdir in ('home', 'roothome', 'opt', 'srv',
+ 'usrlocal', 'mnt', 'media'):
["--create", "--boot", "--root=" + iutil.getSysroot(),
"--prefix=/var/" + varsubdir])
But...it reveals other bugs in Anaconda here; this bug seems worse in RHEL:
The kickstart workaround isn't bad, but the UX if you go through the interactive path is awful since, well, you can't log in to fix it (without init=/bin/sh).
So big picture, I think this is going to need a round of fixes in Fedora and we should try 7.5.