kernel cmdline - allow duplicate keys



Hi,

It seems from _ostree_kernel_args_replace_take() in ot-admin-builtin-deploy.c that
we have adopted the philosophy that more than one option on the kernel command line
with the same key is not useful (i.e. foo=val1 foo=val2). I would argue that there
are some things that depend on this and maybe we should think about it a bit.

On a system I have a /proc/cmdline with a couple of repeated entries; the repeated
ones are *rd.lvm.lv* and *foo*. I then deploy an ostree image and notice that the
boot entries don't have any repeated values:

[root localhost ~]# rpm -q ostree
ostree-2014.5.39.gd5e813c-3.fc20.x86_64
[root localhost ~]#
[root localhost ~]# cat /proc/cmdline | sed 's/\s/\n/g' 
BOOT_IMAGE=/vmlinuz-3.11.10-301.fc20.x86_64
root=/dev/mapper/vg_root-lv_root
ro
console=ttyS0
crashkernel=auto
rd.lvm.lv=vg_root/lv_root
rd.lvm.lv=vg_root/lv_swap
vconsole.font=latarcyrheb-sun16
LANG=en_US.UTF-8
foo=bar
foo=baz
foo=baa
[root localhost ~]#
[root localhost ~]# ostree admin deploy --os=dusty dusty-atomic/rawhide/x86_64/base/core \
                     --karg-proc-cmdline --karg=selinux=0
Relabeling /var (no stamp file '/ostree/deploy/dusty/var/.ostree-selabeled' found)
Transaction complete; bootconfig swap: yes deployment count change: 1)
[root localhost ~]#
[root localhost ~]# cat /boot/loader/entries/ostree-dusty-0.conf | grep -P "^options" | sed 's/\s/\n/g'
options
BOOT_IMAGE=/vmlinuz-3.11.10-301.fc20.x86_64
root=/dev/mapper/vg_root-lv_root
ro
console=ttyS0
crashkernel=auto
rd.lvm.lv=vg_root/lv_swap
vconsole.font=latarcyrheb-sun16
LANG=en_US.UTF-8
foo=baa
selinux=0
ostree=/ostree/boot.1/dusty/b562bf86bba826c85274498fb06bb0fb01a295879b00c920890b3e5980f0092f/0
[root localhost ~]#


This results in a system that won't boot. I have to go in manually and add 
*rd.lvm.lv=vg_root/lv_root* to the kernel command line to get it to work. 

If necessary I'll open up a bug/feature request and maybe we can discuss a solution.

Thoughts?

Dusty


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