You are not logged in.

#1 2010-01-09 06:04:04

rWarrior
Member
Registered: 2008-12-28
Posts: 26

Problem booting Archlinux from USB key

I downloaded archlinux-2009.08-core-i686.img from one of the mirrors, and created a bootable usb key as described in the instructions.
My ultimate goal is to install Archlinux on my USB key (not as a LiveCD), so I booted the computer using the usb key.
I then created the a new partition on my usb key after the first, installed the base packages into it.
(The new partition is mounted at /mnt)

In the Live session, I also copied grub into the newly created partition:
cp /usr/lib/grub/i386-pc/* /mnt/boot/grub

I made the second partition bootable, and edited /mnt/boot/grub/menu.lst as follows:

title  Arch Linux (Main)
root   (hd1,1)
kernel /boot/vmlinuz26 root=/dev/sdb2 ro
initrd /boot/kernel26.img

After rebooting, grub couldn't boot:
Error 17: Cannto mount selected partition

After some testing, I figured out that the usb key was regarded as (hd0).
So I changed the second line to:
root   (hd0,1)
since the partition I want to boot from is the second partition on my usb key.

However, while booting, another error occured:
Root device '/dev/sdb2' doesn't exist, attempting to create it
ERROR: Failed to parse block device ids for '/dev/sdb2'
ERROR: Unable to detect or create root device 'dev/sdb2'

In the recovery shell, I went to /dev and found that there is no sdb.
In console output, the hard disk is attached as 'sda', but I don't see a removable disk attached anywhere.
In /dev/disk/by-uuid, there were only 3 entries, corresponding to the 3 partitions on my primary harddisk. (So I guess using UUID wouldn't work in this case, as the USB key is not attached.)

Why is the USB key not attached?
Why can't I find it in /dev of the ramfs during booting?
I tried using rootdelay=30 (it was already waiting 10 seconds), to no avail?

Or is the USB actually attached? Where is it?


I tried adding usb to HOOKS in /mnt/etc/mkinitcpio.conf, and re-compiling /mnt/boot/kernel26.img:
HOOKS="base udev usb autodetect pata usb scsi sata filesystems"
But now, not even the hard disk and dvd drive are attached, and it tries to mount the filesystem right after the keyboard was attached!

Thanks in advance!

Last edited by rWarrior (2010-01-09 07:13:23)

Offline

#2 2010-01-09 17:01:29

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: Problem booting Archlinux from USB key

I did this once, and if I remember right, UUID is the only way to go, because it doesn't change from boot to boot or machine to machine. Boot the install CD, get the UUID's for your flash drive and fix your grub entry on the flash drive before you try to boot from it again. Have patience, it does work!

Scott

Offline

#3 2010-01-10 16:15:32

rWarrior
Member
Registered: 2008-12-28
Posts: 26

Re: Problem booting Archlinux from USB key

I am now using UUID to reference my flash drive.
The problem is that the flash drive is not attached for some reason, not even after having added "usb" to HOOkS and recompiling the image (which made the matter worse), as described above.

Any thoughts?

Thanks

Last edited by rWarrior (2010-01-10 16:16:20)

Offline

#4 2010-01-10 17:27:51

rWarrior
Member
Registered: 2008-12-28
Posts: 26

Re: Problem booting Archlinux from USB key

Offline

Board footer

Powered by FluxBB