[Pkg-sysvinit-devel] Bug#653073: Switching /etc/mtab to /proc/mounts and removing /lib/init/rw

Michael Tokarev mjt at tls.msk.ru
Thu Jan 19 15:09:49 UTC 2012


On 18.01.2012 18:18, Roger Leigh wrote:
> clone 653073 -1
> retitle -1 df: [patch] Please ignore rootfs in df output
> reassign -1 coreutils
> thanks
> 
> On Wed, Jan 18, 2012 at 03:05:58PM +0100, Goswin von Brederlow wrote:
>> jidanni at jidanni.org writes:
>>
>>> Forty years of pleasant df(1) and mount(1) reading shattered in one day,
>>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=653073
>>
>> Any update on why the root filesystem is listed by UUID? Is that a
>> problem of busybox mount reporting the long device name to the kernel
>> why real mount uses the short one?
> 
> This needs to be investigated by Dan, as I requested in the report.
> It's just a matter of looking at what is really happening in the
> initramfs with e.g. break=init-bottom.

It is due to busybox mount, which does not perform any canonicalizing
of the device argument but passes it as-is to the kernel.  On the
contrary, mount from util-linux resolves the symlink if given as
the device name.

And initramfs does this:

init:		UUID=*)
init:			ROOT="/dev/disk/by-uuid/${ROOT#UUID=}"

whichis later passed to busybox's mount, which happily passes
this /dev/disk/... stuff to kernel, which in turn happily
shows it in /proc/mounts.

It looks like mount from klibc does not do any canonicalisation
too, only util-linux mount does.

> I'll clone this into a separate bug against df/coreutils for Joey's
> rootfs patch.  The bug is not a bug in initscripts; it should be
> reassigned to klibc, busybox or initramfs-tools as appropriate.

It is not clear - to me anyway - if it is a bug or not.  Yes it
definitely makes df and other utils output difficult to read.

And yes it is kinda trivial to add a call to realpath(3) to
busybox (or equivalent).

Thanks,

/mjt





More information about the Pkg-sysvinit-devel mailing list