source: branches/wsgi/packages/sipb-xen-guest-installer/partial/xen-create-image-mods/97-setup-grub @ 1505

Last change on this file since 1505 was 496, checked in by neboat, 17 years ago

xen-create-image frobbing for deboostrap-commands

  • Property svn:executable set to *
File size: 1.7 KB
Line 
1#!/bin/sh
2#
3#  This script sets up the ParaVM to use pygrub
4#
5
6
7prefix=$1
8
9
10#
11#  Source our common functions
12#
13if [ -e /usr/lib/xen-tools/common.sh ]; then
14    . /usr/lib/xen-tools/common.sh
15else
16    . ./hooks/common.sh
17fi
18
19
20#
21# Log our start
22#
23logMessage Script $0 starting
24
25#
26# Install the xen kernel
27#
28installDebianPackage ${prefix} linux-image-xen-amd64
29
30#
31# Install grub package
32#
33installDebianPackage ${prefix} grub
34
35#
36# Make the /boot/grub directory
37#
38mkdir -p ${prefix}/boot/grub
39
40#
41# Patch update-grub to see xen kernels
42#
43patch -l ${prefix}/usr/sbin/update-grub </usr/lib/xen-tools/etch.d/patches/update-grub.patch
44
45#
46# Update Grub
47#
48chroot ${prefix} /usr/sbin/update-grub -y
49
50#
51# Patch Grub menu
52#
53patch -l ${prefix}/boot/grub/menu.lst </usr/lib/xen-tools/etch.d/patches/menu.lst.patch
54# --- menu.lst.orig2008-04-22 05:41:32.000000000 -0400
55# +++ menu.lst2008-04-22 05:42:15.000000000 -0400
56# @@ -59,7 +59,7 @@
57#  ## e.g. kopt=root=/dev/hda1 ro
58#  ##      kopt_2_6_8=root=/dev/hdc1 ro
59#  ##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
60# -# kopt=root=/dev/hda1 ro
61# +# kopt=root=/dev/hda1 ro console=ttyS0,9600,8n1
62 
63#  ## default grub root device
64#  ## e.g. groot=(hd0,0)
65# EOF
66
67#
68# Patch inittab
69#
70patch -l ${prefix}/etc/inittab </usr/lib/xen-tools/etch.d/patches/inittab.patch
71# --- inittab.orig2008-04-22 05:42:50.000000000 -0400
72# +++ inittab2008-04-22 05:43:04.000000000 -0400
73# @@ -60,7 +60,7 @@
74 
75#  # Example how to put a getty on a serial line (for a terminal)
76#  #
77# -#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
78# +T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
79#  #T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100
80 
81#  # Example how to put a getty on a modem line.
82# EOF
83
84#
85# Log our finish
86#
87logMessage Script $0 finished
88
Note: See TracBrowser for help on using the repository browser.