Skip to contentSkip to conversation

Bug in initrd-handling while remounting the root

PATCH New =^.^= 1 participant 1 message Jul 10, 2003 VFS

lore
Share & tools
lore

=^.^=

author
#0 lore raw

PATCH 1/1 Bug in initrd-handling while remounting the root

At work we've encountered a problem when trying to netboot 2.4.21. After /linuxrc has been executed and the kernel tries to remount the root, it panics with the all too well known message "Unable to mount root fs on ...".

The kernel bugs out in mount_block_root in the file init/do_mounts.c, to be more precise in the for-loop. What happens is that it tries to mount the file system as type ext2 (which happens to be first in the list in our case), but instead of returning -EINVAL it returns -EBUSY, the loop exits instead of trying the next (correct) fs-type and the kernel panics.

Here's a patch:

init/do_mounts.c renamed from init/do_mounts.orig +1 -0
@@ -359,6 +359,7 @@
 				flags |= MS_RDONLY;
 				goto retry;
 			case -EINVAL:
+		        case -EBUSY:
 				continue;
 		}
 	        /*

--
Martin Persson [email protected]
http://martin.kfib.org/ http://ss.kfib.org/

"esound is junk. The only thing esd has is a good client API for
going boing at approximately the right time. Anything else is beyond it." -- Alan Cox