| Summary: | ostree admin instutil grub2-generate crashes, needs better definition for [bootversion] | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Chris Murphy <bugzilla> |
| Component: | ostree | Assignee: | Jonathan Lebon <jlebon> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 23 | CC: | bugzilla, jkrieger, jlebon, walters |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-05-30 14:29:47 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: | |
|
Description
Chris Murphy
2015-12-23 22:11:29 UTC
(In reply to Chris Murphy from comment #0) > Description of problem: > > Regardless of what I try for [bootversion] I get a crash, > ostree admin instutil -v grub2-generate > ** > ERROR:src/libostree/ostree-bootloader-grub2.c:154: > _ostree_bootloader_grub2_generate_config: assertion failed: > (grub2_boot_device_id != NULL) > Aborted (core dumped) Right, as mentioned on the mailing list, this shouldn't be manually called by the user, AFAICT. --- Related to what you're trying to do, I believe the following PR should fix your grub2-mkconfig woes: https://github.com/GNOME/ostree/pull/165 In the meantine, as a workaround, you can directly set the _OSTREE_GRUB2_BOOTVERSION env var to the current bootversion (e.g. if /boot/loader is pointing to loader.1, then it's 1). Hey Chris- Can you let us know if Jonathan's above comment worked for you? -bash-4.3# ls -l /boot
total 22
drwxr-xr-x. 3 root root 1024 Dec 31 1969 efi
drwxr-xr-x. 6 root root 1024 Mar 9 20:23 grub2
lrwxrwxrwx. 1 root root 8 Mar 9 15:53 loader -> loader.0
drwxr-xr-x. 3 root root 1024 Mar 9 20:23 loader.0
drwx------. 2 root root 12288 Mar 9 15:51 lost+found
drwxr-xr-x. 3 root root 1024 Mar 9 15:52 ostree
-bash-4.3# export _OSTREE_GRUB2_BOOTVERSION=0
-bash-4.3# ostree admin instutil -v grub2-generate
**
ERROR:src/libostree/ostree-bootloader-grub2.c:154:_ostree_bootloader_grub2_generate_config: assertion failed: (grub2_boot_device_id != NULL)
Aborted (core dumped)
-bash-4.3# rpm -q ostree
ostree-2015.11-2.fc23.x86_64
-bash-4.3# ostree admin status
* fedora-atomic 1a68c7b9c0ad54d438752c12666752639b502fe8c6f24004de60d68c01919062.0
Version: 23.79
origin refspec: fedora-atomic:fedora-atomic/f23/x86_64/docker-host
Hi Chris,
As mentioned earlier, the `grub2-generate` subcommand is not designed for running by the user. You should however be able to do e.g.
# bootver=$(readlink /boot/loader)
# _OSTREE_GRUB2_BOOTVERSION=${bootver#*.} grub2-mkconfig
And always have it output a functioning grub configuration file, regardless of the bootversion. Can you confirm that this works?
Yes this works. This should definitely be fixed in ostree-2016.5-3.fc23, now in stable. |