Messages in this thread | | | From | "H. Peter Anvin" <> | Subject | Re: [PATCH] initramfs + sysfs as root fix | Date | 27 Aug 2003 17:40:33 -0700 |
| |
Followup to: <200308232157.53962.gkajmowi@tbaytel.net> By author: Garrett Kajmowicz <gkajmowi@tbaytel.net> In newsgroup: linux.dev.kernel > > This is my first real patch, so please vet thoroughly > > This patch allows a person to not require mounting a root device at startup. > This works idealy for people trying to use the initramfs/sysfs as the only > filesystem. > > What happens is that when the root device is set to 0,0 mount_root is not > called. I have tested in VMWare extensively, and the patch is quite minimal. > > +++ linux/init/do_mounts.c 2003-08-23 17:22:59.000000000 -0400 > @@ -380,6 +380,12 @@ > if (is_floppy && rd_doload && rd_load_disk(0)) > ROOT_DEV = Root_RAM0; > > +#ifndef CONFIG_ROOT_NFS > + if (MAJOR(ROOT_DEV) == UNNAMED_MAJOR && MINOR(ROOT_DEV) == 0) { > + goto out; > + } > +#endif > + > mount_root();
It seems ugly, to say the least, to conditionalize this on CONFIG_ROOT_NFS. If anything it should be conditionalized on no NFS root actually configured, which is a very different thing.
(Of course, then nfsroot should be done via initramfs...)
-hpa -- <hpa@transmeta.com> at work, <hpa@zytor.com> in private! If you send me mail in HTML format I will assume it's spam. "Unix gives you enough rope to shoot yourself in the foot." Architectures needed: ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |