source: trunk/packages/invirt-autoinstaller/common/usr/lib/xen-tools/debian.d/97-setup-grub @ 1963

Last change on this file since 1963 was 1722, checked in by broder, 16 years ago

Install Debian and Ubuntu kernels without checking to see what the VM
is running

  • Property svn:executable set to *
File size: 990 bytes
Line 
1#!/bin/sh
2#
3#  This script sets up the ParaVM to use pygrub
4#
5
6prefix=$1
7
8#
9#  Source our common functions
10#
11if [ -e /usr/lib/xen-tools/common.sh ]; then
12    . /usr/lib/xen-tools/common.sh
13else
14    . ./hooks/common.sh
15fi
16
17echo SCRIPT = $0
18dir=`dirname "$0"`
19
20
21logMessage 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#
27installDebianPackage ${prefix} linux-image-xen-amd64
28installDebianPackage ${prefix} linux-image-xen-686
29installDebianPackage ${prefix} linux-image-xen
30
31installDebianPackage ${prefix} grub
32
33#
34# Make the /boot/grub directory
35#
36mkdir -p ${prefix}/boot/grub
37
38#
39# Create stock menu.lst
40#
41chroot ${prefix} /usr/sbin/update-grub -y
42
43#
44# Patches to add xen kernels, use serial console, etc.
45#
46for patch in $dir/patches/*; do
47    patch -l -d ${prefix} -p1 < $patch
48done
49
50#
51# Regenerate automagic kernels list
52#
53chroot ${prefix} /usr/sbin/update-grub -y
54
55#
56# Log our finish
57#
58logMessage Script $0 finished
59
Note: See TracBrowser for help on using the repository browser.