X-Git-Url: https://code.delx.au/refind/blobdiff_plain/9fae4baf8d94a3959c142f04a1cd896fab19580f..16025084e9b3cf79dc13b84cd96ee850ff34296a:/refind-install diff --git a/refind-install b/refind-install index 2562d1e..f0fc2b2 100755 --- a/refind-install +++ b/refind-install @@ -1099,7 +1099,12 @@ GenerateRefindLinuxConf() { fi fi if [[ $RootDir == "/" ]] ; then - DefaultOptions=`cat /proc/cmdline | cut -d ' ' -f 2- | sed 's/$/ /' | sed 's/initrd=.* //g' | sed 's/ *$//'` + local FirstCmdlineOption=`cat /proc/cmdline | cut -d ' ' -f 1` + if [[ "$FirstCmdlineOption" =~ (vmlinuz|bzImage|kernel) ]] ; then + DefaultOptions=`cat /proc/cmdline | cut -d ' ' -f 2- | sed 's/\S*initrd=\S*//g' | sed 's/ *$//' | sed 's/^ *//'` + else + DefaultOptions=`cat /proc/cmdline | sed 's/\S*initrd=\S*//g' | sed 's/ *$//' | sed 's/^ *//'` + fi else if [[ -f "$RootDir/etc/default/grub" ]] ; then # We want the default options used by the distribution, stored here....