Comment 18 for bug 234185

Revision history for this message
Colin Watson (cjwatson) wrote :

I really prefer Tormod's option 2: make this controlled by a boot option, please. usb-creator can then set that.

Hans, you may laugh at the notion that more than one thing that looks like an installable CD image may be available, but I'm not just making this up to be awkward; *this really does happen in practice*. It so happens that the easiest way to create a recovery partition (of the sort that OEM vendors like to make available) is to simply copy the CD image to a partition on the hard disk. If the installer trawls through disks looking for CD-like things, then this can easily misfire. In fact, Dell contributed a casper patch to help them avoid exactly this problem (bug 209847).

Tormod, your debian-installer-utils branch looks fine and I've merged and uploaded it; thanks! However, I'm not keen on your cdrom-detect branch. Firstly, your revision 427 that checks for .disk/info further up has the effect that if somebody tries to use a misbuilt CD that's missing the .disk directory (a very common mistake), then instead of getting an "Incorrect CD-ROM detected" message, they'll get a message that tells them that the CD couldn't be mounted. I think this would be both inaccurate and confusing. Secondly, your revision 428 has the problem as described above (at least if somebody is using an external disk), and I think it would be better to make this conditional on a debconf template that could be preseeded by usb-creator.

I would suggest adding a cdrom-detect/try-usb template, defaulting to false. If it is found to be true by cdrom-detect.postinst, then it should try 'list-devices usb-partition' and try mounting each of those and checking .disk/info (since in this specific case it's expected that there will be non-CD-like partitions, so it makes more sense to skip over them silently). .disk/info should not be checked for CD devices, so this needs to be a separate for loop. I'm thinking of something like http://paste.ubuntu.com/50052/ - perhaps you could test this and see if it works?