Signed-off-by: Xu Xijian <hdxuxijian(a)163.com>
---
src/scheduler/kernel_params.cr | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/scheduler/kernel_params.cr b/src/scheduler/kernel_params.cr
index bb5983f..cbafb9f 100644
--- a/src/scheduler/kernel_params.cr
+++ b/src/scheduler/kernel_params.cr
@@ -4,8 +4,11 @@
class Job
private def kernel_common_params
common_params = "user=lkp job=/lkp/scheduled/job.yaml RESULT_ROOT=/result/job ip=dhcp"
- return "#{common_params} rw" if "#{self.os_mount}" == "local"
- return "#{common_params} rootovl ro"
+ return "#{common_params} rootovl ro" unless "#{self.os_mount}" == "local"
+
+ use_root_partition = "/dev/mapper/os-#{os}_#{os_arch}_#{src_lv_suffix}" if @hash["src_lv_suffix"]? != nil
+ save_root_partition = "/dev/mapper/os-#{os}_#{os_arch}_#{boot_lv_suffix}" if @hash["boot_lv_suffix"]? != nil
+ return "#{common_params} local use_root_partition=#{use_root_partition} save_root_partition=#{save_root_partition} rw"
end
private def kernel_custom_params
@@ -20,7 +23,7 @@ class Job
"cifs" => "root=cifs://#{OS_HTTP_HOST}#{os_real_path}" +
",guest,ro,hard,vers=1.0,noacl,nouser_xattr,noserverino",
"initramfs" => "rdinit=/sbin/init prompt_ramdisk=0",
- "local" => "root=/dev/mapper/os-#{self.os}_#{self.os_arch}_#{self.os_version}",
+ "local" => "root=#{OS_HTTP_HOST}:#{os_real_path}", # root is just used to temporarily mount a root in initqueue stage when lvm is not ready
"container" => "",
}
--
2.23.0