[PATCH] Add mount option for initramfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
>From e588ddb89eb3d8b63291dd7cdad5c134fd221a2d Mon Sep 17 00:00:00 2001
From: Roger Leigh <rleigh@xxxxxxxxxx>
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


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux