X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-autoinstaller.git/blobdiff_plain/e31b78fc20c5b45ce3deb6b2859e849845e95c74..da7db23885fdafeca2346bd27c7ec7f5eb40c3cc:/partial/debootstrap-commands diff --git a/partial/debootstrap-commands b/partial/debootstrap-commands index 9975e7b..968c172 100644 --- a/partial/debootstrap-commands +++ b/partial/debootstrap-commands @@ -1,75 +1,90 @@ +#!/bin/sh #http://www.debian.org/releases/stable/i386/apds03.html.en -SRC=/root/debootstrap.d -SRCHOSTNAME=moo17 +#SRC=/root/debootstrap.d +#SRCHOSTNAME=moo17 #HOSTNAME=debootstrap-test #pick a hostname! -PARTITIONS=/root/price/partitions/testpart +HOSTNAME=moo19 +DIST=etch +IP=18.181.0.186 -#losetup is crazy. pick a free loop device. see /usr/sbin/s-x-lvcopy for code. -LODEV=/dev/loopNN-this-is-not-valid +PARTITIONS=/root/neboat/testpart +VOLUME=/dev/mapper/xenvg-d_${HOSTNAME}_hda +### +### Create the device for SIPB-Xen purposes +### +sfdisk -H 255 -S 63 $VOLUME <$PARTITIONS +kpartx -a $VOLUME +#SWAPDEV=$(sipb-xen-losetup $VOLUME $(( 7903980 * 512 ))) +#IMAGEDEV=$(sipb-xen-losetup $VOLUME $(( 63 * 512 ))) +# mkfs.ext3 -b 1024 $IMAGEDEV $(( 7903917 / 2 )) -VOLUME=/dev/xenvg/d_$HOSTNAME_hda -DEST=/srv/$HOSTNAME/ +#CREATE_IMAGE_CONFIG=./paravm-create.conf -sfdisk -f $VOLUME <$PARTITIONS -losetup -o $(( 7903980 * 512 )) $LODEV $VOLUME -mkswap $LODEV -losetup -d $LODEV -losetup -o $(( 63 * 512 )) $LODEV $VOLUME -mkfs.ext3 -b 1024 $LODEV $(( 7903917 / 2 )) -mkdir -p $DEST -mount $LODEV $DEST +#xen-create-image --image-dev $IMAGEDEV --swap-dev $SWAPDEV --fs ext3 --config $CREATE_IMAGE_CONFIG \ +# --dist $DIST --hostname $HOSTNAME +# 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 -time debootstrap --arch amd64 etch "$DEST" http://debian.lcs.mit.edu/debian +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 -cp -a $SRC/fstab $DEST/etc/fstab -cp -a $SRC/interfaces $DEST/etc/network/interfaces -cp -a $SRC/sources.list $DEST/etc/apt/sources.list -cp -a $SRC/update-grub.diff $DEST/root/update-grub.diff -echo $HOSTNAME > $DEST/etc/hostname -sed s/$SRCHOSTNAME/$HOSTNAME/g $SRC/hosts > $DEST/etc/hosts +kpartx -d $VOLUME +#losetup -d $SWAPDEV +#losetup -d $IMAGEDEV -mount -t proc proc $DEST/proc +### This should be the end of the script +### The material past this point is solely for reference purposes -LANG=C chroot "$DEST" < $DEST/etc/hostname +# sed s/$SRCHOSTNAME/$HOSTNAME/g $SRC/hosts > $DEST/etc/hosts -echo $'y\n3\nEastern' | tzconfig -export DEBIAN_FRONTEND=noninteractive +# mount -t proc proc $DEST/proc -echo 'locales locales/locales_to_be_generated multiselect en_US ISO-8859-1' | debconf-set-selections +# LANG=C chroot "$DEST" <&1 | less -aptitude clean +# cd /media +# mkdir cdrom0 +# ln -s cdrom0 cdrom +# cd / +# ln -s media/cdrom -mkdir /boot/grub -aptitude install grub -patch /usr/sbin/update-grub &1 | less +# aptitude clean + +# mkdir /boot/grub +# aptitude install grub +# patch /usr/sbin/update-grub