add "--kernel-cmdline" and kernel_cmdline options for default parameters
parent
e0a393361d
commit
d20fb951fa
|
@ -208,6 +208,10 @@ example:
|
|||
specify additional directories, where to look for firmwares. This parameter
|
||||
can be specified multiple times.
|
||||
|
||||
**--kernel-cmdline <parameters>**::
|
||||
specify default kernel command line parameters
|
||||
|
||||
|
||||
**--kernel-only**::
|
||||
only install kernel drivers and firmware files
|
||||
|
||||
|
|
|
@ -100,6 +100,9 @@ If chrooted to another root other than the real root device, use --fstab and pro
|
|||
*ro_mnt*
|
||||
Mount _/_ and _/usr_ read-only by default.
|
||||
|
||||
*kernel_cmdline=*"__parameters__"::
|
||||
Specify default kernel command line parameters
|
||||
|
||||
*kernel_only=*"__{yes|no}__"::
|
||||
Only install kernel drivers and firmware files. (default=no)
|
||||
|
||||
|
|
|
@ -11,3 +11,4 @@ systemdsystemunitdir=/usr/lib/systemd/system
|
|||
udevdir=/usr/lib/udev
|
||||
add_dracutmodules+=" systemd "
|
||||
realinitpath="/usr/lib/systemd/systemd"
|
||||
kernelcmdline+=" rd.auto=1 "
|
11
dracut.sh
11
dracut.sh
|
@ -89,6 +89,7 @@ Creates initial ramdisk images for preloading modules
|
|||
firmwares, separated by :
|
||||
--kernel-only Only install kernel drivers and firmware files
|
||||
--no-kernel Do not install kernel drivers and firmware files
|
||||
--kernel-cmdline [PARAMETERS] Specify default kernel command line parameters
|
||||
--strip Strip binaries in the initramfs
|
||||
--nostrip Do not strip binaries in the initramfs (default)
|
||||
--hardlink Hardlink files in the initramfs (default)
|
||||
|
@ -275,6 +276,7 @@ TEMP=$(unset POSIXLY_CORRECT; getopt \
|
|||
--long force \
|
||||
--long kernel-only \
|
||||
--long no-kernel \
|
||||
--long kernel-cmdline: \
|
||||
--long strip \
|
||||
--long nostrip \
|
||||
--long hardlink \
|
||||
|
@ -330,6 +332,7 @@ while :; do
|
|||
--add-fstab) push add_fstab_l "$2"; shift;;
|
||||
--mount) push fstab_lines "$2"; shift;;
|
||||
--device) push host_devs "$2"; shift;;
|
||||
--kernel-cmdline) push kernel_cmdline_l "$2"; shift;;
|
||||
--nofscks) nofscks_l="yes";;
|
||||
--ro-mnt) ro_mnt_l="yes";;
|
||||
-k|--kmoddir) drivers_dir_l="$2"; shift;;
|
||||
|
@ -646,6 +649,12 @@ if (( ${#omit_drivers_l[@]} )); then
|
|||
fi
|
||||
omit_drivers=${omit_drivers/-/_}
|
||||
|
||||
if (( ${#kernel_cmdline_l[@]} )); then
|
||||
while pop kernel_cmdline_l val; do
|
||||
kernel_cmdline+=" $val "
|
||||
done
|
||||
fi
|
||||
|
||||
omit_drivers_corrected=""
|
||||
for d in $omit_drivers; do
|
||||
strstr " $drivers $add_drivers " " $d " && continue
|
||||
|
@ -928,6 +937,8 @@ fi
|
|||
if [[ $kernel_only != yes ]]; then
|
||||
(( ${#install_items[@]} > 0 )) && dracut_install ${install_items[@]}
|
||||
|
||||
echo "$kernel_cmdline" >> "${initdir}/etc/cmdline.d/01-default.conf"
|
||||
|
||||
while pop fstab_lines line; do
|
||||
echo "$line 0 0" >> "${initdir}/etc/fstab"
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue