Browse code

Install a generic kernel in the ramdisk image

Dean Troyer authored on 2011/10/27 02:34:59
Showing 1 changed files
... ...
@@ -100,6 +100,11 @@ MNTDIR=`mktemp -d --tmpdir mntXXXXXXXX`
100 100
 mount -t ext4 -o loop $IMG_FILE $MNTDIR
101 101
 cp -p /etc/resolv.conf $MNTDIR/etc/resolv.conf
102 102
 
103
+# We need to install a non-virtual kernel and modules to boot from
104
+if [ ! -r `ls $MNTDIR/boot/vmlinuz-2.6.*-generic | head -1` ]; then
105
+    chroot $MNTDIR apt-get install -y linux-generic
106
+fi
107
+
103 108
 # git clone only if directory doesn't exist already.  Since ``DEST`` might not
104 109
 # be owned by the installation user, we create the directory and change the
105 110
 # ownership to the proper user.