Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

two root entries in /proc/mounts, neither in fstab?

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
19 posts • Page 1 of 1
Author
Message
drwook
Veteran
Veteran
Posts: 1324
Joined: Wed Mar 30, 2005 3:02 pm
Location: London

two root entries in /proc/mounts, neither in fstab?

  • Quote

Post by drwook » Sun Apr 20, 2008 2:33 pm

hey guys,

Well this has confused me, at the top of /proc/mounts (and /etc/mtab) I've got this;
rootfs / rootfs rw 0 0
/dev/root / reiserfs rw,noatime 0 0
I don't recall making one, but /dev/root appears to be a symlink to /dev/hdc3 (the actual root partition for the system). Not sure if this may be udev upgrade weirdness? (or outside chance openrc/baselayout-2, but I can't see it if it is...)

my /etc/fstab starts ;
/dev/hdc6 /boot ext2 noauto,noatime 1 1
/dev/hdc3 / reiserfs noatime 0 0
/dev/hdc5 none swap sw 0 0
but /proc/mounts has no mention of hdc3 at all....?

Maybe I'm being stupid and having a bad day, but if so can someone point out what's going on here? :)
Top
Cazzantonio
Bodhisattva
Bodhisattva
User avatar
Posts: 4514
Joined: Sat Mar 20, 2004 8:57 pm
Location: Somewere around the world

  • Quote

Post by Cazzantonio » Sun Apr 20, 2008 6:34 pm

I have the same problem, but it is an opernc/baselayout-2 issue since it happened after that upgrade.
It isn't an udev issue since a similar installation with same udev and stable baselayout doesn't have two root mounted.
Any mans death diminishes me, because I am involved in Mankinde; and therefore never send to know for whom the bell tolls; It tolls for thee.
-John Donne
Top
enito
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 79
Joined: Mon Oct 10, 2005 4:38 am

  • Quote

Post by enito » Sun Apr 20, 2008 6:39 pm

Hi, any way for fix this? i tryed manualy edit mtab and delete dupped / and setup correctly, but when you reboot , all back again, duped entry...thx
Top
Dairinin
n00b
n00b
User avatar
Posts: 64
Joined: Sun Feb 03, 2008 7:28 pm
Location: MSK, RF

  • Quote

Post by Dairinin » Sun Apr 20, 2008 9:00 pm

Looks like a new "feature" to me. Had to change "/dev/sdb6" to "/dev/root" in cacti data source.
Top
uzz75
n00b
n00b
Posts: 34
Joined: Mon Aug 29, 2005 7:18 pm
Location: Italy

  • Quote

Post by uzz75 » Sun Apr 20, 2008 9:27 pm

I don't think it's from udev

# cd /etc/udev/
# grep rootfs * -R
Michele
Top
Dairinin
n00b
n00b
User avatar
Posts: 64
Joined: Sun Feb 03, 2008 7:28 pm
Location: MSK, RF

  • Quote

Post by Dairinin » Sun Apr 20, 2008 9:58 pm

It's here:
/lib64/udev/write_root_link_rule

called from /lib/rcscripts/addons/udev-start.sh
Top
enito
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 79
Joined: Mon Oct 10, 2005 4:38 am

  • Quote

Post by enito » Sun Apr 20, 2008 11:58 pm

and how we can disable this new feature?

greets
Top
ABCDwp
Retired Dev
Retired Dev
Posts: 79
Joined: Sun Mar 26, 2006 10:47 am

  • Quote

Post by ABCDwp » Mon Apr 21, 2008 12:38 am

The actual change is that baselayout-2/openrc copies /proc/mounts onto /etc/mtab during boot - it does so, so that the mount table in /etc/mtab is correct (/proc/mounts is what the kernel actually mounted - not what you thought you mounted). The /dev/root symlink is so that things make a little more sense to the average end-user, but is unneeded - the kernel will call the initramfs "rootfs" and the root=/dev/XYZ parameter "/dev/root" no matter what you do (IIRC).
Top
drwook
Veteran
Veteran
Posts: 1324
Joined: Wed Mar 30, 2005 3:02 pm
Location: London

  • Quote

Post by drwook » Mon Apr 21, 2008 5:37 am

ABCDwp wrote:The actual change is that baselayout-2/openrc copies /proc/mounts onto /etc/mtab during boot - it does so, so that the mount table in /etc/mtab is correct (/proc/mounts is what the kernel actually mounted - not what you thought you mounted). The /dev/root symlink is so that things make a little more sense to the average end-user, but is unneeded - the kernel will call the initramfs "rootfs" and the root=/dev/XYZ parameter "/dev/root" no matter what you do (IIRC).
hmm. No initramfs here so can't quite see why there's a 'double mount' on /. I won't have much of a chance to dig until the weekend but I'll check it out then....
Top
The Unknown
Guru
Guru
Posts: 335
Joined: Wed Feb 28, 2007 11:10 pm
Location: Minnesota, U.S.A

  • Quote

Post by The Unknown » Mon Apr 21, 2008 7:11 am

This is not new, I have stable systems with the old baselayout and its the exact same.
Your not really double mounting root either. This quote is from some kernel documentation
70 What is rootfs?
71 ---------------
72
73 Rootfs is a special instance of ramfs (or tmpfs, if that's enabled), which is
74 always present in 2.6 systems. You can't unmount rootfs for approximately the
75 same reason you can't kill the init process; rather than having special code
76 to check for and handle an empty list, it's smaller and simpler for the kernel
77 to just make sure certain lists can't become empty.
78
79 Most systems just mount another filesystem over rootfs and ignore it. The
80 amount of space an empty instance of ramfs takes up is tiny.
And the /dev/root symlink is the same as well, my guess is its the same reason as why they provide /dev/cdrom symlinks etc.
Doing what you like is freedom.
Liking what you do is happiness.
Top
Quaoar
n00b
n00b
Posts: 10
Joined: Sun Jan 13, 2008 7:50 am

  • Quote

Post by Quaoar » Mon Apr 21, 2008 8:36 am

but this "feature" definitely hit me with baselayou2/openrc - never had this before and I still don't have it on the baselayout1-machines.
Top
mv
Watchman
Watchman
User avatar
Posts: 6795
Joined: Wed Apr 20, 2005 12:12 pm

  • Quote

Post by mv » Mon Apr 21, 2008 11:48 am

I had googled about this quite a while ago. From my memory, these were the results:
baselayout-1 was once artificially modified to remove rootfs.
openrc wants to be more conformal to the standard (e.g. it should not run only under gentoo) and since some scripts out there rely on /dev/root, openrc makes no attempt to "hide" this filesystem.
Top
Cazzantonio
Bodhisattva
Bodhisattva
User avatar
Posts: 4514
Joined: Sat Mar 20, 2004 8:57 pm
Location: Somewere around the world

  • Quote

Post by Cazzantonio » Mon Apr 21, 2008 1:56 pm

I understand that this rootfs, mounted "below" the standard /dev/root, is something that the kernel does independently of openrc.
/proc/mounts lists correctly this rootfs with or without openrc. What openrc does is exactly copying all entries from /proc/mounts in /etc/mtab, so that's why this rootfs appears with baselayout-2.

What I don't really understand is what this rootfs really is. During the boot process root get mounted readonly and then remounted rw. This rootfs isn't the first mount of the root filesystem, since it is mounted rw. Also the rw remount should be made with "mount -o remount", which won't mount /dev/root above the old mount.

rootfs is present in ubuntu too so it isn't something gentoo-specific.

Can anyone explain me what rootfs is and what is there for?
Any mans death diminishes me, because I am involved in Mankinde; and therefore never send to know for whom the bell tolls; It tolls for thee.
-John Donne
Top
Desintegr
l33t
l33t
User avatar
Posts: 863
Joined: Thu Mar 25, 2004 8:24 am
Location: France - Orléans
Contact:
Contact Desintegr
Website

  • Quote

Post by Desintegr » Mon Apr 21, 2008 10:43 pm

Another problem : options in /etc/fstab are not respected :

/etc/fstab :

Code: Select all

[...]
/dev/sda2		/			xfs		noatime,nodiratime,logbufs=8		0 0
/dev/sda6		/home		xfs		noatime,nodiratime,logbufs=8		0 0
[...]
mount :

Code: Select all

rootfs on / type rootfs (rw)
/dev/root on / type xfs (rw,noatime,nodiratime,noquota)
[...]
/dev/sda6 on /home type xfs (rw,noatime,nodiratime,logbufs=8)
[...]
The logbufs=8 option is ignored for /.
Gentoo ~AMD64
Hoc Volo, Sic Jubeo !
Mon wiki : http://desintegr.free.fr
Top
ABCDwp
Retired Dev
Retired Dev
Posts: 79
Joined: Sun Mar 26, 2006 10:47 am

  • Quote

Post by ABCDwp » Tue Apr 22, 2008 2:29 am

Desintegr wrote:The logbufs=8 option is ignored for /.
What happens if you try to mount -oremount,logbufs=8 /? (If there is an error, then you will have to change the mount options on the kernel command line - this has not changed from baselayout-1, it may only have appeared to work, while not actually doing anything).
Top
Desintegr
l33t
l33t
User avatar
Posts: 863
Joined: Thu Mar 25, 2004 8:24 am
Location: France - Orléans
Contact:
Contact Desintegr
Website

  • Quote

Post by Desintegr » Tue Apr 22, 2008 2:29 pm

Just after boot :

Code: Select all

/dev/root on / type xfs (rw,noatime,nodiratime,noquota)
After mount -o remount / :

Code: Select all

/dev/root on / type xfs (rw,noatime,nodiratime,logbufs=8)
It's ok because the option is already in the fstab.

After mount -oremount,logbufs=8 / :

Code: Select all

/dev/root on / type xfs (rw,noatime,nodiratime,logbufs=8,logbufs=8)
The option appears twice because it is both in the fstab and in the command line.
Gentoo ~AMD64
Hoc Volo, Sic Jubeo !
Mon wiki : http://desintegr.free.fr
Top
BitJam
Advocate
Advocate
Posts: 2513
Joined: Tue Aug 12, 2003 4:15 pm
Location: Silver City, NM

  • Quote

Post by BitJam » Thu May 26, 2011 12:58 am

I've run into this too after upgrading to baselayout-2. I don't mind the two / entries so much, what seems broken to me is that the device that is actually mounted at / no longer shows up in the output of df:

Code: Select all

$ df -h
Filesystem            Size  Used Avail Use% Mounted on
rootfs                 31G   15G   15G  50% /
/dev/root              31G   15G   15G  50% /
I don't understand the purpose of hiding/obscuring this rather important information. It seems like just a horrible idea. I suppose I could process the output of df and run readlink on the first parameter but why make people go through all this effort? IMO this is a big bug.
Top
krinn
Watchman
Watchman
User avatar
Posts: 7476
Joined: Fri May 02, 2003 6:14 am

  • Quote

Post by krinn » Thu May 26, 2011 11:42 pm

it's an old thing : http://forums.gentoo.org/viewtopic-p-62 ... ml#6204542
and the new openrc (it wasn't doing it by this time) now auto mount itself shm (you can check it with mount)

So if anyone wish to disable the rootfs he should hack sysfs to remove shm mount and this should remove rootfs (as this user was doing by this time, when openrc wasn't mounting shm, we were ask to add that in fstab)
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0

dunno if this work to just disable shm fs mount, AND, more dunno how your system will play if you do that.
as it's the new "standard" i can just tell you that you shouldn't disable it, as some new tools might use and expect its presence (and specially as it was add by kernel at first)
Top
theBlackDragon
l33t
l33t
Posts: 768
Joined: Sat Nov 23, 2002 10:02 am
Location: Belgium
Contact:
Contact theBlackDragon
Website

  • Quote

Post by theBlackDragon » Fri May 27, 2011 2:21 pm

I've run into this as well now, so should I replace the direct link to my root partition with /dev/root ?

Right now I get this:

Code: Select all

% df -h
rootfs                293G  121G  158G  44% /
/dev/sda3             293G  121G  158G  44% /
This seems to confuse phpsysinfo and Munin, both think I have 293G more space than I actually have which is a tad annoying.

They also seem to be mounted with different options:

Code: Select all

% mount
rootfs on / type rootfs (rw)
/dev/sda3 on / type ext3 (rw,noatime,errors=continue,barrier=0,data=ordered)
Is there some proper documentation about this? I'm obviously confused and while my install still works properly the change causes annoying issues (as mentioned above)
Fvwm|Fvwm forum
Top
Post Reply

19 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic