On Wed, Dec 23, 2015 at 2:37 PM, Jonathan Lebon <jlebon@xxxxxxxxxx> wrote: > ----- Original Message ----- >> OK part of my confusion is that 'grub2-mkconfig' does not work when >> called directly. Doing that results in a malformed grub.cfg. >> >> What is the correct way, on atomic builds, to recreate the grub.cfg? >> How does rpm-ostree do this? > > Yeah, I've been confused by that as well. I haven't bothered > investigating more, but it seems like running grub2-mkconfig > on a fresh boot works, whereas calling it after some > rpm-ostree operation such as upgrade/rebase will cause no > output from 15_ostree. For me, now on 23.39, even after fresh boot, and no matter where I direct -o to write the file, 15_ostree is empty. It's seems like it's not meant to be directly called. I've never had that command from user space produce a correct grub.cfg. But with one exception, within rpm-ostree updates or rollbacks, it produces correct grub.cfgs. So I think something else is calling that script, and also telling it where to put the grub.cfg (which goes in different locations depending on the firmware, because rabbits). I've variably gotten no menu entry grub.cfgs, and ones with linux16/initrd16 instead of linuxefi/initrdefi and I can't tell why this flips around other than there's some kind of state change that doesn't happen when it's correctly called. > >> The closest I get to a command is 'ostree admin instutil >> grub2-generate' but this fails with >> ** >> ERROR:src/libostree/ostree-bootloader-grub2.c:154:_ostree_bootloader_grub2_generate_config: >> assertion failed: (grub2_boot_device_id != NULL) >> Aborted (core dumped) >> >> I'm not sure what it wants. > > It's only meant to be called by the /etc/grub.d/15_ostree script, > which sets up some env vars for it. That said, it should probably > error out more gracefully. Well that sorta answers this bug: https://bugzilla.redhat.com/show_bug.cgi?id=1293986 But on a normal system /etc/default/grub is consumed by grub2-mkconfig, but that's not true on atomic. I've made changes to that file and yet those changes aren't rolled into the grub.cfg. So OK, there's 'ostree admin instutil set-karg' but I run into this problem https://bugzilla.redhat.com/show_bug.cgi?id=1293987 So now I have no idea whether 'ostree admin instutil' is user domain or just meant as helpers for some other scripts. So I think we need to know what the deprecated and new knobs are. -- Chris Murphy _______________________________________________ cloud mailing list cloud@xxxxxxxxxxxxxxxxxxxxxxx http://lists.fedoraproject.org/admin/lists/cloud@xxxxxxxxxxxxxxxxxxxxxxx