2 # Usage: no command-line args.
3 # "arguments" come in environment:
4 # TARGET a device filename
5 # FSSIZE the desired filesystem size in megabytes (rest will be swap)
11 echo ,"${FSSIZE}"$',L,*\n,,S\n;\n;' | sfdisk -uM -H 255 -S 63 "$TARGET"
13 dmsetup info "$TARGET" && kpartx -a "$TARGET"
15 xen-create-image --image-dev "${TARGET}1" --swap-dev "${TARGET}2" --fs ext3 --ide \
16 --hostname "$HOSTNAME" --ip="$IP" --netmask=255.255.0.0 --gateway=18.181.0.1 \
17 --arch "$ARCH" --dist "$DIST" --mirror "$MIRROR" --cache=yes --verbose
19 dmsetup info "$TARGET" && kpartx -d "$TARGET"