From ea442c1cb755c930fe2d03bf9ea595a527353714 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Wed, 26 Oct 2011 12:34:59 -0500 Subject: [PATCH] Install a generic kernel in the ramdisk image --- tools/build_ramdisk.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/build_ramdisk.sh b/tools/build_ramdisk.sh index c220f0294c..3a757dfdfb 100755 --- a/tools/build_ramdisk.sh +++ b/tools/build_ramdisk.sh @@ -100,6 +100,11 @@ MNTDIR=`mktemp -d --tmpdir mntXXXXXXXX` mount -t ext4 -o loop $IMG_FILE $MNTDIR cp -p /etc/resolv.conf $MNTDIR/etc/resolv.conf +# We need to install a non-virtual kernel and modules to boot from +if [ ! -r `ls $MNTDIR/boot/vmlinuz-2.6.*-generic | head -1` ]; then + chroot $MNTDIR apt-get install -y linux-generic +fi + # git clone only if directory doesn't exist already. Since ``DEST`` might not # be owned by the installation user, we create the directory and change the # ownership to the proper user.