# Does anybody know why I have root FS mounted twice?

## devsk

```
# df                                

Filesystem           1K-blocks      Used Available Use% Mounted on

rootfs                25604080   7455228  18148852  30% /         

/dev/sda7             25604080   7455228  18148852  30% /
```

The initrd (I am using genkernel based initrd) is supposed to mount in 'ro'. So, who is mounting my filesystem 'rw' as rootfs? The second entry seems to be because of /etc/fstab.

----------

## John R. Graham

Don't know but I see the same thing:

```
ceres ~ # mount | awk '$3 == "/"'

rootfs on / type rootfs (rw)

/dev/i2o!hda3 on / type reiser4 (rw,noatime,atom_max_size=0x5d8f,atom_max_age=0x249f0,atom_min_size=0x100,atom_max_flushers=0x1,cbk_cache_slots=0x10)
```

I'll try to check one of my non-initrd systems later to see if it's actually related to that.

- John

----------

## kernelOfTruth

I see the same, it would really be interesting to know how genkernel works in that regard   :Smile: 

----------

## aidanjt

That happens if you use an initramfs to boot and mount root.  If you're using lvm/crypto root and such.  This is normal as the initramfs' rootfs can not be unmounted.

----------

## Nerevar

I have rootfs and /dev/root. I had to add /dev/root to fstab so that it would pick up the proper mount options as it doesn't use the /dev/sd device.

I don't use initramfs or lvm/crypto root. There must be an additional reason(s) this occurs. For me, this started when I switched to ~x86 (from x86).

----------

## sera

The other reason you are looking for is baselyout2 and openrc.

----------

## Hu

It is normal for rootfs to be rw.  See Documentation/filesystems/ramfs-rootfs-initramfs.txt.

----------

## devsk

I think this explains it:

 *Quote:*   

> 
> 
> What is rootfs?
> 
> ---------------
> ...

 That's why it says "rootfs" in the FS part of the /proc/mounts output and not "ext4". Its the kernel doing it. The other entry for "/" shows the correct FS and options, and is the overriding filesystem.

----------

## d2_racing

Are you using baselayout 2.0 ? because on my testing box I have that too but on my stable box, I see only one rootfs.

----------

## devsk

 *d2_racing wrote:*   

> Are you using baselayout 2.0 ? because on my testing box I have that too but on my stable box, I see only one rootfs.

 May be its because of baselayout 2.0. Its possible to remount the root with rw and correct options from fstab, instead of directly mounting from fstab on top of "/", thus leaving the older mount around. May be baselayout folks need to fix this, although it doesn't cause any harm. It may confuse some scripts which rely on cat /proc/mounts output to contain only one "/".

----------

## d2_racing

I don't know, but it's a know issue at least.

----------

## cach0rr0

I have this on bl-2/openrc, and I do *not* use an initramfs/initrd

Hasn't caused me any problems, so I'm perfectly happy ignoring it for the time being. 

For reference:

```

laptop02 ~ # df |grep root

rootfs                 2071416    253796   1712396  13% /

/dev/root              2071416    253796   1712396  13% /

laptop02 ~ # cat /proc/cmdline

root=/dev/sda3 init=/sbin/bootchartd vga=0x318 video=vesafb:mtrr:3,ywrap splash=silent,theme:natural_gentoo console=tty1 rootfstype=ext4 quiet

```

----------

## ndse2112

https://forums.gentoo.org/viewtopic-t-629102-start-0.html

----------

## d2_racing

Thanks for the link.

----------

