[Pkg-sysvinit-devel] Bug#616560: umountfs: nothing to unmount if / is on UBI volume

Médéric RIBREUX mederic.ribreux at gmail.com
Sat Mar 5 15:01:38 UTC 2011


Package: initscripts
Version: 2.88dsf-13.1
Severity: important

If you have / on UBIFS, named as something with ubi0:xxx, the script
/etc/init.d/umountfs has nothing to unmount.

Here is a sample /proc/mounts:
rootfs / rootfs rw 0 0
none /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
none /proc proc rw,nosuid,nodev,noexec,relatime 0 0
none /dev devtmpfs rw,relatime,size=254952k,nr_inodes=63738,mode=755 0
0
none /dev/pts devpts
rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
ubi0:rootfs / ubifs ro,noatime 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid,relatime,mode=755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev,relatime 0 0
varrun /var/run tmpfs rw,nosuid,relatime,mode=755 0 0
varlock /var/lock tmpfs rw,nosuid,nodev,noexec,relatime 0 0
/dev/mmcblk0p3 /var ext2 rw,noatime,errors=continue 0 0
tmpfs /tmp tmpfs rw,relatime 0 0

As you can see, there is / on ubi0:rootfs. 

There is a regexp in /etc/init.d/umountfs which lists the protected
mounts (mountpoints that needs to be kept mounted for the moment). If
/ is not on something named like /abc.../xyz, the regexp returns all the
mountpoints in /proc/mounts.

Here is the regexp (line 22):
PROTECTED_MOUNTS="$(sed -n '0,/^\/[^ ]* \/ /p' /proc/mounts)"

You can modify it with something like the following and then it works !
PROTECTED_MOUNTS="$(sed -n '0,/^\/\|^ubi[^ ]* \/ /p' /proc/mounts)"

But I am not sure that it is a "standard" way of finding the /
mountpoint !

As a countermeasure, I've tried to use a more standard name for the
UBIFS device (like /dev/ubi0_0) but when passing this name to the
kernel at boot (via root=/dev/ubi0_0s rootfstype=ubifs ), kernel can't
find root.

Hardware is a Sheevaplug... reportbug is not installed on this
computer so the kernel line is not the good one (2.3.32-5, squeeze kernel).


-- System Information:
Debian Release: 6.0
  APT prefers squeeze-updates
  APT policy: (500, 'squeeze-updates'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.35-trunk-686 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages initscripts depends on:
ii  coreutils               8.5-1            GNU core utilities
ii  debianutils             3.4              Miscellaneous utilities specific t
ii  libc6                   2.11.2-10        Embedded GNU C Library: Shared lib
ii  lsb-base                3.2-23.2squeeze1 Linux Standard Base 3.2 init scrip
ii  mount                   2.17.2-9         Tools for mounting and manipulatin
ii  sysv-rc                 2.88dsf-13.1     System-V-like runlevel change mech
ii  sysvinit-utils          2.88dsf-13.1     System-V-like utilities

Versions of packages initscripts recommends:
ii  e2fsprogs                     1.41.12-2  ext2/ext3/ext4 file system utiliti
ii  psmisc                        22.11-1    utilities that use the proc file s

initscripts suggests no packages.

-- no debconf information





More information about the Pkg-sysvinit-devel mailing list