Casper doesn't wait for USB hard disks to come up (persistent)

Bug #158976 reported by Carlo de Wolf
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
casper (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Binary package hint: casper

Ubuntu 7.10 LiveCD copied onto a NFS server.
Booting in vmplayer 2.02 using PXE with persistent option.
Using an Intuix USB mini-HDD with an ext3 filesystem labeled casper-rw.

At 130.0 USB mass storage driver comes up.
At 131.0 unionfs comes up, but HDD is not yet available.
At 131.1 we see the fd0 scan failure from the persistent medium scan (see casper.log)
At 135.4 the HDD is available, but scanning of media has finished.

console:
Begin: Mounting root file system... ...
[ 128.172402] NET: Registered protocol family 17
...
[ 130.078630] Initializing USB Mass Storage driver...
[ 130.078848] scsi2 : SCSI emulation for USB Mass Storage devices
[ 130.079072] usb-storage: device found at 2
[ 130.079084] usb-storage: waiting for device to settle before scanning
[ 130.079127] usbcore: registered new interface driver usb-storage
[ 130.079182] USB Mass Storage support registered.
[ 130.986043] Registering unionfs 1.4
[ 130.986225] unionfs: debugging is not enabled
[ 131.007607] loop: module loaded
[ 131.025010] squashfs: version 3.2-UBUNTU (2007/07/26) Phillip Lougher
[ 131.108132] end_request: I/O error, dev fd0, sector 0
[ 131.132095] end_request: I/O error, dev fd0, sector 0
[ 131.675341] end_request: I/O error, dev fd0, sector 0
[ 131.699308] end_request: I/O error, dev fd0, sector 0
[ 131.966937] end_request: I/O error, dev fd0, sector 0
[ 132.226576] end_request: I/O error, dev fd0, sector 0
[ 132.250543] end_request: I/O error, dev fd0, sector 0
[ 132.673956] end_request: I/O error, dev fd0, sector 0
[ 132.817757] end_request: I/O error, dev fd0, sector 0
[ 132.837729] end_request: I/O error, dev fd0, sector 0
[ 135.075607] usb-storage: device scan complete
[ 135.142898] scsi 2:0:0:0: Direct-Access CORNICE Inc. Storage Ele 0811 PQ: 0 ANSI: 0
[ 135.275028] scsi 2:0:0:0: Attached scsi generic sg1 type 0
[ 135.362370] sd 2:0:0:0: [sda] 7999488 512-byte hardware sectors (4096 MB)
[ 135.406512] sd 2:0:0:0: [sda] Test WP failed, assume Write Enabled
[ 135.406701] sd 2:0:0:0: [sda] Assuming drive cache: write through
[ 135.438181] sd 2:0:0:0: [sda] 7999488 512-byte hardware sectors (4096 MB)
[ 135.474158] sd 2:0:0:0: [sda] Test WP failed, assume Write Enabled
[ 135.474332] sd 2:0:0:0: [sda] Assuming drive cache: write through
[ 135.474569] sda: sda1
[ 138.495097] sd 2:0:0:0: [sda] Attached SCSI disk

/var/log/casper.log:
Begin: Trying netboot from 192.168.1.12:/nfsroot/ubuntu-7.10-livecd ...
Begin: Trying nfsmount -o nolock -o ro 192.168.1.12:/nfsroot/ubuntu-7.10-livecd
 /cdrom ...
Done.
/init: /init: 1: cannot open /dev/fd0: No such device or address
Warning: Unable to find the persistent medium

Tags: persistent
Revision history for this message
Carlo de Wolf (wolfc) wrote :

As a work-around added the following to initrd.gz:
./scripts/casper-premount/01sleep:
# Sleep a while to make sure all usb devices are up and running
sleep 5

description: updated
Revision history for this message
Carlo de Wolf (wolfc) wrote :
Revision history for this message
Tormod Volden (tormodvolden) wrote :

I have the same problem when running the live "CD" off a quickly discovered hard drive, and the persistent casper-rw on a slower USB drive.

In scripts/casper:mountroot() the livefs_root is waited for, but once it's found the casper-rw drives are probed for without waiting, which in my case fails since the USB drive appears some seconds later.

Changed in casper:
status: New → Confirmed
Revision history for this message
Peter Cordes (peter-cordes) wrote :

This is a problem for iso-scan/filename=, too. It gets the list of block devs on the system at the start, and goes through that list, then drops you to a shell. On a fast machine, the boot scripts get to /scripts/casper/20iso-scan before USB devices have shown up. Even the internal hard drive maybe hadn't read its partition table yet. (dual quad-core Harpertown server. :)

 I worked around it by adding break=mount to the kernel command line. Then I wait for my USB stick to be detected before pressing ^D at the (initramfs) shell prompt to continue the boot. break=premount is no good, because USB keyboard drivers haven't been loaded yet, AFAICT!

I tried this with Intrepid alpha 4, AMD64 and i386.

summary: - Casper doesn't wait for USB hard disks to come up
+ Casper doesn't wait for USB hard disks to come up (persistent)
tags: added: persistent
Changed in casper (Ubuntu):
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.