USB drive for Linux attempt panics at /dev/console

From: Jim Cornette (fc-cornette_at_insight.rr.com)
Date: 08/09/05

  • Next message: Colin Brace: "Re: Wireless: good signal but erratic speed"
    Date: Mon, 08 Aug 2005 20:06:22 -0400
    To: For users of Fedora Core releases <fedora-list@redhat.com>
    
    

    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

    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
    

  • Next message: Colin Brace: "Re: Wireless: good signal but erratic speed"

    Relevant Pages

    • Re: USB Booting FC6
      ... USB EXTERNAL REDHAT LINUX RHEL BOOT INITRD INSTALL ... Boot RHEL4 Installation CD, enter "expert". ... echo Mounted /proc filesystem ...
      (RedHat)
    • Re: Problems PXE installing 5.X on RLX Blade
      ... > echo Loading Kernel... ... > IntelBoot Agent Version 4.0.17 ... > Building the boot loader arguments ... > Starting the BTX loader ...
      (freebsd-current)
    • Re: BAT file to re-start in Safe Mode...?
      ... Force a safe boot with your newly created shortcut. ... echo Safe boot on %date% at %time%>> c:\test.txt ... after the reboot". ...
      (microsoft.public.windowsxp.general)
    • Re: BAT file to re-start in Safe Mode...?
      ... Force a safe boot with your newly created shortcut. ... echo Safe boot on %date% at %time%>> c:\test.txt ... after the reboot". ...
      (microsoft.public.windowsxp.general)
    • Re: How to start mysql at boot time?
      ... I can only assume the values are read into memory during the boot ... > the script to start the mysql server and passing the user mysqld to the ... > script so that the script will run as that user. ... The echo just prints " mysqld" to the console during bootup. ...
      (comp.unix.bsd.openbsd.misc)