On Fri, Sep 7, 2018 at 3:58 PM, Jason L Tibbitts III <tibbs@xxxxxxxxxxx> wrote: >>>>>> "CM" == Chris Murphy <lists@xxxxxxxxxxxxxxxxx> writes: > > CM> Well, I can't really parse this very well, but the default kernel > CM> looks like it is changed by grubby, but I can't figure out the > CM> ordering. It's seems plausible, perhaps likely, that it starts off > CM> dracut and the grub2-editenv at the same time, and of course editenv > CM> completes pretty much instantly compared to dracut. > > I don't know; I don't see anything being done asynchronously. I think > it's not complicated at all, actually, and isn't grubby's fauilt. > Instead it's simply 20-grub.install doing things in the wrong order. It > calls new-kernel-package times (with the pre-usrmove path): > > /sbin/new-kernel-pkg --package "kernel${flavor}" --install "$KERNEL_VERSION" || exit $? > /sbin/new-kernel-pkg --package "kernel${flavor}" --mkinitrd --dracut --depmod --update "$KERNEL_VERSION" || exit $? > /sbin/new-kernel-pkg --package "kernel${flavor}" --rpmposttrans "$KERNEL_VERSION" || exit $? > > So it calls grubby first and creates the initrd afterwards. The third > call just ends up running > /etc/kernel/postinst.d/51-dracut-rescue-postinst.sh. Which calls > new-kernel-pkg again (WTF?): But also the first new-kernel-pkg with --install calls grubby with makedefault, which is what I think is setting grubenv with the new kernel variable before the initramfs and final grub.cfg modification are done. > > new-kernel-pkg --install "$KERNEL_VERSION" --kernel-image "$NEW_KERNEL_IMAGE" --initrdfile "$INITRDFILE" --banner "$NAME $VERSION_ID Rescue $MACHINE_ID" > > I've never seen anything other than the rescue image put on the system > at initial install so I'm not sure at all what that's about. And for > extra fun, the /usr/lib/kernel/install.d/51-dracut-rescue.install script > will run after all of this, though I haven't figured out what that > actually does at this point since it appears to mostly work with the new > bootloader entry system. > > The timeline of Primer is less confusing than this. Well I love how you start out with it's not complicated at all, but then end with, it's a Rube Goldberg contraption. :-P I definitely think it's a Rube Goldberg contraption. I can't tell you stracing this helps figuring out the actual order because at least with -ff -o I end up with hundreds of files. So that's pretty tedious to sift through. But if you do, also use -D, or the stracing will prevent FITHAW from happening, and your system will be locked up for good, unless you already have a shell handy to manually issue fsfreeze -u -- Chris Murphy _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx