Update
This commit is contained in:
parent
b21451bbd4
commit
6f1f3a529f
|
@ -15,20 +15,20 @@ menuentry "EFI {OSNAME} ({KERNEL})" {
|
||||||
|
|
||||||
submenuentry "{OSNAME} ({KERNEL})" {
|
submenuentry "{OSNAME} ({KERNEL})" {
|
||||||
loader /EFI/Linux/{KERNEL_VMLINUZ}
|
loader /EFI/Linux/{KERNEL_VMLINUZ}
|
||||||
initrd /EFI/Linux/{INITRAMFS}
|
initrd /EFI/Linux/{INITRAMFS}.img
|
||||||
options "{CMDLINE}"
|
options "{CMDLINE}"
|
||||||
}
|
}
|
||||||
|
|
||||||
submenuentry "{OSNAME} ({KERNEL}) fallback" {
|
submenuentry "{OSNAME} ({KERNEL}) fallback" {
|
||||||
loader /EFI/Linux/{KERNEL_VMLINUZ}
|
loader /EFI/Linux/{KERNEL_VMLINUZ}
|
||||||
initrd /EFI/Linux/{INITRAMFS_FALLBACK}
|
initrd /EFI/Linux/{INITRAMFS}-fallback.img
|
||||||
options "{CMDLINE}"
|
options "{CMDLINE}"
|
||||||
}
|
}
|
||||||
|
|
||||||
submenuentry "{OSNAME} ({KERNEL}) fallback terminal" {
|
submenuentry "{OSNAME} ({KERNEL}) fallback terminal" {
|
||||||
loader /EFI/Linux/{KERNEL_VMLINUZ}
|
loader /EFI/Linux/{KERNEL_VMLINUZ}
|
||||||
initrd /EFI/Linux/{INITRAMFS_FALLBACK}
|
initrd /EFI/Linux/{INITRAMFS}-fallback-terminal.img
|
||||||
options "{CMDLINE} systemd.unit=multi-user.target"
|
options "{CMDLINE_TERMINAL}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,19 +4,19 @@ menuentry "{OSNAME} ({KERNEL})" {
|
||||||
graphics on
|
graphics on
|
||||||
|
|
||||||
loader /EFI/Linux/{KERNEL_VMLINUZ}
|
loader /EFI/Linux/{KERNEL_VMLINUZ}
|
||||||
initrd /EFI/Linux/{INITRAMFS}
|
initrd /EFI/Linux/{INITRAMFS}.img
|
||||||
options "{CMDLINE}"
|
options "{CMDLINE}"
|
||||||
|
|
||||||
submenuentry "{OSNAME} ({KERNEL}) fallback" {
|
submenuentry "{OSNAME} ({KERNEL}) fallback" {
|
||||||
loader /EFI/Linux/{KERNEL_VMLINUZ}
|
loader /EFI/Linux/{KERNEL_VMLINUZ}
|
||||||
initrd /EFI/Linux/{INITRAMFS_FALLBACK}
|
initrd /EFI/Linux/{INITRAMFS}-fallback.img
|
||||||
options "{CMDLINE}"
|
options "{CMDLINE}"
|
||||||
}
|
}
|
||||||
|
|
||||||
submenuentry "{OSNAME} ({KERNEL}) fallback terminal" {
|
submenuentry "{OSNAME} ({KERNEL}) fallback terminal" {
|
||||||
loader /EFI/Linux/{KERNEL_VMLINUZ}
|
loader /EFI/Linux/{KERNEL_VMLINUZ}
|
||||||
initrd /EFI/Linux/{INITRAMFS_FALLBACK}
|
initrd /EFI/Linux/{INITRAMFS}-fallback-terminal.img
|
||||||
options "{CMDLINE} systemd.unit=multi-user.target"
|
options "{CMDLINE_TERMINAL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
submenuentry "EFI {OSNAME} ({KERNEL})" {
|
submenuentry "EFI {OSNAME} ({KERNEL})" {
|
||||||
|
|
|
@ -15,20 +15,20 @@ menuentry "EFI {OSNAME} ({KERNEL})" {
|
||||||
|
|
||||||
submenuentry "{OSNAME} ({KERNEL})" {
|
submenuentry "{OSNAME} ({KERNEL})" {
|
||||||
loader /EFI/Linux/{KERNEL_VMLINUZ}
|
loader /EFI/Linux/{KERNEL_VMLINUZ}
|
||||||
initrd /EFI/Linux/{INITRAMFS}
|
initrd /EFI/Linux/{INITRAMFS}.img
|
||||||
options "{CMDLINE}"
|
options "{CMDLINE}"
|
||||||
}
|
}
|
||||||
|
|
||||||
submenuentry "{OSNAME} ({KERNEL}) fallback" {
|
submenuentry "{OSNAME} ({KERNEL}) fallback" {
|
||||||
loader /EFI/Linux/{KERNEL_VMLINUZ}
|
loader /EFI/Linux/{KERNEL_VMLINUZ}
|
||||||
initrd /EFI/Linux/{INITRAMFS_FALLBACK}
|
initrd /EFI/Linux/{INITRAMFS}-fallback.img
|
||||||
options "{CMDLINE}"
|
options "{CMDLINE}"
|
||||||
}
|
}
|
||||||
|
|
||||||
submenuentry "{OSNAME} ({KERNEL}) fallback terminal" {
|
submenuentry "{OSNAME} ({KERNEL}) fallback terminal" {
|
||||||
loader /EFI/Linux/{KERNEL_VMLINUZ}
|
loader /EFI/Linux/{KERNEL_VMLINUZ}
|
||||||
initrd /EFI/Linux/{INITRAMFS_FALLBACK}
|
initrd /EFI/Linux/{INITRAMFS}-fallback-terminal.img
|
||||||
options "{CMDLINE} systemd.unit=multi-user.target"
|
options "{CMDLINE_TERMINAL}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,25 +87,27 @@ theme=$(cat "/etc/refind-menu-generator/theme.conf" | awk '{$1=$1;print}')
|
||||||
if [ -d "$KERNEL_DIR" ]; then
|
if [ -d "$KERNEL_DIR" ]; then
|
||||||
|
|
||||||
if [ -f "${ESP}/EFI/Linux/cmdline.txt" ]; then
|
if [ -f "${ESP}/EFI/Linux/cmdline.txt" ]; then
|
||||||
CMDLINE=$(sed -e 's/^[[:space:]]//g' -e 's/[[:space:]]$//g' "${ESP}/EFI/Linux/cmdline.txt")
|
cmdline=$(sed -e 's/^[[:space:]]//g' -e 's/[[:space:]]$//g' "${ESP}/EFI/Linux/cmdline.txt")
|
||||||
|
|
||||||
elif [ -f "/etc/kernel/cmdline" ]; then
|
elif [ -f "/etc/kernel/cmdline" ]; then
|
||||||
CMDLINE=$(sed -e 's/^[[:space:]]//g' -e 's/[[:space:]]$//g' "/etc/kernel/cmdline")
|
cmdline=$(sed -e 's/^[[:space:]]//g' -e 's/[[:space:]]$//g' "/etc/kernel/cmdline")
|
||||||
|
|
||||||
elif [ -f "/boot/refind_linux.conf" ]; then
|
elif [ -f "/boot/refind_linux.conf" ]; then
|
||||||
CMDLINE=$(head -n 1 < "/boot/refind_linux.conf" | sed -e 's|"Boot with standard options"||g' | awk '{$1=$1;print}' | sed -e 's/"//g')
|
cmdline=$(head -n 1 < "/boot/refind_linux.conf" | sed -e 's|"Boot with standard options"||g' | awk '{$1=$1;print}' | sed -e 's/"//g')
|
||||||
|
|
||||||
elif [ -f "/efi/refind_linux.conf" ]; then
|
elif [ -f "/efi/refind_linux.conf" ]; then
|
||||||
CMDLINE=$(head -n 1 < "/efi/refind_linux.conf" | sed -e 's|"Boot with standard options"||g' | awk '{$1=$1;print}' | sed -e 's/"//g')
|
cmdline=$(head -n 1 < "/efi/refind_linux.conf" | sed -e 's|"Boot with standard options"||g' | awk '{$1=$1;print}' | sed -e 's/"//g')
|
||||||
|
|
||||||
elif [ -f "/boot/efi/refind_linux.conf" ]; then
|
elif [ -f "/boot/efi/refind_linux.conf" ]; then
|
||||||
CMDLINE=$(head -n 1 < "/boot/efi/refind_linux.conf" | sed -e 's|"Boot with standard options"||g' | awk '{$1=$1;print}' | sed -e 's/"//g')
|
cmdline=$(head -n 1 < "/boot/efi/refind_linux.conf" | sed -e 's|"Boot with standard options"||g' | awk '{$1=$1;print}' | sed -e 's/"//g')
|
||||||
|
|
||||||
else
|
else
|
||||||
CMDLINE=$(sed -e 's/^[[:space:]]//g' -e 's/[[:space:]]$//g' -e 's/initrd.*$//g' "/proc/cmdline")
|
cmdline=$(sed -e 's/^[[:space:]]//g' -e 's/[[:space:]]$//g' -e 's/initrd.*$//g' "/proc/cmdline")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$CMDLINE"
|
cmdline_terminal="$cmdline systemd.unit=multi-user.target"
|
||||||
|
|
||||||
|
echo "$cmdline"
|
||||||
|
|
||||||
manual_conf=$(mktemp)
|
manual_conf=$(mktemp)
|
||||||
|
|
||||||
|
@ -124,10 +126,9 @@ if [ -d "$KERNEL_DIR" ]; then
|
||||||
|
|
||||||
initramfs_tpl=$(echo "initramfs-$kernel" | sed "s/vmlinuz-//g")
|
initramfs_tpl=$(echo "initramfs-$kernel" | sed "s/vmlinuz-//g")
|
||||||
initramfs="$initramfs_tpl.img"
|
initramfs="$initramfs_tpl.img"
|
||||||
initramfs_fallback="$initramfs_tpl-fallback.img"
|
|
||||||
|
|
||||||
echo "OSNAME: $osname; THEME: $theme; ICON: $icon; KERNEL: $kernel; KERNEL_EFI: $kernel_efi; KERNEL_VMLINUZ: $kernel_vmlinuz; INITRAMFS: $initramfs; INITRAMFS_FALLBACK: $initramfs_fallback; CMDLINE: $CMDLINE"
|
echo "OSNAME: $osname; THEME: $theme; ICON: $icon; KERNEL: $kernel; KERNEL_EFI: $kernel_efi; KERNEL_VMLINUZ: $kernel_vmlinuz; INITRAMFS: $initramfs; CMDLINE: $cmdline"
|
||||||
sed -e "s|{OSNAME}|$osname|g" -e "s|{THEME}|$theme|g" -e "s|{ICON}|$icon|g" -e "s|{KERNEL}|$kernel|g" -e "s|{KERNEL_EFI}|$kernel_efi|g" -e "s|{KERNEL_VMLINUZ}|$kernel_vmlinuz|g" -e "s|{INITRAMFS}|$initramfs|g" -e "s|{INITRAMFS_FALLBACK}|$initramfs_fallback|g" -e "s|{CMDLINE}|$CMDLINE|g" "$template" >> "$manual_conf"
|
sed -e "s|{OSNAME}|$osname|g" -e "s|{THEME}|$theme|g" -e "s|{ICON}|$icon|g" -e "s|{KERNEL}|$kernel|g" -e "s|{KERNEL_EFI}|$kernel_efi|g" -e "s|{KERNEL_VMLINUZ}|$kernel_vmlinuz|g" -e "s|{INITRAMFS}|$initramfs|g" -e "s|{CMDLINE}|$cmdline|g" -e "s|{CMDLINE_TERMINAL}|$cmdline_terminal|g" "$template" >> "$manual_conf"
|
||||||
done
|
done
|
||||||
|
|
||||||
manual_end_conf=$(mktemp)
|
manual_end_conf=$(mktemp)
|
||||||
|
|
Loading…
Reference in New Issue