Re: Discrepancies between real and symlinked mtab

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 31, 2012 at 01:46:43PM +0100, Kay Sievers wrote:
> On Wed, Oct 31, 2012 at 1:24 PM, Karel Zak <kzak@xxxxxxxxxx> wrote:
> > On Tue, Oct 30, 2012 at 11:03:59PM +0000, Matt Burgess wrote:
> 
> >> 1) mount(8)
> >>
> >> /dev/root on / type ext3 (rw,relatime,data=ordered)
> >
> >  I see (Fedora 17, util-linux 2.21.2)
> 
> >    /dev/sda4 on / type ext4 (rw,relatime,data=ordered)
> 
> We see that only if we use an initramfs. In case the kernel mounts the
> fs directly and internally, there is /dev/root showing up.

 Ah, good point.

> >> Nope, that's not /dev/sda3.  And what is /dev/root anyway? There's no
> >> such node under /dev here.
> 
> The kernel creates that node in its own 'rootfs' names filesystem, the
> parent of the entire filesystem mount tree; but this is never visible
> anywhere in the real system, and never was.
> 
> Ideally, the kernel would be fixed to use the root= string, and not
> invent a name that does never exist.

 Yes, hmm... I'll try to improve libmount to convert /dev/root to
 something usable.

> > if I good remember there was symlink in some distributions
> 
> Some distributions created /dev/root with udev rules which have been
> composed at bootup. We dropped all that, because it is logic backwards
> and nothing on the system should rely on /dev/root being available.
> Modern filesystems like btrfs do not follow the "there is a single
> device below that mountpoint logic".

 I guess it's still necessary to use some magic btrfs ioctls to get
 info about the filesystem, right? It would be nice to have something
 in /sys/fs/btrfs.

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux