From 1eabcdf35f81955ec4d8b6e8ba514a76f093f9ec Mon Sep 17 00:00:00 2001 From: Jonathan Brownell Date: Fri, 28 Feb 2014 06:56:41 -0800 Subject: [PATCH] Enable extlinux support for (non-Ubuntu) Debian platforms Extlinux bootloader configuration in "vm" element requires vmlinuz and initrd.img files in /boot/ with "generic" suffix. When these don't exist, bootloader configuration should fall back to using whatever does exist. Change-Id: I79d426e8f008e9f23db899f0b8f8cf2f23643e28 --- elements/vm/finalise.d/51-bootloader | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/elements/vm/finalise.d/51-bootloader b/elements/vm/finalise.d/51-bootloader index 9cd6fadf..2f3c0835 100755 --- a/elements/vm/finalise.d/51-bootloader +++ b/elements/vm/finalise.d/51-bootloader @@ -39,6 +39,10 @@ function install_extlinux { elif [ -f /etc/debian_version ]; then kernel=$(ls -1rv /boot/vmlinuz*generic | head -1) initrd=$(ls -1rv /boot/initrd*generic | head -1) + + # in case files with "generic" suffix were not found, fall back to default + kernel=${kernel:-$(ls -1rv /boot/vmlinuz* | head -1)} + initrd=${initrd:-$(ls -1rv /boot/initrd* | head -1)} else echo "Unable to find kernel and initram" exit 1