- Timestamp:
- Jul 27, 2008, 11:35:58 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-guest-installer/domU/usr/sbin/sipb-xen-install
r641 r741 3 3 TARGET=/dev/hda 4 4 5 #For some strange reason, . $TARGET doesn't work reliably. 5 # Read in the environment variables 6 # For some strange reason, . $TARGET doesn't work reliably. 6 7 eval `grep -a -m1 -B 100 ^return$ $TARGET | grep -v return` 7 8 9 #HOSTNAME=foobar10 #DIST=etch11 #MIRROR=http://debian.lcs.mit.edu/debian12 #IMAGESIZE=380013 8 14 9 ARCH=amd64 15 10 16 #LVSIZE=`lvs --noheadings --units M --nosuffix -o Size /dev/xenvg/d_foobar_hda | sed 's/\..*//'` 11 echo ,${IMAGESIZE}$',L,*\n,,S\n;\n;' | sfdisk -uM -H 255 -S 63 $TARGET 17 12 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 13 xen-create-image --image-dev ${TARGET}1 --swap-dev ${TARGET}2 --fs ext3 --ide --arch $ARCH --dist $DIST --hostname $HOSTNAME --mirror $MIRROR --ip=$IP --netmask=255.255.0.0 --gateway=18.181.0.1 --cache=yes
Note: See TracChangeset
for help on using the changeset viewer.