Re: grub finding deployment



The file that calls the grub generator from OSTree is /etc/grub.d/15_ostree, and the code where the assertion failure occurs is line 172 of this file: https://github.com/ostreedev/ostree/blob/d69214ade3d5b187ebfbb791d7cfb36155c4f8dd/src/libostree/ostree-bootloader-grub2.c

It's basically reading some environment variables set by the grub generator script. In general, you should not interface with these commands manually and instead run grub2-mkconfig as usual.

On Wed, Dec 11, 2019, 12:30 PM Damian Ivanov via ostree-list <ostree-list gnome org> wrote:
Hello!

What makes grub read the ostree argument and apply that as search
directory for the kernel directory and initrd as well?

I got a deployment from desktop installation (the ostree repo) to usb stick.
Grub works not 100% properly (installed via grub2-install since:)

bootver=$(readlink $NEW_SYSROOT/boot/loader)
_OSTREE_GRUB2_BOOTVERSION=${bootver#*.} ostree admin instutil grub2-generate

grub2.c:172:_ostree_bootloader_grub2_generate_config: assertion
failed: (grub2_boot_device_id != NULL)
from inside and outside (--sysroot /mnt/sysroot) the chroot with and
without the bootver variable

grub shows up and has this argument
ostree=/ostree/boot.1/$os/$deployment/1

although when trying to boot the entry it complains that it can not
find the kernel which must be loaded first and is not in that
directory below:

changing:

linux16 /ostree/$deployment/vmlinuz-5.3.14-300.fc31.x86_64
initrd16 /ostree/$deployment/initramfs-5.3.14-300.fc31.x86_64.img

to:

linux16 /boot/ostree/$deployment/vmlinuz-5.3.14-300.fc31.x86_64
initrd16 /boot/ostree/$deployment/initramfs-5.3.14-300.fc31.x86_64.img

and leaving the ostree= kernel arg intact boots it up though


Thanks in advance!
Regards,
Damian
_______________________________________________
ostree-list mailing list
ostree-list gnome org
https://mail.gnome.org/mailman/listinfo/ostree-list


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]