Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 211982 - sys-kernel/genkernel-3.4.9: unionctl to be deprecated, will break genkernel unionfs support in the future
Summary: sys-kernel/genkernel-3.4.9: unionctl to be deprecated, will break genkernel u...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2008-03-01 15:06 UTC by Stefan Nickl
Modified: 2009-12-26 22:47 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Nickl 2008-03-01 15:06:00 UTC
I recently needed a 2.6.23 kernel running with a read-only root fs, so I applied the corresponding unionfs patch from their official homepage, and ran genkernel with UNIONFS="no" in /etc/genkernel.conf.

On this course I found out that later unionfs versions don't support unionctl any more to administer the stacking, only the "mount -oremount" method is supported.

In order to get unionfs working again, generic/initrd.scripts:union_insert_dir() needs to be modified.

Removing the lines with "BRANCH_0" and "/sbin/unionctl", putting this line in their place did the trick for me:

mount -t unionfs -oremount,add=:$2=ro none $1

As a nice side effect, unionctl will be no longer needed in the initrd :)

PS: Don't know if this already works with the unionfs version that genkernel uses today.

Reproducible: Always
Comment 1 Andrew Gaffney (RETIRED) gentoo-dev 2008-03-01 15:54:21 UTC
In 3.4.10_pre, unionfs support has been removed completely, since the only current versions require kernel patching and the tools no longer work.
Comment 2 Stefan Nickl 2008-03-01 17:19:03 UTC
I see. About the tools, that was exactly what I was trying to help fix.

The unionfs support in genkernel was useful for read-only root situations.
As far as I understand, the LiveCD also has to solve this somehow.
So, is there a new way in gentoo to handle a read-only root?

The "old method" from http://gentoo-wiki.com/HOWTO_Read-only_root_filesystem doesn't look very attractive to me...
Comment 3 Stefan Nickl 2008-03-01 17:46:25 UTC
Ok, I did RTFS.

The volatile stuff is copied to newroot and the rest is symlinked in.

But it's only done if CDROOT=1, couldn't this be made more generic?
Like with an extra boot parameter RO or such?

The real root would need to be mounted into something like /newroot/rw-root though since in the general case there is no loop device involved...
Comment 4 Andrew Gaffney (RETIRED) gentoo-dev 2008-11-14 22:21:36 UTC
I've reimplemented unionfs support in genkernel with unionfs-fuse. There's currently no control mechanism (unionfs_insert_dir() is gone), since unionfs-fuse doesn't currently support it. However, the remount method *might* work. I don't currently see a need for it, though.

You can test the new implementation by emerging genkernel-9999 enabling support for FUSE (built-in or module) in your kernel, and running genkernel with --unionfs or setting UNIONFS=1 in your genkernel.conf.
Comment 5 Andrew Gaffney (RETIRED) gentoo-dev 2009-12-26 22:47:31 UTC
The experimental fuse unionfs support didn't work properly (none of the implementations support unionfs as / properly). We'll revisit this once there's proper unionfs/aufs/etc. support in the upstream kernel (or at least gentoo-sources)