File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed
Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,13 @@ if [[ $1 ]]; then
109109 exit 1
110110 fi
111111else
112- [[ -f /etc/machine-id ]] && read -r MACHINE_ID < /etc/machine-id
112+ if [[ -d /efi/Default ]] || [[ -d /boot/Default ]] || [[ -d /boot/efi/Default ]]; then
113+ MACHINE_ID=" Default"
114+ elif [[ -f /etc/machine-id ]]; then
115+ read -r MACHINE_ID < /etc/machine-id
116+ else
117+ MACHINE_ID=" Default"
118+ fi
113119
114120 if [[ -d /efi/loader/entries || -L /efi/loader/entries ]] \
115121 && [[ $MACHINE_ID ]] \
@@ -119,8 +125,20 @@ else
119125 && [[ $MACHINE_ID ]] \
120126 && [[ -d /boot/${MACHINE_ID} || -L /boot/${MACHINE_ID} ]]; then
121127 image=" /boot/${MACHINE_ID} /${KERNEL_VERSION} /initrd"
122- else
128+ elif [[ -d /boot/efi/loader/entries || -L /boot/efi/loader/entries ]] \
129+ && [[ $MACHINE_ID ]] \
130+ && [[ -d /boot/efi/${MACHINE_ID} || -L /boot/efi/${MACHINE_ID} ]]; then
131+ image=" /boot/efi/${MACHINE_ID} /${KERNEL_VERSION} /initrd"
132+ elif [[ -f /lib/modules/${KERNEL_VERSION} /initrd ]]; then
133+ image=" /lib/modules/${KERNEL_VERSION} /initrd"
134+ elif [[ -f /boot/initramfs-${KERNEL_VERSION} .img ]]; then
123135 image=" /boot/initramfs-${KERNEL_VERSION} .img"
136+ elif mountpoint -q /efi; then
137+ image=" /efi/${MACHINE_ID} /${KERNEL_VERSION} /initrd"
138+ elif mountpoint -q /boot/efi; then
139+ image=" /boot/efi/${MACHINE_ID} /${KERNEL_VERSION} /initrd"
140+ else
141+ image=" "
124142 fi
125143fi
126144
You can’t perform that action at this time.
0 commit comments