Ubuntu installation from USB-Stick: no medium found

Bug #58730 reported by iRon
This bug report is a duplicate of:  Bug #57620: incompatible regex in is_usb_device. Edit Remove
0
Affects Status Importance Assigned to Milestone
casper (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: casper

I have tried to install edgy knot2 (desktop-amd64 version) from my USB-Stick, but the casper init script cannot find my USB-Stick.

I should notice that my computer has one Serial-ATA hard disk (/dev/sda) and one DVD-Drive (/dev/hda). The USB-Stick is normaly /dev/sdb.

Steps to reproduce:
- Prepare a bootable USB-Stick with syslinux
mount the edgy-desktop-amd64.iso and copy the folders casper, dists, install, pool and preseed to your USB-Stick. Also copy all files from the folder isolinux and the files initrd.gz and vmlinuz from the folder casper to your USB-Stick root
rename the isolinux.cfg to syslinux.cfg
edit the syslinux.cfg and remove the /casper/ before the inird.gz and vmlinuz and for better debugging remove the quiet and splash parameters
now boot from the USB-Stick and it will bring some error messages and then give you a prompt (for detailed error messages see the attached casper.log)

After some debugging I found out that the function find_livefs() in the /scripts/casper file of the initrd.gz package cannot find my USB-Stick. So if I modify the file so that the function only mount the /dev/sdb device then it will boot completely in the desktop environment.

By analyzing this function I found several critical sections, but I cannot repair this problem, because of my bad bash scripting knowledge (even worser than my English :D ). Here is what I have found out so far:

The get_fstype() function return the error message:
/init: /init: 1: cannot open /dev/hda: No medium found
This happens at the “eval $(fstype < /dev/hda)” line, because this device is my DVD-Drive and he can find no medium because there is no CD in it.

The next error message is:
mount: Cannot read /etc/fstab: No such file or directory
This happens because the get_fstype returns nothing and so the fstype variable will be empty and the command “mount -t ${fstype} -o ro "$devname" $mountpoint || continue” will fail.

So even if he ignores the empty /dev/hda the script fails at the is_usb_device() function. The following if statement will never be true:
if /lib/udev/path_id "${sysfs_path}" | grep -q "ID_PATH=(usb|pci-[^-]*-usb)"; then
Because I have no idea of regular expressions, i don't know why it does not work but when I execute the command “/lib/udev/path_id "/block/sdb"” in a shell it will give the following output:
sed: -e Ausdruck #1, Zeichen 102: Invalid range end
sed: -e Ausdruck #1, Zeichen 102: Invalid range end
ID_PATH=usb-0x0457-0x0151:0:0:0

If someone can fix this but cannot reproduce the error, he can send me the fixed casper script and I will test it.

Revision history for this message
iRon (louuu-deactivatedaccount) wrote :

Here is the casper.log file

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Please try the patch in bug #57620 and report any success there.

Revision history for this message
iRon (louuu-deactivatedaccount) wrote :

I noticed that the output of the “/lib/udev/path_id” differs if I will take the one of the initrd.gz archive (before I have taken the one of my dapper installation). The correct output is:
ID_PATH=pci-0000:00:02.1-usb-0:5:1.0-scsi-0:0:0:0

Revision history for this message
iRon (louuu-deactivatedaccount) wrote :

I have tried the patch and it works just fine, so now the live system will completely boot. The bug #58730 is solved for me.

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.