On Sat, 23 Nov 2019 13:10:25 +0100, Istvan Gabor wrote:
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.
I read again dracut manual. I guess if I want to achieve the above probably is better to make an initrd with hostonly option disabled (-N option). On my system this generates a 47 MB initrd image vs the default (hostonly) 8.7 MB image. I also played a little bit with dracut trying the kernel-cmdline and no-hostonly-cmdline options and looking in the created initrd images (in all cases openSUSE default hostonly mode is enabled). When hostonly mode is enabled in initrd image these files are created: etc/cmdline.d/95resume.conf: etc/cmdline.d/95root-dev.conf with contents resume=UUID=ca1f9a2d-468f-4718-b993-d7041556be8c and root=UUID=c6a2aa57-1ff2-4ebd-a1fb-e56cf4b3a4b9 rootfstype=ext4 rootflags=rw,relatime,data=ordered When --no-hostonly-cmdline option is used, the above two files are not created. When --kernel-cmdline "parameter" is used an etc/cmdline.d/01-default.conf file is created with the specified parameter. So when I use both --no-hostonly-cmdline and --kernel-cmdline "parameter" then only etc/cmdline.d/01-default.conf is createdwith the specified parameter in the initrd image. I guess this is what I need if I want to have only my specified kernel command line in initrd. Thanks again, Istvan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org