Re: How to generate a tree with custom kernel parameters (rpm-ostree + anaconda)



Well, now I realized the e-mail subtitle sounded like an assertion. It
was indeed a question.
So... does anyone have any idea about how to define extra kernel
parameters on deploying a tree?

On 19 August 2015 at 14:55, Leandro Santiago <leandrosansilva gmail com> wrote:
Hello to all, I'm using rpm-ostree to generate a custom system based
on centos and I also use anaconda+kickstart to automate the
installation process.

What happens now it that I'm having some KMS issues which is basically
unable to autodetect the right resolution, making the font very small.
I can solve this issue by adding some kernel parametes in the boot
loader (using grub2 here), but I could not find a way to do it during
tree building or installation time.

I created a dracut module which adds those parameters, but it seems
when grub generates the config files, such parameters are basically
ignored.

Here is the output of dracut --print-cmdline (the parameters I added
are vga=0x315 video=800x600-32 60)
root=UUID=e694605f-075c-438e-9c8d-617737afe5da
rootflags=rw,relatime,seclabel,data=ordered rootfstype=ext4 vga=0x315
video=800x600-32 60

And /proc/cmdline:
BOOT_IMAGE=/ostree/centos-atomic-egym-528d9d2f9222f45cf94bb5c995f492bc4f381880931144c058a42d787b838788/vmlinuz-3.10.0-229.11.1.el7.x86_64
root=UUID=e694605f-075c-438e-9c8d-617737afe5da
ostree=/ostree/boot.0/centos-atomic-egym/528d9d2f9222f45cf94bb5c995f492bc4f381880931144c058a42d787b838788/0

As you can see, the dracut parameters were basically ignored by grub2.

As I believe grub2-mkconfig is generated in the chrooted by the
anaconda script, I think I could solve it by adding some commands in
the %post section of my kickstart files or by somehow hooking the grub
files on /etc/grub.d.

I see ostree adds a file 15_ostree on that directory which ultimately
executes "ostree admin instutil grub2-generate". So I kind of thought
about adding a new file that would execute ostree admin instutil
set-kargs --append=..., but I'm not really sure if it would  work.

I personally prefer the second approach, because as I'll provide
system updates through ostree, all the required information will be in
the tree.

One third possibility which would require changes on rpm-ostree would
be adding an extra field in the tree.json file, something like
"extra-kernel-parameters".

Thanks in advance

--
Sent from my mind



-- 
Sent from my mind


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