Last change
on this file since 700 was
641,
checked in by ecprice, 16 years ago
|
Getting towards the autoinstaller in domU.
Works with etch, almost works with Hardy but has network trouble.
|
File size:
857 bytes
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | |
---|
3 | TARGET=/dev/hda |
---|
4 | |
---|
5 | #For some strange reason, . $TARGET doesn't work reliably. |
---|
6 | eval `grep -a -m1 -B 100 ^return$ $TARGET | grep -v return` |
---|
7 | |
---|
8 | |
---|
9 | #HOSTNAME=foobar |
---|
10 | #DIST=etch |
---|
11 | #MIRROR=http://debian.lcs.mit.edu/debian |
---|
12 | #IMAGESIZE=3800 |
---|
13 | |
---|
14 | ARCH=amd64 |
---|
15 | |
---|
16 | #LVSIZE=`lvs --noheadings --units M --nosuffix -o Size /dev/xenvg/d_foobar_hda | sed 's/\..*//'` |
---|
17 | |
---|
18 | # If this script is interrupted, it may not clean up after itself. |
---|
19 | # In particular, it may leave ${VOLUME}1 mounted somewhere in tmp. |
---|
20 | # Unmount it, then kpartx -d $VOLUME to clean up. |
---|
21 | |
---|
22 | ### |
---|
23 | ### Create the device for SIPB-Xen purposes |
---|
24 | ### |
---|
25 | echo ,${IMAGESIZE}$',L,*\n,,S\n;\n;' | sfdisk -uM -H 255 -S 63 $TARGET |
---|
26 | #kpartx -a $TARGET |
---|
27 | |
---|
28 | xen-create-image --image-dev ${TARGET}1 --swap-dev ${TARGET}2 --fs ext3 --ide --arch $ARCH --dist $DIST --hostname $HOSTNAME --mirror $MIRROR --dhcp --cache=yes |
---|
29 | |
---|
30 | #kpartx -d $TARGET |
---|
Note: See
TracBrowser
for help on using the repository browser.