Andrei, thanks for your reply. I am a little bit confused. Maybe I don't clearly understand how booting from/with initrd occurs. Maybe the best if I explain what I would like to achieve. I want to set up an openSUSE Leap 15.1 system with all the programs I need installed and configured. Then copy this system exactly as is onto other disks (HD or SSD) which I put in other computers. Then those copied system should boot without any "could not find device" error. For system copy I want to use cp or rsync, not dd, that is the file system UUIDS will not be copied. I thought if I add LABELs to the file sytems and refer to the file systems at every necessary place (grub.cfg, fstab etc.) by these labels, the above would be feasible. I replaced all UUID= to LABEL= in grub.cfg and fstab. I am afraid if I leave root=UUID= and resume=UUID= in the initrd, the copied system will not boot and will give device not found error. On Sat, 23 Nov 2019 10:22:13 +0300, Andrei Borzenkov wrote:
23.11.2019 2:21, Istvan Gabor пишет:
Hello:
LONG SNIP
dracut does not overwrite anything because it does not interpret content of --kernel-cmdline option at all - it simply stores it verbatim.
OK, this is clear.
Another cmdline options come from dracut module that is responsible for root block device preparation, and this module is not aware that you tread on its territory.
dracut manual says that dracut command line options overwrite dracut configuration options in /etc/dracut.conf, /etc/dracut.conf.d/*.conf etc. It seems it still applies options from modules.
What do I do wrong and how could I set only root=LABEL=L151-KDE3-ext and resume=LABEL=swap-OSL kernel command line options in the initrd image?
If you insist you must store them in initrd (as opposed to specifying on kernel command line)
I don't understand this. By "specifying on kernel command line" do you mean "linux ... root= ... resume=" line in grub.cfg? I though I have to set these both in grub.cfg and in initrd for correct booting.
you could use --no-hostonly-cmdline which will skip storing auto-generated kernel command line. But keep in mind, this applies to *all* dracut modules. It will also no more add rootfstype & Co, so it is up to you to add *complete* correct kernel command line, not just the options you want to change.
I would not like to do this. Is there other way to disable auto-generated kernel command line? Thanks, Istvan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org