rootfs on USB storage device

Jos Nouwen (josn@josn.myip.org)
Thu, 15 Nov 2001 04:22:33 +0100 (CET)


Since I own a USB Pen Drive, which is perfectly working under Linux, I
wanted to put a linux rescue system on it. But for some reason it wont
work.

I linked in everything neccesary to boot from it: CONFIG_USB,
CONFIG_USB_DEVICEFS, CONFIG_USB_UHCI, CONFIG_USB_STORAGE, CONFIG_SCSI,
CONFIG_BLK_DEV_SD, CONFIG_EXT2_FS. I'm using kernel 2.4.15-pre4.

The problem is that the pendrive gets detected AFTER the kernel tries to
mount the root fs. Checking init/main.c and entering some debug lines
learns that the USB device gets detected when, in function init(), the
console gets opened: 'open("/dev/console", O_RDWR, 0)'. Immediately after
that, the 'init' program will be exec-ed. At the time of the 'open()'
call, the kernel printk()'s "hub.c: USB new device connect on bus1/1,
assigned device number 2", which is obviously the pendrive. It is
correctly registered, and a SCSI disk is emulated. But too late..

Does anybody have a clue as to what the USB bus has to do with
/dev/console?

Thanks for any help,
Jos Nouwen.

-
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/