You are not logged in.

#1 2009-05-04 10:28:04

ertug
Member
Registered: 2009-05-04
Posts: 3

Can't boot from USB key (usb not detected) [SOLVED]

Hi all

I followed the tutorial here (http://wiki.archlinux.org/index.php/Ins … _a_USB_key) to install arch on a usb key.

Partition table:
/dev/sdb1: fat32, for /home
/dev/sdb2: ext2, bootable, for /

It boots, grub starts, initrd loaded, hooks loaded (base udev autodetect scsi usb filesystems) but it cant detect the usb key. So it cant find the rootfs and fallback to ramfs recovery shell.
I tried adding kernel parameter rootdelay=10 usbdelay=10, adding usb_storage to MODULES list but it didnt worked.

What can be the problem? please help!

Last edited by ertug (2009-05-04 15:29:01)

Offline

#2 2009-05-04 10:41:44

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: Can't boot from USB key (usb not detected) [SOLVED]

You must have all modules in the initrd. Have you correctly generated the initrd? Is your root filesystem specified correctly? To debug the problem I would try to mount the rootfilesystem manually from the initramfs recovery shell; it should help you to find what is missing

Offline

#3 2009-05-04 11:00:54

ertug
Member
Registered: 2009-05-04
Posts: 3

Re: Can't boot from USB key (usb not detected) [SOLVED]

> You must have all modules in the initrd.
mkinitcpio.conf:

MODULES=""
BINARIES=""
FILES=""
HOOKS="base udev autodetect pata scsi sata usb filesystems"

do i have to add something to MODULES, for example adding usb to HOOKS will load usb_storage isnt it?

> Have you correctly generated the initrd?

mkdir usb
mount /dev/sdb2 usb
mkinitcpio -c usb/etc/mkinitcpio.conf -g usb/boot/kernel26.img

i see the hooks i added loaded on boot.

> Is your root filesystem specified correctly?
menu.lst:

# (0) Arch Linux
title  Arch Linux
root   (hd0,1)
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/33cee4eb-0507-476a-8e6d-55724508937a ro
initrd /boot/kernel26.img

(i tried root=/dev/sdb2)

> To debug the problem I would try to mount the rootfilesystem manually from the initramfs recovery shell; it should help you to find what is missing
i cant mount because it cant detect the usb itself (ie. /dev/sdb* is not created)

Offline

#4 2009-05-04 12:42:15

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: Can't boot from USB key (usb not detected) [SOLVED]

ertug wrote:

>
> Have you correctly generated the initrd?

mkdir usb
mount /dev/sdb2 usb
mkinitcpio -c usb/etc/mkinitcpio.conf -g usb/boot/kernel26.img

i see the hooks i added loaded on boot.

From where are you generating the initrd? I suspect it includes the modules from your running kernel; not the kernel version on the usb key (so you would have no corresponding modules in your initrd). Also mkinitrd is trying to indentify the modules needed for the root filesystem from the version you are running.

Try to chroot in the key:

chroot usb

Then generate the initrd from there specifying the correct kernel version:

mkinitcpio -g -k  <kernel-version-of-the-usb>  /boot/kernel26.img

If that does not work; try to load the module from the initramfs by hand to see what happens.

Last edited by olive (2009-05-04 12:46:48)

Offline

#5 2009-05-04 13:17:18

ertug
Member
Registered: 2009-05-04
Posts: 3

Re: Can't boot from USB key (usb not detected) [SOLVED]

YES! that was the problem.
The live cd kernel is 2.6.28 but i have done a FTP install on the usb key and it has 2.6.29.
Also the generated kernel26.img is very small than the kernel26-fallback.img because it has no modules.

Thank you very much, i have been struggeling with it for a week smile

Offline

Board footer

Powered by FluxBB