xen-tools: Does not correctly install fstab

Eric Price ecprice at MIT.EDU
Sun Jun 22 10:02:36 UTC 2008


Package: xen-tools
Version: 3.8-4ubuntu4
Severity: normal
Tags: patch


/usr/lib/xen-tools/debian.d/90-make-fstab assumes that the 
PARTITION{1,2} environment variables correspond in the same order to
/dev/device{1,2}.  This causes it to mix up the device names in 
/etc/fstab.

In fact, the PARTITION? variables are sorted by mount point, so the swap 
partition will be before the other positions regardless of its device 
name.  For example, when I run xen-create-image, my environment 
variables become

 PARTITION1 = swap::swap:::phy::/dev/hda2
 PARTITION2 = disk::ext3:/:errors=remount-ro:phy::/dev/hda1

which yields an /etc/fstab of:

 [...]
 /dev/hda1 none swap sw 0 0
 /dev/hda2 / ext3 errors=remount-ro 0 1
 [...]

I think that the device name in the last position is the desired device 
name, in which case the patch is simple.

The same problem occurs in the other distributions' 90-make-fstab 
scripts.

-- System Information:
Debian Release: lenny/sid
  APT prefers hardy-updates
  APT policy: (500, 'hardy-updates'), (500, 'hardy-security'), (500, 'hardy')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.18-6-xen-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages xen-tools depends on:
ii  debootstrap                   1.0.8      Bootstrap a basic Debian system
ii  libconfig-inifiles-perl       2.39-2     Read .ini-style configuration file
ii  libtext-template-perl         1.44-1.1   Text::Template perl module
ii  perl-modules                  5.8.8-12   Core Perl modules

Versions of packages xen-tools recommends:
ii  libexpect-perl           1.20-1          Expect.pm - Perl Expect interface
ii  perl-doc                 5.8.8-12        Perl documentation
ii  reiserfsprogs            1:3.6.19-6      User-level tools for ReiserFS file
ii  rinse                    0.9-1           RPM installation environment
ii  xen-hypervisor-3.1 [xen- 3.1.0-0ubuntu19 The Xen Hypervisor for i386, amd64
ii  xen-shell                1.8-1           Console based Xen administration u
ii  xfsprogs                 2.9.4-2         Utilities for managing the XFS fil

-- no debconf information
-------------- next part --------------
--- /usr/lib/xen-tools/debian.d/90-make-fstab~  2007-09-28 18:21:26.000000000 -0400
+++ /usr/lib/xen-tools/debian.d/90-make-fstab   2008-06-22 05:58:10.000000000 -0400
@@ -70,9 +70,9 @@
     esac
     
     if [ "${partdata2}" = "swap" ]; then
-        echo "/dev/${device}${part} none swap sw 0 0" >> ${prefix}/etc/fstab
+        echo "${partdata7} none swap sw 0 0" >> ${prefix}/etc/fstab
     else
-        echo "/dev/${device}${part} ${partdata3} ${partdata2} ${partdata4} 0 1" >> $
{prefix}/etc/fstab
+        echo "${partdata7} ${partdata3} ${partdata2} ${partdata4} 0 1" >> ${prefix}/
etc/fstab
     fi
 done


More information about the ubuntu-users mailing list