Release Engineering


FS#13610 - Installing from USB flash drive stalls.

Attached to Project: Release Engineering
Opened by Simon Morgan (sjmorgan) - Sunday, 01 March 2009, 15:35 GMT
Last edited by Gerhard Brauer (GerBra) - Thursday, 30 July 2009, 06:41 GMT
Task Type Bug Report
Category ArchISO
Status Closed
Assigned To Aaron Griffin (phrakture)
Gerhard Brauer (GerBra)
Dieter Plaetinck (Dieter_be)
Architecture All
Severity High
Priority Normal
Reported Version 2009.02
Due in Version 2009.08-RC
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


I wrote the image to my USB flash drive using the instructions on the wiki (dd bs=8M if=image.img of=/dev/sde) after which the filesystem looked like this:

$ sudo fdisk -l /dev/sde

Disk /dev/sde: 1000 MB, 1000341504 bytes
171 heads, 23 sectors/track, 496 cylinders
Units = cylinders of 3933 * 512 = 2013696 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sde1 * 1 85 165985 83 Linux
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(0, 1, 1) logical=(0, 2, 18)
Partition 1 has different physical/logical endings:
phys=(20, 170, 23) logical=(84, 72, 5)

I booted from the drive using the default (top) GRUB menu entry. The kernel began booting. It got to a point where it said it was scanning for USB drives, printed out some messages about mounting ext3 filesystems as ext2 (sda1 and sb1, I think) and then an error about failing to mount the (I think) root filesystem and switching to interactive mode. It then printed the same kind of stuff I get when plugging the USB drive into my Ubuntu installation ("sd 6:0:0:0: [sde] 1953792 512-byte hardware sectors (1000 MB)" etc.) and stalled with the cursor sitting there blinking.

It did not switch to interactive mode as it said. The keyboard was unresponsive and I had to reset the machine.
This task depends upon

Closed by  Gerhard Brauer (GerBra)
Thursday, 30 July 2009, 06:41 GMT
Reason for closing:  Fixed
Additional comments about closing:  Since 2009.08-beta1 we use a new methode for detecting the boot device.
USB delaying is no more necessary.
Comment by Gerhard Brauer (GerBra) - Sunday, 01 March 2009, 17:04 GMT
The fdisk barking on "different physical/logical beginnings" is normally only a warning. But the partition sde1 should be mountable on other systems (it's an ext2 FS, so maybe on Ubuntu it's not allowd to use/mount etx2 as a user?, try it as root with explicit FS parameter: mount -t ext2 /dev/sde1 /yourmountpoint

For the boot problem: edit the grub boot entry and increase the usbdelay bootparameter (default 5) to somewhat like 15. Maybe your USB subsystem needs a longer period to settle down.

Or copy the image again with dd (you could try it without the bs=8M parameter, only writing with if= and of= is enough).
Comment by Simon Morgan (sjmorgan) - Sunday, 01 March 2009, 19:04 GMT
Maybe I wasn't clear enough but I have no problem mounting anything in Ubuntu.

I tried writing the image without the bs parameter as well as increasing the bootdelay, but it made no difference.

The warning it gives (for two of my partitions, sda1 and sdb1) is "ext2_super_fill: mounting ext3 filesystem as ext2". The error is "ERROR: cannot find boot device, cannot continue...".

It might be interesting to know that the details of the USB flash drive ("sd 6:0:0:0: [sde] 1953792 512-byte hardware sectors (1000 MB)" etc.) only appear after the amount of time specified by usbdelay (whether it's 5 or 15) and after the error about not being able to find the boot device. As if it's only accessing it after everything has failed, despite the fact that it's the device I'm booting from.
Comment by Simon Morgan (sjmorgan) - Tuesday, 03 March 2009, 13:21 GMT
It turns out that it does dump me to a prompt, just that I can't type anything because my keyboard doesn't work.
Comment by Gerhard Brauer (GerBra) - Tuesday, 03 March 2009, 17:25 GMT
Seems that your BIOS provides a different bus order (sata,ide,usb,...) than the kernel would like to see it. Maybe try to set in BIOS external mediums, usb as primary in the order of boot devices. For the keyboard: i guess you use also USB keyboard/mouse, have you enabled USB hid support in the BIOS?
Could you try a other usb stick and/or the same stick on another PC? Meanwhile (if you want get a installation) it's maybe better to use a CD ISO...
Comment by Aaron Griffin (phrakture) - Tuesday, 03 March 2009, 18:24 GMT
Sounds like it's related to the goofy scanning we do of ALL devices.
See also  FS#13053 
Comment by Gerhard Brauer (GerBra) - Tuesday, 03 March 2009, 18:47 GMT
Aaron: yes, maybe. But even when the stick is the 5th device (sde) in device order the squashfs files should be found... Normally ;-)

Simon: could you (as already mentioned) test this stick on other PCs? Also try on your PC: increase the usbdelay value to something like 45. Have you an PS/2 keyboard you could attach to have a keyboard when stucking in initramfs shell? Another Tip: if you have other extern devices (usb cdroms, harddisks or whatever) attached during boot, could you unplug as many devices as possible not needed to install the system? To reduce the count of devices getting scanned for the archiso files.
Also try my tip with changing the boot order in BIOS...
Comment by Simon Morgan (sjmorgan) - Thursday, 05 March 2009, 14:03 GMT
usbdelay=45 seems to get around the problem.

My BIOS doesn't seem to have any settings relating to bus order; you just configure a numbered list of devices for each bus (IDE, SATA, USB) and then you can choose the boot order from the #1 device in each of those lists.
Comment by Gerhard Brauer (GerBra) - Thursday, 05 March 2009, 14:50 GMT
Nice to hear that it worked for you. The time we make a call for the "best" default value for usbdelay we came to 5 seconds, which worked for most test users. IMHO we should make this bootoption more popular on the USB stick wiki page etc. So if one alos gets similar problems he could try increasing this to something bigger value... (i make me a notice!)

Comment by Aaron Griffin (phrakture) - Friday, 06 March 2009, 21:49 GMT
Hmmm, I really wish there was a better way to handle these things...