USB drive for Linux attempt panics at /dev/console

Jim Cornette fc-cornette at insight.rr.com
Tue Aug 9 00:06:22 UTC 2005


I tried to make an initird image to boot a usb drive and ended up 
getting a panic during dev console. Booting from the same initrd when 
the drive is installed on a regular IDE cable allows the system to boot 
in two different computers without problem.
It however fails when booted on a computer capable of booting from USB 
and also when trying to boot from a computer that cannot boot primarily 
from a USB drive by using a boot partition on and internel hd to launch 
the / filesystem off of the USB disk.
To create the image, I used the below script.
Any clues as to why the usb connected drive will boot when connected 
through a cable connected to the internal controller but fails when 
connected through USB?

Jim

mkinitrd --preload=ehci-hcd --preload=usb-storage --preload=scsi_mod 
--preload=sd_mod /boot/initrd-<kernel-version>_usb.gz <kernel-version>

I get this from inside the initrd image.

mount -t proc /proc /proc
setquiet
echo Mounted /proc filesystem
echo Mounting sysfs
mount -t sysfs /sys /sys
echo Creating /dev
mount -o mode=0755 -t tmpfs /dev /dev
mknod /dev/console c 5 1
mknod /dev/null c 1 3
mknod /dev/zero c 1 5
mkdir /dev/pts
mkdir /dev/shm
echo Creating device nodes
echo -n "/sbin/hotplug" > /proc/sys/kernel/hotplug
makedevs
echo "Loading ehci-hcd.ko module"
insmod /lib/ehci-hcd.ko
echo "Loading scsi_mod.ko module"
insmod /lib/scsi_mod.ko
echo "Loading usb-storage.ko module"
insmod /lib/usb-storage.ko
sleep 8
echo "Loading sd_mod.ko module"
insmod /lib/sd_mod.ko
echo "Loading jbd.ko module"
insmod /lib/jbd.ko
echo "Loading ext3.ko module"
insmod /lib/ext3.ko
makedevs
echo Creating root device
mkrootdev /dev/root
echo Mounting root filesystem
mount -o defaults --ro -t ext3 /dev/root /sysroot
echo Switching to new root
switchroot --movedev /sysroot

For comparison, my untouched initrd contains the below:


mount -t proc /proc /proc
setquiet
echo Mounted /proc filesystem
echo Mounting sysfs
mount -t sysfs /sys /sys
echo Creating /dev
mount -o mode=0755 -t tmpfs /dev /dev
mknod /dev/console c 5 1
mknod /dev/null c 1 3
mknod /dev/zero c 1 5
mkdir /dev/pts
mkdir /dev/shm
echo Creating device nodes
echo -n "/sbin/hotplug" > /proc/sys/kernel/hotplug
makedevs
echo "Loading jbd.ko module"
insmod /lib/jbd.ko
echo "Loading ext3.ko module"
insmod /lib/ext3.ko
makedevs
echo Creating root device
mkrootdev /dev/root
echo Mounting root filesystem
mount -o defaults --ro -t ext3 /dev/root /sysroot
echo Switching to new root
switchroot --movedev /sysroot




More information about the fedora-list mailing list