3 # This is a copy of 90-make-fstab, with a bug fixed.
4 # It should be removed once the bug is fixed upstream.
7 # This script is responsible for setting up /etc/fstab upon the
10 # This should be a simple job, but it is complicated by some of the
11 # differences between filesystems - some root filesystems will require
12 # the installation of new packages, and we have to handle that here.
16 # http://www.steve.org.uk/
22 # Source our common functions
24 if [ -e /usr/lib/xen-tools/common.sh ]; then
25 . /usr/lib/xen-tools/common.sh
34 logMessage Script $0 starting
38 # Make sure we use ide style device names if required
46 # Now we have the options we can create the fstab.
50 cat <<E_O_FSTAB > ${prefix}/etc/fstab
51 # /etc/fstab: static file system information.
53 # <file system> <mount point> <type> <options> <dump> <pass>
54 proc /proc proc defaults 0 0
56 for part in `seq 1 ${NUMPARTITIONS}`; do
57 eval "PARTITION=\"\${PARTITION${part}}\""
61 for partdata in ${PARTITION}; do
62 eval "partdata${x}=\"${partdata}\""
67 case "${partdata2}" in
76 if [ "${partdata2}" = "swap" ]; then
77 echo "${partdata7} none swap sw 0 0" >> ${prefix}/etc/fstab
79 echo "${partdata7} ${partdata3} ${partdata2} ${partdata4} 0 1" >> ${prefix}/etc/fstab
85 # Finally we can install any required packages for the given root
88 if [ $has_xfs -eq 1 ]; then
89 installDebianPackage ${prefix} xfsprogs
91 if [ $has_reiserfs -eq 1 ]; then
92 installDebianPackage ${prefix} reiserfsprogs
99 logMessage Script $0 finished