From fe53867b47d5369a22a7a17bcc31f1bba742f461 Mon Sep 17 00:00:00 2001 From: Stefan Schubert Date: Fri, 3 May 2024 14:40:06 +0200 Subject: [PATCH] set root in cmdline only while new installation --- src/lib/bootloader/systemdboot.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/bootloader/systemdboot.rb b/src/lib/bootloader/systemdboot.rb index 3c047cde7..d7171da1f 100644 --- a/src/lib/bootloader/systemdboot.rb +++ b/src/lib/bootloader/systemdboot.rb @@ -205,7 +205,11 @@ def write_sysconfig(prewrite: false) def create_menue_entries # writing kernel parameter to /etc/kernel/cmdline File.open(File.join(Yast::Installation.destdir, CMDLINE), "w+") do |fw| - fw.puts("root=#{Yast::BootStorage.root_partitions.first.name} #{kernel_params.serialize}") + if Yast::Stage.initial # while new installation only + fw.puts("root=#{Yast::BootStorage.root_partitions.first.name} #{kernel_params.serialize}") + else # root entry is already available + fw.puts(kernel_params.serialize) + end end begin