3 # This script is responsible for setting up /etc/fstab upon the
6 # This should be a simple job, but it is complicated by some of the
7 # differences between filesystems - some root filesystems will require
8 # the installation of new packages, and we have to handle that here.
12 # http://www.steve.org.uk/
17 # Source our common functions
19 if [ -e /usr/lib/xen-tools/common.sh ]; then
20 . /usr/lib/xen-tools/common.sh
29 logMessage Script $0 starting
33 # Make sure we use ide style device names if required
41 # Now we have the options we can create the fstab.
45 cat <<E_O_FSTAB > ${prefix}/etc/fstab
46 # /etc/fstab: static file system information.
48 # <file system> <mount point> <type> <options> <dump> <pass>
49 proc /proc proc defaults 0 0
51 for part in `seq 1 ${NUMPARTITIONS}`; do
52 eval "PARTITION=\"\${PARTITION${part}}\""
56 for partdata in ${PARTITION}; do
57 eval "partdata${x}=\"${partdata}\""
62 case "${partdata2}" in
71 # This assumes a particular partition table for our ParaVM's (SIPB)
72 if [ "${partdata2}" = "swap" ]; then
73 echo "/dev/${device}2 none swap sw 0 0" >> ${prefix}/etc/fstab
75 echo "/dev/${device}1 ${partdata3} ${partdata2} ${partdata4} 0 1" >> ${prefix}/etc/fstab
81 # Finally we can install any required packages for the given root
84 if [ $has_xfs -eq 1 ]; then
85 installDebianPackage ${prefix} xfsprogs
87 if [ $has_reiserfs -eq 1 ]; then
88 installDebianPackage ${prefix} reiserfsprogs
95 logMessage Script $0 finished