diff options
author | John Southworth <john.southworth@vyatta.com> | 2012-08-29 10:48:08 -0700 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2012-08-29 10:48:08 -0700 |
commit | 1867ce76ef780666982434f9f41fab383f8fbfa5 (patch) | |
tree | 8f328cbff1c846f6b42d84e07216a2e839ddd4b4 /scripts | |
parent | bd7ce29ef31acd08f06d3a42a8d612b116d64b8a (diff) | |
download | vyatta-cfg-system-1867ce76ef780666982434f9f41fab383f8fbfa5.tar.gz vyatta-cfg-system-1867ce76ef780666982434f9f41fab383f8fbfa5.zip |
Force Xen installs to use ext3 without write barriers
In oxnard our Xen images used ext3 without write barriers. This patch is
a workaround for bug 8303. The goal of this patch is to provide a workable
solution that is no worse than our previous behavior until Xenserver has
the write barrier fix available in Xen integrated.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/install-system | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/scripts/install-system b/scripts/install-system index fbff5e1f..3dd9e422 100755 --- a/scripts/install-system +++ b/scripts/install-system @@ -36,6 +36,9 @@ if [ -e /etc/default/vyatta ] ; then . /etc/default/vyatta fi +# get system manufactuer, Xen needs special treatment +MANUF=`/usr/sbin/dmidecode -s system-manufacturer` + : ${vyatta_prefix:=/opt/vyatta} : ${vyatta_exec_prefix:=$vyatta_prefix} : ${vyatta_bindir:=${vyatta_exec_prefix}/bin} @@ -75,7 +78,11 @@ fi PARTITION='' # default file system type -ROOT_FSTYPE="ext4" +if [ "$MANUF" = "Xen" ]; then + ROOT_FSTYPE="ext3" +else + ROOT_FSTYPE="ext4" +fi # start of root partition (64 sectors == 32K bytes) ROOT_OFFSET="64S" @@ -972,7 +979,12 @@ install_root_filesystem () { echo "Unable to read filesystem UUID. Exiting." exit 1 else - echo -e "UUID=$uuid\t/\t$ROOT_FSTYPE\tnoatime\t0 1" >> $rootfsdir/etc/fstab + if [ "$MANUF" = "Xen" ]; then + #disable barriers explicitly (just incase) + echo -e "UUID=$uuid\t/\t$ROOT_FSTYPE\tnoatime,nobarrier\t0 1" >> $rootfsdir/etc/fstab + else + echo -e "UUID=$uuid\t/\t$ROOT_FSTYPE\tnoatime\t0 1" >> $rootfsdir/etc/fstab + fi fi #setup the hostname file @@ -1425,10 +1437,9 @@ setup_xen_extras () { } check_for_xen_extras () { - manuf=`/usr/sbin/dmidecode -s system-manufacturer` prod=`/usr/sbin/dmidecode -s system-product-name` - if [ "$manuf" = "Xen" -a "$prod" = "HVM domU" ]; then - echo "You are installing to a $manuf $prod virtual machine." + if [ "$MANUF" = "Xen" -a "$prod" = "HVM domU" ]; then + echo "You are installing to a $MANUF $prod virtual machine." echo "Would you like to set up config files to prepare for the" echo -n "conversion to PV domU? [No]: " response=$(get_response "No" "Yes No Y N") |