Bug 1059298

Summary: yast bootloader merges the current and the proposed configuration when installing from a LiveCD
Product: [openSUSE] openSUSE Tumbleweed Reporter: David Cassany <dcassany>
Component: YaST2Assignee: YaST Team <yast-internal>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: dcassany, dimstar, fvogt, jlopez, jreidinger, sb56637
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://trello.com/c/7ywD9b2R
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: yast logs

Description David Cassany 2017-09-19 08:00:23 UTC
With the latest version if KIWI LiveCDs are using dracut for creating and booting the initrd, resulting in smaller and faster initrd images. In order to do that KIWI makes use of some specific kernel parameters like root=live:CDLABEL=FOO among others.

The issue appears using the yast installer from a livecd created with the latest KIWI, the merge method of src/lib/bootloader/grub2base.rb merges all the livecd specific parameters to the suggested grub2 configuration, leading to an inconsistent configuration. Basically, boot configuration (/boot/grub2/grub.cfg) ends up being something like:

(...)
echo 'Loading Linux 4.13.1-1-default'
linux /boot/vmlinuz-4.13.1-1-default root=UUID=<uuid> ${extra_cmdline} quiet root=live=CDLABEL rd.live.image rd.live.overlay.persistent rd.live.overlay.cowfs=ext4 kiwi_hybrid=1 resume=/dev/sda1 splash=silent quiet showopts
(...)

IMHO, on fresh installs from a livecd there is no need to merge the current configuration with the proposed one as they belong to very different scenarios. The issue did not appear earlier because kiwi isoboot initrd images where not using any specific parameter.

The issue can be seen the images from: 

https://build.opensuse.org/package/show/openSUSE:Factory:Live/livecd-openSUSE
Comment 1 José Iván López González 2017-09-19 15:37:32 UTC
Could you please attach the YaST logs? See https://en.opensuse.org/openSUSE:Report_a_YaST_bug
Comment 2 Josef Reidinger 2017-09-19 16:02:25 UTC
Well, bootloader always copy installation parameters as it can often contain mandatory ones for booting like modules blacklisting. But on other hand I really agree that root parameter should be prevented. For others it is quite tricky, but it is just proposal and you can always modify it.
Comment 3 David Cassany 2017-09-22 14:34:50 UTC
Created attachment 741639 [details]
yast logs

I did a tar from the complete /var/log/YaST2 folder, I guess this is what I was asked for.
Comment 4 José Iván López González 2017-09-26 08:59:27 UTC
Thanks. We create a new card to take it into account in our Scrum sprints.

Tracked to Trello: https://trello.com/c/7ywD9b2R
Comment 5 Bernhard Wiedemann 2017-09-29 06:02:01 UTC
This is an autogenerated message for OBS integration:
This bug (1059298) was mentioned in
https://build.opensuse.org/request/show/529112 Factory:Live / live-net-installer
Comment 6 Fabian Vogt 2017-09-29 06:51:56 UTC
(In reply to Bernhard Wiedemann from comment #5)
> This is an autogenerated message for OBS integration:
> This bug (1059298) was mentioned in
> https://build.opensuse.org/request/show/529112 Factory:Live /
> live-net-installer

This includes a workaround that strips various options from the cmdline before passing it to YaST via /etc/install.inf.
Comment 7 S. B. 2017-10-21 15:59:07 UTC
It looks like the fix is in Tumbleweed but not Leap 42.3? Or am I interpreting this wrong?

Meanwhile, a **very** dirty hack to work around this appears to be forcing /proc/cmdline to be blank:
https://wiki.archlinux.org/index.php/kernel_parameters#Hijacking_cmdline
Comment 8 Fabian Vogt 2017-10-21 17:19:09 UTC
(In reply to S. B. from comment #7)
> It looks like the fix is in Tumbleweed but not Leap 42.3? Or am I
> interpreting this wrong?

There is no official installable live media for 42.3.
The only one I'm aware of (Argon) is not affected as it is built with an older version of kiwi.
Comment 9 Fabian Vogt 2019-12-05 14:27:20 UTC
(In reply to Fabian Vogt from comment #6)
> (In reply to Bernhard Wiedemann from comment #5)
> > This is an autogenerated message for OBS integration:
> > This bug (1059298) was mentioned in
> > https://build.opensuse.org/request/show/529112 Factory:Live /
> > live-net-installer
> 
> This includes a workaround that strips various options from the cmdline
> before passing it to YaST via /etc/install.inf.

Got accepted a while ago.