Bug 1100504
Summary: | rescue boot entry is listed first | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Chris Murphy <bugzilla> | ||||||||||
Component: | anaconda | Assignee: | Anaconda Maintenance Team <anaconda-maint-list> | ||||||||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||
Severity: | unspecified | Docs Contact: | |||||||||||
Priority: | unspecified | ||||||||||||
Version: | rawhide | CC: | anaconda-maint-list, awilliam, dshea, gczarcinski, g.kaviyarasu, jonathan, mkolman, mruckman, pjones, robatino, sbueno, vanmeeuwen+fedora, walters | ||||||||||
Target Milestone: | --- | ||||||||||||
Target Release: | --- | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||||
Doc Text: | Story Points: | --- | |||||||||||
Clone Of: | 1012646 | Environment: | |||||||||||
Last Closed: | 2014-09-04 17:28:02 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: | |||||||||||||
Attachments: |
|
Description
Chris Murphy
2014-05-23 00:11:14 UTC
Created attachment 898513 [details]
grub.cfg
Created attachment 898514 [details]
anaconda.program.log
OK, sorry, wrong. On Rawhide, the grub2-mkconfig grub.cfg contains one menu entry: for the non-rescue kernel, but it lacks an initrd line because it doesn't exist yet. The rescue kernel hasn't been installed at all so there's no menu entry for it. Next the primary (non-rescue) kernel initramfs gets created, and grubby updates the grub.cfg fixing the missing initrd line. Then the rescue kernel and its initramfs are installed, and grubby updates the grub.cfg again, which makes it the top listed and default menu entry. Confirmed that I also see this with Rawhide installs. anaconda-21.37-1.fc21.x86_64 grubby-8.35-1.fc21.x86_64 The same problem happens with extlinux. The extlinux.conf includes the line: default Fedora 21 Rescue c80f5da5274a456b83c73b3e3ab8b0bc (3.15.0-0.rc6.git0.1.fc21.x86_64) I found the problem and have a fix. A patch to anaconda will be submitted "real soon now." Or maybe not so soon. The problem: For a DVD or netinstall the rescue kernel and initramfs are done by anaconda-yum as part of the install process ... by something anyway because when stopped with pdb.set_trace() and only anaconda-yum is running installing all the rpms. After anaconda-yum completes but is still there, the recue kernel and initramfs have magically appeared in /boot. When the bootloader is installed, both regular and rescue kernels and initramfs files are there. Well, then the answer is to do the same thing for Liveinstall (livepayload.py). In livepayload.py, move the code generating the rescue kernel from postInstall() to the end of install(). Worked great for grub2. For extlinux, we do not have the rescue kernel anymore and it really looks like we should work from my inspection of the code. This code is from the commit which was part of anaconda-21.27 to: Add rescue kernels to the bootloader install list. (#1036349) Created attachment 899354 [details] new-kernel-pkg --rpmpost-trans need to immediately follow install OK, I believe that this patch fixes the problem with liveinst resulting in bad extlinux.conf and grub.cfg files. However, I figured out that the patch/update in 21.27 for BZ 1036349 does not currently work. The added code is not used for a DVD or network install and for a LiveInstall, it still does not handle the rescue kernel. OK, I have a winner! Both extlinux.conf and grub.cfg have two entries: regular and rescue as well as each having its own initramfs file ... and a good default to boot. Patch RSN as soon as I polish it up. Conceptually a lot of the gyrations here I think are fallout from the "dracut hostonly" changes. See: https://git.fedorahosted.org/cgit/anaconda.git/commit/?id=9b49dd182d2d2e2d02861fd3b6caa8492968abdb https://bugzilla.redhat.com/show_bug.cgi?id=1013087 which introduced further special casing in Anaconda for initramfs. The whole new-kernel-pkg -> /etc/kernel/postinst.d -> 51-dracut-rescue-postinst.sh -> new-kernel-pkg (!!!) -> ... is such a mess. Anyways from a code structure this looks conceptually right; the other payload types are setting up the kernel in their install, and this updates livePayload to match. THe submitted patch is good. I created an additional patch to address having a rescue kernel in extlinux.conf when a live install is done. This was attached to the re-opened BZ 1036349 This fix is in current anaconda git master (post-21.38), so marking MODIFIED. I tested the fix with an updates.img - available at http://www.happyassassin.net/updates/updates-1100504-1094489.img , it contains all changes in current anaconda git master - and it seems good, the 'regular' kernel is #1 in the list, rescue kernel is second. |