Using USB floppy drive for root floppy
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 4 lines
[...]
Originally, I just downloaded the standard boot and root floppies. I booted and got the "Insert root floppy disk to be loaded into RAM disk and press ENTER" message. Upon inserting the root disk and pressing ENTER I get a
Quoted 8 lines
message saying "Unable to mount root fs on 02:00".
[...]
To get around this problem I compiled my own kernel (2.4.12) with USB and SCSI floppy support. Upon booting that kernel, linux recognizes the USB floppy drive and apparently assigns it to sda. I then tried booting with root=/dev/fd0 which caused the "Unable to mount root fs on 02:00" again. I then tried root=/dev/sda which caused the kernel to panic with "Unable to mount root fs on 08:00".
There must be a delay before an attempt to mount is made. Insert schedule_timeout(5*HZ) there (mdelay won't work because it locks out khubd).
-- Pete
Quoted 3 lines · Pete Zaitcev
There must be a delay before an attempt to mount is made. Insert
schedule_timeout(5*HZ)there (mdelay won't work because it locks out khubd).
I made the patch below for this kind of thing. With this I can mount the root fs on a USB harddisk.
Eric
fs/super.c renamed from fs/super.c.orig +6 -4
@@ -1009,11 +1009,13 @@* Allow the user to distinguish between failed open * and bad superblock on root device. */ -printk ("VFS: Cannot open root device \"%s\" or %s\n" , +printk ("VFS: Cannot open root device \"%s\" or %s, retrying in 1s.\n" , root_device_name,kdevname (ROOT_DEV )); -printk ("Please append a correct \"root=\" boot option\n" ); -panic ("VFS: Unable to mount root fs on %s" , -kdevname (ROOT_DEV )); + +/* wait 1 second and try again */ + current->state =TASK_INTERRUPTIBLE ; +schedule_timeout (HZ ); + goto retry; }check_disk_change (ROOT_DEV );