Bug 1648472

Summary: Rawhide live installs don't boot because BLS snippets are wrong (because the live image ones are simply copied across)
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: rawhideCC: anaconda-maint-list, jonathan, kellin, robatino, vanmeeuwen+fedora, vponcova, wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-25 17:46:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1574713    

Description Adam Williamson 2018-11-09 20:03:48 UTC
Now the new BLS stuff - https://fedoraproject.org/wiki/Changes/BootLoaderSpecByDefault - has landed in Rawhide, default live installs are broken.

The problem is that the BLS entries in /boot/loader/entries are wrong. The paths they give for the kernel and initramfs have /boot at the start, but they should not, for an installed system with a /boot partition. That is, they look like this:

...
linux /boot/vmlinuz-(foo)
initrd /boot/initramfs-(foo)
...

but they should look like this:

...
linux /vmlinuz-(foo)
initrd /initramfs-(foo)
...

I *think* the reason for this is that the files are simply rsync'ed across by the live install process. They don't get regenerated during the live install at all. The code for the rsync invocation during a live install looks like this:

        cmd = "rsync"
        args = ["-pogAXtlHrDx", "--exclude", "/dev/", "--exclude", "/proc/",
                "--exclude", "/sys/", "--exclude", "/run/", "--exclude", "/boot/*rescue*",
                "--exclude", "/etc/machine-id", INSTALL_TREE + "/", util.getSysroot()]
        try:
            rc = util.execWithRedirect(cmd, args)

we can see that it's excluding various things, including /boot/*rescue* , but it's *not* excluding /boot/loader. So that presumably gets rsynced straight across. And nothing in live post-install causes the entries to get re-generated, I don't think. (During a non-live install, I expect the entries get generated during kernel or grub2 package install).

I'm currently experimenting with possible fixes for this. I think we need to exclude the BLS snippet dirs from the rsync, and do something in live postinstall to regenerate the entries.

Comment 1 Adam Williamson 2018-11-09 20:04:57 UTC
Seems like an obvious Beta blocker, as all live installs fail to boot (unless you happen to use custom partitioning and don't create a /boot , or disable BLS with the anaconda parameter to do that).

Comment 2 Adam Williamson 2018-11-09 23:59:35 UTC
https://github.com/rhinstaller/anaconda/pull/1688

Comment 3 Adam Williamson 2018-11-10 00:06:19 UTC
Since it's the weekend now (so this won't likely get reviewed till Monday) but I'd really like a non-screwed Rawhide compose to test other stuff, I sent out a build of anaconda with this fix patched in, for now:

https://koji.fedoraproject.org/koji/taskinfo?taskID=30768101

Comment 4 Adam Williamson 2018-11-25 17:46:03 UTC
The fix worked and was merged to master, so let's close this.