View previous topic :: View next topic |
Author |
Message |
Moriah Advocate


Joined: 27 Mar 2004 Posts: 2386 Location: Kentucky
|
Posted: Sat May 07, 2011 4:08 am Post subject: HELP What is rootfs entry in /etc/mtab - SOLVED |
|
|
In the new baselayout conversion guide, it ends with:
Quote: |
rootfs entry in /etc/mtab
Previously, the initial rootfs entry was removed from /etc/mtab, and only the real root / entry was present. The duplicate rootfs item was actually added back during shutdown. In OpenRC, both entries must be present for full support of initramfs and tmpfs-on-root. This also means that less writing is required during shutdown.
|
Since all my systems use initramfs, I need to understand just exactly what this "rootfs" item is all about. Since I never had to worry about it before, and now it saysz my systems won't boot without it, I would like a little more detailed explanation of just exactly what I have to do to get it to work with an initramfs.
Thanks!  _________________ The MyWord KJV Bible tool is at http://www.elilabs.com/~myword
Foghorn Leghorn is a Warner Bros. cartoon character.
Last edited by Moriah on Mon May 09, 2011 10:14 pm; edited 1 time in total |
|
Back to top |
|
 |
salahx Guru

Joined: 12 Mar 2005 Posts: 559
|
Posted: Sat May 07, 2011 4:23 am Post subject: |
|
|
See /Documentation/filesystems/ramfs-rootfs-initramfs.txt for the ugly details, but essentialy, is this
rootfs is a special instance of rootfs/tmpfs. Its where the the contents of the initramfs are dumped into. It always exists, there no way to disable it - because its essentially "free" anyway.
Furthermore, there's no way to unmount it, either. It would add more bloat adding code to consider the special case of no rootfs, so just cheaper just to never allow it be unmounted. One of the last things the initramfs code does is delete the contents of the rootfs, so we waste a single "struct inode" (53 bytes last time I checked)
So from now you'll see 2 root entries: one for the inital rootfs (in the initramfs) and one of the the real root. However now instead of baselayout hiding it for you you'll just have to ignore the line mentally. |
|
Back to top |
|
 |
Moriah Advocate


Joined: 27 Mar 2004 Posts: 2386 Location: Kentucky
|
Posted: Sat May 07, 2011 5:19 am Post subject: |
|
|
But do I have to manually do anything to get the box to boot after the change-over? Do I have to edit a file or something? _________________ The MyWord KJV Bible tool is at http://www.elilabs.com/~myword
Foghorn Leghorn is a Warner Bros. cartoon character. |
|
Back to top |
|
 |
cach0rr0 Bodhisattva


Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
Posted: Sat May 07, 2011 6:05 am Post subject: |
|
|
Moriah wrote: | But do I have to manually do anything to get the box to boot after the change-over? Do I have to edit a file or something? |
nope. mtab should be generated automagically
that explanation in the openrc migration guide isn't a suggestion of something you need to do, but rather an explanation of why something was done within openrc
Mainly because people are often confused by seeing two instances of root when typing 'mount'
Code: |
ricker ~ # mount |grep root
rootfs on / type rootfs (rw)
/dev/mapper/root on / type ext3 (rw,noatime,commit=0)
|
running an initramfs here myself for that same purpose - root crypto - on two machines _________________ Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash |
|
Back to top |
|
 |
Moriah Advocate


Joined: 27 Mar 2004 Posts: 2386 Location: Kentucky
|
Posted: Sat May 07, 2011 6:43 am Post subject: |
|
|
I am running root crypto on my laptop, but I run root lvm on all my linux boxes so I can take a snapshot before the nightly backups.  _________________ The MyWord KJV Bible tool is at http://www.elilabs.com/~myword
Foghorn Leghorn is a Warner Bros. cartoon character. |
|
Back to top |
|
 |
cach0rr0 Bodhisattva


Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
Posted: Sat May 07, 2011 8:52 am Post subject: |
|
|
ah right. yeah, thankfully once you get the hang of writing an initramfs, the difference between the two is very minimal.
instead of a cryptsetup luksOpen, a vgscan/vgchange, all sorted.
the openrc migration should be totally painless for both. Very good automation there (except for one fella I helped a while back who forgot to run dispatch-conf after the update ) _________________ Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash |
|
Back to top |
|
 |
Moriah Advocate


Joined: 27 Mar 2004 Posts: 2386 Location: Kentucky
|
Posted: Mon May 09, 2011 4:56 pm Post subject: |
|
|
If you recall from my thread a year and a half ago, "Setting up a laptop with Pappy's Seeds", I boot my laptop from a usb stick. The laptop's internal SSD is fully encrypted at the /dev/sda level, and then lvm sits on top of that, without any partitions at all. The root filesystem is a logical device under lvm, so it can be snapshotted before backups, etc.
I run cryptsetup luksOpen *BEFORE* I run vgscan ; vgchange -a y so the whole disk is encrypted.
After I get the login prompt, I remove the usb stick I booted from. _________________ The MyWord KJV Bible tool is at http://www.elilabs.com/~myword
Foghorn Leghorn is a Warner Bros. cartoon character. |
|
Back to top |
|
 |
|