Also export root= boot param for hostonly-cmdline case.
If there's a root fallback, at least attempt to have it falling back to the last root filesystem this system ran off of. Signed-off-by: Thorsten Behrens <tbehrens@suse.com> Signed-off-by: Thomas Renninger <trenn@suse.de>master
parent
486030575d
commit
7700b3df4c
|
|
@ -29,14 +29,18 @@ cmdline_journal() {
|
|||
return 0
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
cmdline() {
|
||||
cmdline_rootfs() {
|
||||
local dev=/dev/block/$(find_root_block_device)
|
||||
if [ -e $dev ]; then
|
||||
printf " root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$dev")")"
|
||||
printf " rootflags=%s" "$(find_mp_fsopts /)"
|
||||
printf " rootfstype=%s" "$(find_mp_fstype /)"
|
||||
fi
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
cmdline() {
|
||||
cmdline_rootfs
|
||||
cmdline_journal
|
||||
}
|
||||
|
||||
|
|
@ -45,6 +49,8 @@ install() {
|
|||
if [[ $hostonly_cmdline == "yes" ]]; then
|
||||
local _journaldev=$(cmdline_journal)
|
||||
[[ $_journaldev ]] && printf "%s\n" "$_journaldev" >> "${initdir}/etc/cmdline.d/95root-journaldev.conf"
|
||||
local _rootdev=$(cmdline_rootfs)
|
||||
[[ $_rootdev ]] && printf "%s\n" "$_rootdev" >> "${initdir}/etc/cmdline.d/95root-dev.conf"
|
||||
fi
|
||||
|
||||
inst_multiple umount
|
||||
|
|
|
|||
Loading…
Reference in New Issue