diff options
-rwxr-xr-x | main/syslinux/update-extlinux | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/main/syslinux/update-extlinux b/main/syslinux/update-extlinux index a4d4fa7b1..2b980a947 100755 --- a/main/syslinux/update-extlinux +++ b/main/syslinux/update-extlinux @@ -91,6 +91,8 @@ if [ -f "/boot/xen.gz" ]; then if [ -f "/boot/initramfs-$tag" ]; then everbose "Found initramfs: /boot/initramfs-$tag" initramfs="initramfs-$tag" + else + initramfs= fi label=xen-$(grep -w -l $tag /usr/share/kernel/*/kernel.release \ | cut -d/ -f5) @@ -113,11 +115,6 @@ fi for kernel in $(find /boot -name "vmlinuz-*" -type f); do tag=$(basename $kernel | cut -b9-) everbose "Found kernel: $kernel" - - if [ -f "/boot/initramfs-$tag" ]; then - everbose "Found initramfs: /boot/initramfs-$tag" - initramfs="initrd=initramfs-$tag" - fi label=$(grep -w -l $tag /usr/share/kernel/*/kernel.release | cut -d/ -f5) if [ -z "$label" ]; then label=$lst @@ -128,7 +125,11 @@ for kernel in $(find /boot -name "vmlinuz-*" -type f); do fi echo " MENU LABEL Linux $tag" >> $conf.new echo " KERNEL $(basename $kernel)" >> $conf.new - echo " APPEND $initramfs root=$root modules=${modules}${TYPE:+,$TYPE} $default_kernel_opts" >> $conf.new + if [ -f "/boot/initramfs-$tag" ]; then + everbose "Found initramfs: /boot/initramfs-$tag" + echo " INITRD initramfs-$tag" >> $conf.new + fi + echo " APPEND root=$root modules=${modules}${TYPE:+,$TYPE} $default_kernel_opts" >> $conf.new echo "" >> $conf.new lst=$(($lst + 1)) done |