Release Engineering

This project is intented for all release related issues (isos, installer, etc), under the umbrella of the ArchLinux Release Engineers
Tasklist

FS#12896 - USB install - won't boot into install system

Attached to Project: Release Engineering
Opened by Vladislav Guberinic (neosisani) - Thursday, 22 January 2009, 22:34 GMT
Last edited by Dieter Plaetinck (Dieter_be) - Saturday, 14 February 2009, 15:08 GMT
Task Type Bug Report
Category ArchISO
Status Closed
Assigned To Aaron Griffin (phrakture)
Thomas Bächler (brain0)
Gerhard Brauer (GerBra)
Architecture All
Severity Medium
Priority Normal
Reported Version 2009.01-alpha
Due in Version 2009.02
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

When using http://dev.archlinux.org/~aaron/archiso/archlinux-2009.01-ftp-x86_64.img to install system i can't boot into install system.

Grub goes fine, then booting starts, kernel does some stuff and starts parsing archiso hook. Then it fails with
ERROR: cannot find boot device, cannot continue...
Falling back to interactive prompt

A few seconds after failing to prompt system discovers its usb devices.

I've edited archiso file so that it works, but it is ugly workaround. I've added sleep in several places so my computer has enough time to register all devices. Note that even with this sleep time it took me few restarts for devices to be detected.

I've attached my /hooks/archiso file.
   archiso (4.6 KiB)
This task depends upon

Closed by  Dieter Plaetinck (Dieter_be)
Saturday, 14 February 2009, 15:08 GMT
Reason for closing:  Fixed
Comment by Gerhard Brauer (GerBra) - Thursday, 22 January 2009, 23:05 GMT
Could you try to add rootdelay=10 to the kernel line in grub entry before booting?
Myself could not test usb boot images, but give it a try...
Comment by Vladislav Guberinic (neosisani) - Thursday, 22 January 2009, 23:07 GMT
I've originally tried with rootdelay=5 with no success. When i finish installing computer i'll retry with bigger rootdelays.
Comment by Vladislav Guberinic (neosisani) - Friday, 23 January 2009, 00:02 GMT
No luck with rootdelay=20. Sorry for double posting i forgot i couln't edit my comments.
Comment by Gerhard Brauer (GerBra) - Friday, 23 January 2009, 12:33 GMT
The only sleep period which is affected is your first, after the udevadm things. (The second makes no sense)
So a sleep time of 4s works for you. Could you try decreasing this and report how many seconds you need minimum?
AFAIK this should be handled well by udevadm, settle should wait until all usb(device) events are finished.
Maybe it's better to put additional a short sleep period after this command.
Comment by Vladislav Guberinic (neosisani) - Friday, 23 January 2009, 21:02 GMT
with 3s i could boot 1/3 times.
with 4s i could boot 2/3 times.
with 5s i could boot 3/3 times.

Perhaps we could add notice like: "if it hangs, try again".
Comment by Aaron Griffin (phrakture) - Friday, 23 January 2009, 21:08 GMT
This is weird. It's almost like the udev "Wait for USB devices to settle" thing is doing nothing. Didn't we have another bug report about this?
Comment by kevin (kevin89) - Saturday, 24 January 2009, 00:55 GMT
I'm having the same problem using both i686 & x86_64 .img files.
How can I apply your archiso hook? Adding rootdelay to the kernel line in grub didn't work for me.
Comment by Gerhard Brauer (GerBra) - Saturday, 24 January 2009, 16:45 GMT
I've build a test usb image with a possible patch (based on this Mail: http://www.archlinux.org/pipermail/arch-releng/2009-January/000045.html)
Could you test if this solves the problem? I could not test usb images myself, so i hope <g> that the patch applied correctly...
http://users.archlinux.de/~gerbra/iso/test-usb/archlinux-2009.01-1-ftp-i686.img
http://users.archlinux.de/~gerbra/iso/test-usb/md5sum.txt
Comment by kevin (kevin89) - Saturday, 24 January 2009, 17:02 GMT
@Gerhard; thanks for the effort! However, the image you provided won't boot for me. After grub has loaded, the booting gets stuck at:

/bin/run-init: opening console: No such file or directory
Kernel panic - not syncing: Attempted to kill init!

This happens just after :
Binding /bootmnt to bootmnt
Passing control to Archlinux Initscripts.. Please wait

md5sum was correct

Comment by Marcel Korpel (Marcel-) - Saturday, 24 January 2009, 17:31 GMT
Gerhard, I tested the same and I got another error message, I'm not sure if it is related to this problem:

GRUB Loading stage 1.5Read Error

I also got this using 2008.06 ISO. See http://bbs.archlinux.org/viewtopic.php?pid=474774#p474774
Comment by Vladislav Guberinic (neosisani) - Saturday, 24 January 2009, 17:45 GMT
Works for me.

GerBra, could you somehow dump to some file all the stuff that is seen during boot (after dmesg and before bash)? I think i've seen some other ugly stuff there but can't be sure.
Comment by Aaron Griffin (phrakture) - Saturday, 24 January 2009, 22:45 GMT
Added the ability to use the kernel command line 'rootdelay' parameter to fix this.
Comment by Sam Weston (steelux) - Tuesday, 27 January 2009, 11:05 GMT
I tried booting this image http://dev.archlinux.org/~aaron/archiso/archlinux-2009.01-beta2-ftp-x86_64.img yesterday and rootdelay=10 or 20 appears to make no difference. I also downloaded the i686 image with the same effect.
Comment by Gerhard Brauer (GerBra) - Tuesday, 27 January 2009, 12:00 GMT
Sam, please try it with usbdelay parameter.
Comment by Sam Weston (steelux) - Tuesday, 27 January 2009, 13:01 GMT
It worked! Thanks :)
Comment by Stephen Tanner (scubanator87) - Tuesday, 27 January 2009, 14:32 GMT
Im still getting some issues here. Im working off an eeepc 901.

i tried to edit the grub menue and add usbdelay=5 (also tried 10 and 20) but to no effect)
Here is the full message im getting:

::Scanning usb drives...
EXT2-fs warning (device sda1): ext2_fill_super: mounting ext3 filesystem as ext2
EXT2-fs warning (device sdb1): ext2_fill_super: mounting ext3 filesystem as ext2
ERROR: cannot fint boot device, cannot continue...
Falling back to interactive prompt
ramfs$ scsi 2:0:0:0P Direct-Access SanDisk U3 Cruzer Micro 4.04 PQ: 0 ANSI: 2
sd 2:0:0:0: [sdc] 8027793 512-byte hardware sectors: (4.11 GB/3.82 GiB)
sd 2:0:0:0: [sdc] Write Protect is off
sd 2:0:0:0: [sdc] Assuming drive cache: write through
sd 2:0:0:0: [sdc] 8027793 512-byte hardware sectors: (4.11 GB/3.82 GiB)
sd 2:0:0:0: [sdc] Write Protect is off
sd 2:0:0:0: [sdc] Assuming drive cache: write through sdc: sdc1
sd 2:0:0:0: [sdc] Attached SCSI removable disk
ramfs$

and just to make sure im doing it right but you need to edit the kernel line in grub and after the ramdisk_size=75% you add usbdelay=10 so it looks like "...ramdisk_size=75% usbdelay=10" correct?
Comment by Aaron Griffin (phrakture) - Tuesday, 27 January 2009, 16:00 GMT
Yeah, and I think I just noticed a problem with the way we handled usbdelay. Adding Thomas to check.

If we use usb-storage's use_delay param, we sleep for exactly that time, whereas we should probably sleep for longer than that time. Perhaps usbdelay+1. Do you think this is a good idea, or should we always set use_delay to 0 and use usbdelay for the sleep time only?
Comment by Thomas Bächler (brain0) - Tuesday, 27 January 2009, 16:11 GMT
use_delay should be 0 by default, but might be longer as some old hardware could fail with it. What did we do in the old images? use_delay is 5 by default and we slept for 10 seconds, right? Let's try +1 or +2. Or make it configurable in a test image (sleep use_delay+somethingextra).
Comment by Vladislav Guberinic (neosisani) - Tuesday, 27 January 2009, 18:01 GMT
It works nice with usbdelay parameters.

It also displays someting fancy as "Usbdelay waiting for n seconds"

Comment by Marco Romano (marco_eeepc) - Thursday, 29 January 2009, 12:26 GMT
I have a eeepc, i try usdelay=10 without success.
After i try rootdelay=10 and work correct.
Now the installation is finish correctly.
Bye
Comment by Marcel Korpel (Marcel-) - Thursday, 29 January 2009, 19:17 GMT
Also tried rootdelay=10 on my EEE Box and the problem is resolved.

There was another problem when booting from USB (it's _very_ slow without disconnecting and connecting the USB stick again at boot drive prompt, but I don't think that's related to the boot loader, Syslinux in my case).
Comment by Devin Cofer (Ranguvar) - Thursday, 29 January 2009, 19:22 GMT
Also a problem on my IBM ThinkPad T41 using the http://dev.archlinux.org/~aaron/archiso/archlinux-2009.01-beta2-ftp-i686.img image.

'usbdelay=x' does not work, nor does 'rootdelay=1'... 'rootdelay=10' works.
Comment by Aaron Griffin (phrakture) - Thursday, 29 January 2009, 19:25 GMT
Just a note: I think there is a discrepancy between the x86_64 and i686 images. i686 use rootdelay, whereas x86_64 uses usbdelay.
Comment by Thomas Bächler (brain0) - Thursday, 29 January 2009, 19:34 GMT
Can we make some tests to set nice defaults? Also, how exactly are rootdelay and usbdelay used right now? usbdelay sets use_delay=sleeptime and rootdelay only sets sleeptime and use_delay isn't touched (so in that case, rootdelay must be at least 5 seconds for the USB devices to be there).
Comment by Aaron Griffin (phrakture) - Thursday, 29 January 2009, 19:42 GMT
@Thomas: rootdelay was used just as a param to 'sleep' before you figured out the usbdelay thing. It was replaced with usbdelay now, unless you think it's a good idea to support BOTH.
Comment by Thomas Bächler (brain0) - Thursday, 29 January 2009, 20:10 GMT
usbdelay sounds good, but we should figure out a good default and whether we should sleep a bit longer than the kernel waits for USB.
Comment by Aaron Griffin (phrakture) - Thursday, 29 January 2009, 20:12 GMT
I added a +1 to the archiso hook
Comment by Thomas Bächler (brain0) - Thursday, 29 January 2009, 20:23 GMT
So what's our default? use_delay=0 and sleep 1? If we don't set anything, use_delay is 5, so we should at least sleep 6.
Comment by Aaron Griffin (phrakture) - Thursday, 29 January 2009, 20:25 GMT
use_delay is set to usbdelay, which defaults to 0. So the defaults are use_delay=0, sleep 1
Comment by Thomas Bächler (brain0) - Thursday, 29 January 2009, 20:33 GMT
We need to built the i686 images with that as well, because all the testers above had i686. We need to know if 0 is okay here (I can test on my other machine, that can boot from USB).
Comment by Marcel Korpel (Marcel-) - Thursday, 29 January 2009, 20:35 GMT
rootdelay=5 was just enough for me.
Comment by Aaron Griffin (phrakture) - Thursday, 29 January 2009, 20:44 GMT
@Thomas: Agreed. I will be upload beta3 ISOs in about 4 or 5 hours.
Comment by Thomas Bächler (brain0) - Friday, 30 January 2009, 18:15 GMT
I successfully with the beta3 ISOs (with the fix to the archiso-early hook from the other bug) on x86_64, without any extra parameters (careful, the beta3 i686 ISOs don't have that fix yet).
Comment by Marcel Korpel (Marcel-) - Saturday, 31 January 2009, 14:02 GMT
With the beta3 ISO for i686, rootdelay didn't function anymore, but usbdelay=5 did also work for me.
Comment by Thomas Bächler (brain0) - Saturday, 31 January 2009, 14:10 GMT
On the ISOs with usbdelay, we need to figure out a good default value. For me they work with usbdelay=0 (meaning no parameter), please decrease usbdelay and tell us which is your minimum value? 5 is too much IMO (it is Linux's default though).
Comment by Stephen Tanner (scubanator87) - Saturday, 31 January 2009, 14:32 GMT
I tested the new img on my eee 901. The lowest value i was able to set it to to boot was usbdelay=4 which causees it to sleep for a total of 5 seconds. I tested this by trying to boot with usbdelay=3 several times but not once would it boot. Which usbdelay=4 however it has workd each time i tried it. As always YMMV!
Comment by Marcel Korpel (Marcel-) - Saturday, 31 January 2009, 15:43 GMT
On my new EEE Box B202 I had to use usbdelay=2. On my older P4 (an HP DC7100) I even had to use usbdelay=3.
Comment by Dieter Plaetinck (Dieter_be) - Saturday, 31 January 2009, 19:06 GMT
okay, it could be decreased, but by default, the beta3 works right?
Comment by Thomas Bächler (brain0) - Sunday, 01 February 2009, 02:23 GMT
No, default is 0 right now, we should increase to 4 or 5.
Comment by Aaron Griffin (phrakture) - Monday, 09 February 2009, 19:40 GMT
Default should be 5 in the RC1 images
Comment by Dieter Plaetinck (Dieter_be) - Saturday, 14 February 2009, 13:06 GMT
Can any usb user confirm that rc2 works?
See http://dev.archlinux.org/~aaron/archiso/
I personally don't use the usb stuff, but I did see with rc2-i686-core the kernel has param usbdelay=5 and the archiso hooks waits 6 (shouldn't that be 5?) seconds for usb devices to settle.
Comment by Mathias Burén (fackamato) - Saturday, 14 February 2009, 14:51 GMT
USB install iso RC2 ftp x86_64 works for me, just reinstalled my arch system with it using ext4, all fine! This on a Dell Inspiron 1520.
Comment by Dieter Plaetinck (Dieter_be) - Saturday, 14 February 2009, 15:08 GMT
Good to hear!

Loading...