Public bug reported:

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.

** Affects: casper (Ubuntu)
     Importance: Untriaged
         Status: Unconfirmed

-- 
Ubuntu installation from USB-Stick: no medium found
https://launchpad.net/bugs/58730

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to