[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.58.0707060318160.26869@be1.lrz>
Date: Fri, 6 Jul 2007 04:00:37 +0200 (CEST)
From: Bodo Eggert <7eggert@....de>
To: linux-kernel@...r.kernel.org
Subject: [RFC][Patch] Allow not mounting a root fs
This patch adds the option to not mount another root filesystem
by specifying root=initramfs.
TODO: Documentation
---
BTW: Is it possible to mount a tmpfs on / before extracting the cpio?
While I'm at it:
In init/do_mounts.c, mount_root(void):
ROOT_NFS: Is it desirable to use the floppy as a root device if nfs-root
failed? If I tell my system to d A, i usually dislike it to do B instead.
Is the boot-from-floppy code here still usable, even though booting from
floppy is no longer supported?
diff -X dontdiff -pruN 2.6.21.ori/init/do_mounts.c 2.6.21/init/do_mounts.c
--- 2.6.21.ori/init/do_mounts.c 2007-07-06 03:31:57.000000000 +0200
+++ 2.6.21/init/do_mounts.c 2007-07-06 03:27:33.000000000 +0200
@@ -427,6 +427,9 @@ void __init prepare_namespace(void)
mount_block_root(root_device_name, root_mountflags);
goto out;
}
+ if (!strncmp(root_device_name, "initramfs", 3)) {
+ goto out_nomount;
+ }
ROOT_DEV = name_to_dev_t(root_device_name);
if (strncmp(root_device_name, "/dev/", 5) == 0)
root_device_name += 5;
@@ -444,6 +447,7 @@ void __init prepare_namespace(void)
out:
sys_mount(".", "/", NULL, MS_MOVE, NULL);
sys_chroot(".");
+out_nomount:
security_sb_post_mountroot();
}
--
Top 100 things you don't want the sysadmin to say:
65. What do you mean /home was on that disk? I umounted it!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists