2 #http://www.debian.org/releases/stable/i386/apds03.html.en
4 #SRC=/root/debootstrap.d
6 #HOSTNAME=debootstrap-test
13 PARTITIONS=/root/neboat/testpart
15 VOLUME=/dev/mapper/xenvg-d_${HOSTNAME}_hda
18 ### Create the device for SIPB-Xen purposes
20 sfdisk -H 255 -S 63 $VOLUME <$PARTITIONS
22 #SWAPDEV=$(sipb-xen-losetup $VOLUME $(( 7903980 * 512 )))
23 #IMAGEDEV=$(sipb-xen-losetup $VOLUME $(( 63 * 512 )))
24 # mkfs.ext3 -b 1024 $IMAGEDEV $(( 7903917 / 2 ))
26 #CREATE_IMAGE_CONFIG=./paravm-create.conf
28 #xen-create-image --image-dev $IMAGEDEV --swap-dev $SWAPDEV --fs ext3 --config $CREATE_IMAGE_CONFIG \
29 # --dist $DIST --hostname $HOSTNAME
31 # xen-create-image --partitions sipb-xen --memory=256MB --ide --arch amd64 --dist etch --hostname moo19 --mirror http://debian.lcs.mit.edu/debian --ip=18.181.0.186 --netmask=255.255.0.0 --gateway=18.181.0.1 --cache
33 xen-create-image --image-dev ${VOLUME}1 --swap-dev ${VOLUME}2 --fs ext3 --ide --memory 256M --arch amd64 --dist etch --hostname $HOSTNAME --mirror http://debian.lcs.mit.edu/debian --ip=$IP --netmask=255.255.0.0 --gateway=18.181.0.1 --cache
39 ### This should be the end of the script
40 ### The material past this point is solely for reference purposes
43 # time debootstrap --arch amd64 etch "$DEST" http://debian.lcs.mit.edu/debian
45 # cp -a $SRC/fstab $DEST/etc/fstab
46 # cp -a $SRC/interfaces $DEST/etc/network/interfaces
47 # cp -a $SRC/sources.list $DEST/etc/apt/sources.list
48 # cp -a $SRC/update-grub.diff $DEST/root/update-grub.diff
49 # echo $HOSTNAME > $DEST/etc/hostname
50 # sed s/$SRCHOSTNAME/$HOSTNAME/g $SRC/hosts > $DEST/etc/hosts
52 # mount -t proc proc $DEST/proc
54 # LANG=C chroot "$DEST" <<ENDCHROOT
56 # export TERM=xterm-color
65 # echo $'y\n3\nEastern' | tzconfig
66 # export DEBIAN_FRONTEND=noninteractive
68 # echo 'locales locales/locales_to_be_generated multiselect en_US ISO-8859-1' | debconf-set-selections
72 # aptitude -y install locales linux-image-xen-amd64
73 # aptitude --without-recommends -y install ~pstandard ~prequired ~pimportant
74 # #strace tasksel install standard 2>&1 | less
78 # aptitude install grub
79 # patch /usr/sbin/update-grub </root/update-grub.diff
81 # patch /boot/grub/menu.lst </root/menu.lst.diff
82 # patch /etc/inittab </root/inittab.diff
84 # rm /root/update-grub.diff
87 # ## kill atd and rpc.statd that are using $DEST