Re: grub finding deployment



export GRUB_ENABLE_BLSCFG=true
After doing this during grub install the entries changed slightly =>
the kernel and initrd had now the prefix $(root)/
At that moment I realized that the kernel and initrd files on the
desktop are on the boot partition which is required by anaconda IIRC
so the root partition on the desktop install, actually has these files
(since it's a different partition but mounted into / at runtime as
/boot)

On the created stick I have no boot partition hence it cannot find it
by default.

So my question changes => Is this a bug?
grub2-mkconfig or the ostree grub.d magic should recognize not having
a separate boot partition and adjust the entries accordingly.

Regards,
Damian



On Thu, Dec 12, 2019 at 1:01 PM Damian Ivanov <damianatorrpm gmail com> wrote:

Hello Ryan,

Thanks for the response!

the grub2-mkconfig generated output does include ### BEGIN /etc/grub.d/15_ostree
so that is used to set up the grub.cfg file so grub2-mkconfig is the way to go.

But still the problem remains, the kernel line has 3 arguments - the
kernel, the root UUID and the ostree argument
linux16 /ostree/$deployment/vmlinuz-5.3.14-300.fc31.x86_64
ostree=/ostree/boot.1/$os/$deployment/1 root=UUID=$uuid

the subdirectory /ostree of the root filesystem has no such file
/ostree/$deployment/vmlinuz-5.3.14-300.fc31.x86_64
since that is in /boot/ostree/$deployment/vmlinuz-5.3.14-300.fc31.x86_64

on anaconda installed silverblue it is also like this but grub does not complain
when I do a manual deployment though grub complains that kernel must
be loaded first (was not found)
changing kernel and initrd lines to prepend /boot boots the system fine

What special command made this possible?
Do you have to invoke  grub2-switch-to-blscfg ?

Best Regards,
Damian

On Thu, Dec 12, 2019 at 7:09 AM Ryan <rymg19 gmail com> wrote:

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]