I've recently been attempting to use a USB drive as my main root partition, with a small partition on my system disk. Took me a while to get all the options right... and build an initrd that would work... however...
When I first began, I couldn't directly mount the device as the root device in the 2.4.19 kernel I was using, as although I compiled all the usb drivers into the kernel, the devices were not discovered until after the kernel initialized... and mounted the root filesystem... at which point it did a kernel_unlock(); and instantly disocvered all my usb devices. I picked up a 2.5.72 kernel, and that initialized the usb system before the rootfilesystem, but I still couldn't just specify root=/dev/sda2 (/dev/discs/disc1/part2.... etc) it said it couldn't find the device. Well after booting with the new kernel on the old system I had installed on the internal hard drive, I leared that the scsi/usb-storage driver didn't load the partition table... therefore I needed an initrd which could do a sfdisk -R /dev/sda before I could mount it. Finally, I had a problem invoking the correct init... since after all was said and done, the kernel had 10 processes (threads) active and my linuxrc was running as process 11 which means it could not invoke init... but busybox has an alias 'linuxrc' which behaves as init, but does not care about PID. so... an edit of inittab later, and my system was up, running with the root mounted on the USB hard drive..... First login took a long long time... thought something was broken, changed to another terminal, logged in... after a long time all 3 ended up logged in... using the system for a bit I found that there were LONG timeouts... after loading the common things I was using into cache (ls, cd, cat, etc) the system was pretty fast, until I went into another directory which hadn't been cached... was also attempting to do a cvs update of a rather large directory of things... and it went along pretty quick, then hung... switched to another terminal, and tried to run top to see what was happening... after a long time (I say long time, I haven't timed any, but it's on the order of a minute + ) it finally came up... and was able to watch the tasks... was at 100% wait IO time... and like 0% used cpu time... no user time, no system time... just all time waiting in IO... My initrd doesn't work with my 2.4.19 kernel (not sure why yet... but that's for tomorrow to figure out) I also noted several changes to the USB system before the 2.5.72... so my next attempt is 2.5.71... and perhaps grab 2.4.20... there was a patch which I found for mounting usb devices as root in the 2.4.x kernels ... had to do with in do_mounts.c instead of immediately failing the VFS root mount, doing an interuptable sleep for a second, and going back up to retry. Adding this in, the disk was discovered, but was never mounted... All I can say is there really seems to be something wrong somewhere in the system->root->usb chain that I have... perhaps if there's a retry (failed) operation... the timeout is too long? not even really sure how to debug this... but next kernel I compile I'm putting in full verbose logging of everything... Has this been observed already? Jim ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users
