The autoinstaller should install ubuntu-minimal and ubuntu-standard.
[invirt/packages/invirt-autoinstaller.git] / common / usr / lib / xen-tools / debian.d / 97-setup-grub
1 #!/bin/sh
2 #
3 #  This script sets up the ParaVM to use pygrub
4 #
5
6 prefix=$1
7
8 #
9 #  Source our common functions
10 #
11 if [ -e /usr/lib/xen-tools/common.sh ]; then
12     . /usr/lib/xen-tools/common.sh
13 else
14     . ./hooks/common.sh
15 fi
16
17 echo SCRIPT = $0
18 dir=`dirname "$0"`
19
20
21 logMessage Script $0 starting
22
23 #
24 # Install the xen kernel.  linux-image-xen is in ubuntu,
25 # linux-image-xen-{amd64,686} in debian.
26 #
27 installDebianPackage ${prefix} linux-image-xen-amd64
28 installDebianPackage ${prefix} linux-image-xen-686
29 installDebianPackage ${prefix} linux-image-xen
30
31 installDebianPackage ${prefix} grub
32
33 #
34 # Make the /boot/grub directory
35 #
36 mkdir -p ${prefix}/boot/grub
37
38 #
39 # Create stock menu.lst
40 #
41 chroot ${prefix} /usr/sbin/update-grub -y
42
43 #
44 # Patches to add xen kernels, use serial console, etc.
45 #
46 for patch in $dir/patches/*; do
47     patch -l -d ${prefix} -p1 < $patch
48 done
49
50 #
51 # Regenerate automagic kernels list
52 #
53 chroot ${prefix} /usr/sbin/update-grub -y
54
55 #
56 # Log our finish
57 #
58 logMessage Script $0 finished
59