You are not logged in.

#1 2006-07-26 16:06:33

random.bits
Member
From: Ottawa Canada
Registered: 2004-07-18
Posts: 39

mkinitcpio and external usb hard drive

I have been trying to get an external hard drive to boot and run Arch linux. I searched the forums for help, and have not found similar problems.

I have no problem getting grub to run and start the kernel and run my initrd image.

I installed everything directly to the external USB disk using the Arch install script and ftp. The disk has only one partition, and I chose not to have swap.

Grub menu looks like:
# (0) Arch Linux
title  Arch Linux
root   (hd0,0)
kernel /boot/vmlinuz26 root=/dev/sda1 ro vga=773
initrd /boot/kernel26.img

My hooks line in the mkinitcpio.conf file is:
HOOKS="base udev usb usbinput filesystems"
(all other lines are empty e.g. MODULES="")
It built successfully (new kernel26.img file was created)


Last lines displayed while booting:

Initializing USB Mass Storage driver...
usb 2-1: new low speed USB device using uhci_hcd and address 2
usb 2-1: configuration #1 chosen from 1 choice
scsi0: SCSI emulation for USB Mass Storage devices
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usbcore: registered new driver hiddev
input: composite USB PS2 Converter USB to PS2 Adaptor v1.12 as /class/input/input0
input: USB HID v1.10 Mouse [ composite USB PS2 converter USB to PS2 Adpator v1.12] on usb-0000:00:1d.0-1
usbcore:registered new driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
done.
:: Running Hook [usb]
:: Running Hook [filesystems]
:: Loading root filesystem module...-e
Attempting to create root device '/dev/sda1'
Waiting for devices to settle... Vendor: WDC WD40 Model: 0VE-00HDT0     Rev: 09.0
   Type:   Direct-Access     ANSI SCSI revision: 00
SCSI device sda: 78140160 512-byte hdwr sectors (40008 MB)
sda: Write Protect is off
sda: assuming drive cache: write through
sda:done
/bin/mknod "/dev/root" b 8 1
<6>usb 1-6: reset high speed USB device using ehi_hcd and address 3
usb 1-6: reset high speed USB device using ehi_hcd and address 3
usb 1-6: reset high speed USB device using ehi_hcd and address 3
usb 1-6: reset high speed USB device using ehi_hcd and address 3
usb 1-6: reset high speed USB device using ehi_hcd and address 3
usb 1-6: reset high speed USB device using ehi_hcd and address 3
sd 0:0:0:0: SCSI erro: return code = 0x500000
end_request: I/O error, dev sda, sector 0
Buffer I/O error on device sda, logical block 0
usb 1-6: reset high speed USB device using ehci_hcd and address 3
usb 1-6: reset high speed USB device using ehi_hcd and address 3
usb 1-6: reset high speed USB device using ehi_hcd and address 3
usb 1-6: reset high speed USB device using ehi_hcd and address 3
usb 1-6: reset high speed USB device using ehi_hcd and address 3
usb 1-6: reset high speed USB device using ehi_hcd and address 3
sd 0:0:0:0: SCSI error: return code = 0x50000
end_request: I/O error, dev sda, sector 0
Buffer I/O error on device sda, logical block 0
unable to read partition table
sd 0:0:0:0: Attached scsi disk sda
/init: 1: cannot open /dev/root: No such device or address

:: Initramfs Completed - control passing to kinit
Waiting 0 s before mounting root device...
kinit: Cannot open root device dev(8,1)
kinit: init not found!
Kernel panic - not syncing: Attempted to kill init!

It sort of looks like the external hard drive is controlled by the uhcd_hcd module, but is trying to be mounted as a ehci_hcd device.

Any help would be appreciated.

Offline

#2 2006-07-26 16:17:11

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,745

Re: mkinitcpio and external usb hard drive

Getting an external usb drive booting can be a problem .... check in /dev to see if nodes are set up for one thing?

Init is not starting so it may not be able open initial console

Maybe go in under live cd (chroot!) & check it works

even better fire up qemu /dev/<whatever> see what happens ...

HTH


Mr Green

Offline

#3 2006-07-26 17:33:34

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: mkinitcpio and external usb hard drive

Hmm, someone else had a similar problem.  Note the ":: Loading root filesystem module...-e" line.  That "-e" shouldn't be there.  It should be, instead, the module for the filesystem.

As a workaround for right now, you can add your filesystem module to the MODULES array, and remove the "filesystems" hook.
In that case, you'll probably want rootdelay=* to allow the drive some time to settle, and rootfstype=* to speed up filesystem detection while in kinit.

By the way, what filesystem do you have on that machine?  Can you tell me what

/usr/lib/klibc/bin/fstype < /dev/sda1

outputs on a running system (you may need to be root, or add yourself to the "disk" group or something similar) - /dev/sda1 should be replaced if the usb drive is not sda1

Offline

#4 2006-07-26 17:56:24

random.bits
Member
From: Ottawa Canada
Registered: 2004-07-18
Posts: 39

Re: mkinitcpio and external usb hard drive

Mr Green,

I checked the existence of the devices (/dev/sda, /dev/sda1, /dev/root) and they do not exist. I thought udev would create them.
qemu looks very interesting. It may take a while to figure out how to boot a external usb disk using it.

phrakture,
The filesystem is :
[root@cowboy-bebop mnt]# /usr/lib/klibc/bin/fstype < /dev/sda1
FSTYPE=ext3
FSSIZE=40007729152

I will try using the module line instead of the filesystems hook. I assume that the rootdelay=* and rootfstype=* also go into the mkinitcpio.conf file as well. I will check about them first to be sure.

Thank you both for your replies

Offline

#5 2006-07-26 18:03:56

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,745

Re: mkinitcpio and external usb hard drive

qemu /dev/sda<number>

emmm udev not picking it up ?

run lsusb first then check /dev

HTH


Mr Green

Offline

#6 2006-07-26 18:18:01

random.bits
Member
From: Ottawa Canada
Registered: 2004-07-18
Posts: 39

Re: mkinitcpio and external usb hard drive

Mr Green,
I haven't installed qemu yet, I just started reading the documentation a bit. I will install it and try it out.
Thought I'd try phrakture's suggestions first.

phrakture,

I changed my mkcpio.conf file to
MODULES=(ext3)
removed filesystems from HOOK
Added rootdelay=15 and rootfstype=ext3 to my kernel line

got this message on boot up:
:: Running Hook [usb]
:: Initramfs Completed, control passed to kinit
Wait 15 s before mounting root device
  Vendor: WDC WD40 Model: 0VE-00HDT0 Rev: 09.0
Type: Direct-Access ANSI SCSI revision: 00
kinit: Cannot open root device dev(0,0)
kinit: init not found!
kernel panic - not syncing: Attempted to kill init!

Surprised that it wanted to load dev(0,0) thought it should be dev(8,1).

Thanks

Offline

Board footer

Powered by FluxBB