Last change
on this file since 2212 was
2161,
checked in by andersk, 16 years ago
|
Don't confuse {KB, MB, GB} with {KiB, MiB, GiB}.
|
File size:
659 bytes
|
Rev | Line | |
---|
[929] | 1 | #!/bin/bash |
---|
| 2 | # Usage: no command-line args. |
---|
| 3 | # "arguments" come in environment: |
---|
[937] | 4 | # TARGET a device filename |
---|
[2161] | 5 | # FSSIZE the desired filesystem size in mebibytes (rest will be swap) |
---|
[929] | 6 | # ARCH, DIST, MIRROR |
---|
| 7 | # HOSTNAME, IP |
---|
| 8 | |
---|
[937] | 9 | set -e |
---|
| 10 | |
---|
[938] | 11 | echo ,"${FSSIZE}"$',L,*\n,,S\n;\n;' | sfdisk -uM -H 255 -S 63 "$TARGET" |
---|
[929] | 12 | |
---|
[1147] | 13 | dmsetup info "$TARGET" 2>/dev/null && kpartx -a "$TARGET" |
---|
[931] | 14 | |
---|
[929] | 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 \ |
---|
[1124] | 17 | --arch "$ARCH" --dist "$DIST" --mirror "$MIRROR" --cache=yes --verbose |
---|
[929] | 18 | |
---|
[1147] | 19 | dmsetup info "$TARGET" 2>/dev/null && kpartx -d "$TARGET" |
---|
[931] | 20 | |
---|
[929] | 21 | exit 0 |
---|
Note: See
TracBrowser
for help on using the repository browser.