source: trunk/packages/sipb-xen-guest-installer/partial/debootstrap-commands @ 678

Last change on this file since 678 was 527, checked in by neboat, 16 years ago

More work on debootstrap-commands. Now can successfully create moo19 with execution.

File size: 2.6 KB
Line 
1#!/bin/sh
2#http://www.debian.org/releases/stable/i386/apds03.html.en
3
4#SRC=/root/debootstrap.d
5#SRCHOSTNAME=moo17
6#HOSTNAME=debootstrap-test
7#pick a hostname!
8
9HOSTNAME=moo19
10DIST=etch
11IP=18.181.0.186
12
13PARTITIONS=/root/neboat/testpart
14
15VOLUME=/dev/mapper/xenvg-d_${HOSTNAME}_hda
16
17###
18###  Create the device for SIPB-Xen purposes
19###
20sfdisk -H 255 -S 63 $VOLUME <$PARTITIONS
21kpartx -a $VOLUME
22#SWAPDEV=$(sipb-xen-losetup $VOLUME $(( 7903980 * 512 )))
23#IMAGEDEV=$(sipb-xen-losetup $VOLUME $(( 63 * 512 )))
24# mkfs.ext3 -b 1024 $IMAGEDEV $(( 7903917 / 2 ))
25
26#CREATE_IMAGE_CONFIG=./paravm-create.conf
27
28#xen-create-image --image-dev $IMAGEDEV --swap-dev $SWAPDEV --fs ext3 --config $CREATE_IMAGE_CONFIG \
29#       --dist $DIST --hostname $HOSTNAME
30
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
32
33xen-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
34
35kpartx -d $VOLUME
36#losetup -d $SWAPDEV
37#losetup -d $IMAGEDEV
38
39### This should be the end of the script
40### The material past this point is solely for reference purposes
41
42
43# time debootstrap --arch amd64 etch "$DEST" http://debian.lcs.mit.edu/debian
44
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
51
52# mount -t proc proc $DEST/proc
53
54# LANG=C chroot "$DEST" <<ENDCHROOT
55
56# export TERM=xterm-color
57# mount -a
58
59# cd /media
60# mkdir cdrom0
61# ln -s cdrom0 cdrom
62# cd /
63# ln -s media/cdrom
64
65# echo $'y\n3\nEastern' | tzconfig
66# export DEBIAN_FRONTEND=noninteractive
67
68# echo 'locales locales/locales_to_be_generated multiselect     en_US ISO-8859-1' | debconf-set-selections
69
70
71# aptitude update
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
75# aptitude clean
76
77# mkdir /boot/grub
78# aptitude install grub
79# patch /usr/sbin/update-grub </root/update-grub.diff
80# update-grub
81# patch /boot/grub/menu.lst </root/menu.lst.diff
82# patch /etc/inittab </root/inittab.diff
83
84# rm /root/update-grub.diff
85# ENDCHROOT
86
87# ## kill atd and rpc.statd that are using $DEST
88# umount $DEST/proc
89# umount $DEST
90# losetup -d $LODEV
Note: See TracBrowser for help on using the repository browser.