Changeset 495


Ignore:
Timestamp:
May 4, 2008, 3:43:48 AM (17 years ago)
Author:
neboat
Message:

Started modifying deboostrap-commands to use xen-create-image

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-guest-installer/partial/debootstrap-commands

    r494 r495  
    66#pick a hostname!
    77
     8DIST=etch
     9
    810PARTITIONS=/root/price/partitions/testpart
    911
    1012#losetup is crazy.  pick a free loop device.  see /usr/sbin/s-x-lvcopy for code.
    11 LODEV=/dev/loopNN-this-is-not-valid
    12 
    13 
    1413
    1514VOLUME=/dev/xenvg/d_$HOSTNAME_hda
    16 DEST=/srv/$HOSTNAME/
     15#DEST=/srv/$HOSTNAME/
    1716
     17###
     18###  Create the device for SIPB-Xen purposes
     19###
    1820sfdisk -f $VOLUME <$PARTITIONS
    19 losetup -o $(( 7903980 * 512 )) $LODEV $VOLUME
    20 mkswap $LODEV
    21 losetup -d $LODEV
    22 losetup -o $(( 63 * 512 )) $LODEV $VOLUME
    23 mkfs.ext3 -b 1024 $LODEV $(( 7903917 / 2 ))
    24 mkdir -p $DEST
    25 mount $LODEV $DEST
     21SWAPDEV=$(sipb-xen-losetup $VOLUME $(( 7903980 * 512 )))
     22#mkswap $SWAPDEV
     23#losetup -d $LODEV
     24IMAGEDEV=$(sipb-xen-losetup $VOLUME $(( 63 * 512 )))
     25# mkfs.ext3 -b 1024 $IMAGEDEV $(( 7903917 / 2 ))
    2626
     27# mkdir -p $DEST
     28# mount $LODEV $DEST
     29
     30CREATE_IMAGE_CONFIG=./paravm-create.conf
     31
     32xen-create-image --image-dev $IMAGEDEV --swap-dev $SWAPDEV --fs ext3 --config $CREATE_IMAGE_CONFIG \
     33        --dist $DIST --hostname $HOSTNAME
     34
     35# xen-create-image --image-dev $IMAGEDEV --swap-dev $SWAPDEV --fs ext3 --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
     36
     37losetup -d $SWAPDEV
     38losetup -d $IMAGEDEV
    2739
    2840time debootstrap --arch amd64 etch "$DEST" http://debian.lcs.mit.edu/debian
Note: See TracChangeset for help on using the changeset viewer.