* [PATCH] Add mount option for initramfs
@ 2011-12-16 23:15 Roger Leigh
2011-12-17 10:15 ` [PATCH] Add man page entry " Roger Leigh
2011-12-20 13:14 ` [PATCH] Add mount option " Karel Zak
0 siblings, 2 replies; 4+ messages in thread
From: Roger Leigh @ 2011-12-16 23:15 UTC (permalink / raw)
To: util-linux
[-- Attachment #1: Type: text/plain, Size: 1096 bytes --]
Hi,
I've attached a trivial patch for an "initramfs" mount option. The
purpose of this patch is that selected mounts in /etc/fstab can be
identified for mounting in the generated initramfs. This will
permit e.g. mounting of a separate /etc and /usr and any other
admin-configured filesystems prior to init starting.
Uses: encrypted /etc and unencrypted / and /usr
separate /usr mounted with rootfs
- this means libraries and binaries on /usr are available
from the initramfs onward, solving a whole host of
problems with e.g. nss and pam modules having dependent
libs in /usr, etc., which aren't available during boot.
Feel free to change the name to something more generic; this is
intended for use with Debian's initramfs-tools initramfs
generator, but may have potential for cross-distribution use.
Regards,
Roger
--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
[-- Attachment #2: 0001-mount-Allow-initramfs-dummy-mount-option.patch --]
[-- Type: text/x-diff, Size: 730 bytes --]
>From e588ddb89eb3d8b63291dd7cdad5c134fd221a2d Mon Sep 17 00:00:00 2001
From: Roger Leigh <rleigh@debian.org>
Date: Fri, 16 Dec 2011 23:07:35 +0000
Subject: [PATCH] mount: Allow initramfs dummy mount option
---
mount/mount.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/mount/mount.c b/mount/mount.c
index 9b444c4..05e82fa 100644
--- a/mount/mount.c
+++ b/mount/mount.c
@@ -202,6 +202,7 @@ static const struct opt_map opt_map[] = {
{ "nostrictatime", 0, 1, MS_STRICTATIME }, /* kernel default atime */
#endif
{ "nofail", 0, 0, MS_COMMENT}, /* Do not fail if ENOENT on dev */
+ { "initramfs", 0, 0, MS_COMMENT}, /* Mount filesystem in initramfs */
{ NULL, 0, 0, 0 }
};
--
1.7.7.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Add man page entry for initramfs
2011-12-16 23:15 [PATCH] Add mount option for initramfs Roger Leigh
@ 2011-12-17 10:15 ` Roger Leigh
2011-12-20 13:14 ` [PATCH] Add mount option " Karel Zak
1 sibling, 0 replies; 4+ messages in thread
From: Roger Leigh @ 2011-12-17 10:15 UTC (permalink / raw)
To: util-linux
[-- Attachment #1: Type: text/plain, Size: 708 bytes --]
On Fri, Dec 16, 2011 at 11:15:38PM +0000, Roger Leigh wrote:
> Hi,
>
> I've attached a trivial patch for an "initramfs" mount option. The
> purpose of this patch is that selected mounts in /etc/fstab can be
> identified for mounting in the generated initramfs. This will
> permit e.g. mounting of a separate /etc and /usr and any other
> admin-configured filesystems prior to init starting.
The following patch documents this in the mount(8) manpage.
Regards,
Roger
--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
[-- Attachment #2: 0002-mount.8-Document-initramfs-mount-option.patch --]
[-- Type: text/x-diff, Size: 1194 bytes --]
>From 6ea3cf1bdc58d2c1e0124967268d1d1e82c838a4 Mon Sep 17 00:00:00 2001
From: Roger Leigh <rleigh@debian.org>
Date: Sat, 17 Dec 2011 10:11:49 +0000
Subject: [PATCH 2/2] mount.8: Document initramfs mount option
---
mount/mount.8 | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/mount/mount.8 b/mount/mount.8
index fc352b5..f7be9d3 100644
--- a/mount/mount.8
+++ b/mount/mount.8
@@ -917,6 +917,16 @@ This option implies the options
(unless overridden by subsequent options, as in the option line
.BR group,dev,suid ).
.TP
+.B initramfs
+The filesystem will be mounted by initial initramfs, before the root
+filesystem becomes available. This permits separation of files
+required for boot onto separate filesystems, such as those in /etc and
+/usr. This additionally permits selected encryption of files in /etc,
+for example, while leaving the remainder of the files in / and /usr
+unencrypted for performance. Note that filesystems marked using this
+option may require the running of a tool to update the initramfs
+following any changes.
+.TP
.B iversion
Every time the inode is modified, the i_version field will be incremented.
.TP
--
1.7.7.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Add mount option for initramfs
2011-12-20 13:14 ` [PATCH] Add mount option " Karel Zak
@ 2011-12-19 13:40 ` Roger Leigh
0 siblings, 0 replies; 4+ messages in thread
From: Roger Leigh @ 2011-12-19 13:40 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
On Tue, Dec 20, 2011 at 02:14:40PM +0100, Karel Zak wrote:
> On Fri, Dec 16, 2011 at 11:15:38PM +0000, Roger Leigh wrote:
> > { "nofail", 0, 0, MS_COMMENT}, /* Do not fail if ENOENT on dev */
> > + { "initramfs", 0, 0, MS_COMMENT}, /* Mount filesystem in initramfs */
>
> I don't think this is the right way. We have to be very conservative
> with new mount options, especially with options specific for any
> use case.
>
> You can use comment=initramfs and in new mount(8) will be also
> supported x-* options, then you can use x-initrd or so.
OK, no worries. I didn't realise you could use the comment syntax
in this way, so either that or x-initramfs/x-initrd will do nicely.
Thanks,
Roger
--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Add mount option for initramfs
2011-12-16 23:15 [PATCH] Add mount option for initramfs Roger Leigh
2011-12-17 10:15 ` [PATCH] Add man page entry " Roger Leigh
@ 2011-12-20 13:14 ` Karel Zak
2011-12-19 13:40 ` Roger Leigh
1 sibling, 1 reply; 4+ messages in thread
From: Karel Zak @ 2011-12-20 13:14 UTC (permalink / raw)
To: Roger Leigh; +Cc: util-linux
On Fri, Dec 16, 2011 at 11:15:38PM +0000, Roger Leigh wrote:
> { "nofail", 0, 0, MS_COMMENT}, /* Do not fail if ENOENT on dev */
> + { "initramfs", 0, 0, MS_COMMENT}, /* Mount filesystem in initramfs */
I don't think this is the right way. We have to be very conservative
with new mount options, especially with options specific for any
use case.
You can use comment=initramfs and in new mount(8) will be also
supported x-* options, then you can use x-initrd or so.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-12-19 13:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-16 23:15 [PATCH] Add mount option for initramfs Roger Leigh
2011-12-17 10:15 ` [PATCH] Add man page entry " Roger Leigh
2011-12-20 13:14 ` [PATCH] Add mount option " Karel Zak
2011-12-19 13:40 ` Roger Leigh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.