Skip to contentSkip to conversation

PATCH: Don't check NFS root when root= is given

PATCH H . J . Lu 1 participant 1 message Nov 20, 2001

Subsystems (2)
lore
Share & tools
lore

H . J . Lu

author
#0 lore raw

When the kernel is configured with NFS root, we should be able to pass root=/dev/sda1 to kernel. mount_root in fs/super.c checks:

#ifdef CONFIG_ROOT_NFS
        if (MAJOR(ROOT_DEV) != UNNAMED_MAJOR)
                goto skip_nfs;
	....

I think net/ipv4/ipconfig.c should do same.

H.J.

net/ipv4/ipconfig.c renamed from net/ipv4/ipconfig.c~ +3 -1
@@ -1144,7 +1144,9 @@ static int __init ip_auto_config(void)
 	 */
 	if (ic_myaddr == INADDR_NONE ||
 #ifdef CONFIG_ROOT_NFS
-	    (root_server_addr == INADDR_NONE && ic_servaddr == INADDR_NONE) ||
+	    (MAJOR(ROOT_DEV) == UNNAMED_MAJOR
+	     && root_server_addr == INADDR_NONE
+	     && ic_servaddr == INADDR_NONE) ||
 #endif
 	    ic_first_dev->next) {
 #ifdef IPCONFIG_DYNAMIC