When installing Ubuntu Lucid via Kickstart, you may run into the error:
Debootstrap warning http://server/ubuntu/lucid/dists/lucid/restricted/binary-amd64/Packages was corrupt
The problem is that the Ubunutu installer tried to decompress a file Packages.gz from that directory, and the result was a zero-length file. This result is being interpreted as a corrupt file.
To fix this, all that needs to be done is to unpack the Packages.gz file on the server end. With an unpacked Packages file, the Ubuntu installer retrieves the zero-length file from the server instead of getting it by unpacking Packages.gz – and it does not interpret the zero-length Packages file as corrupt.
If you are using a mounted Lucid Lynx CDROM, then you need to use a bind mount in order to supersede the mounted read-only directory with a fixed directory. Create a new directory and copy the contents of the appropriate directory into it – the directory containing Packages.gz.
Unpack Packages.gz, and mount the resulting “fixed” directory using bind:
UB=/var/www/ubuntu mount --bind $UB/lucid.bugfix $UB/lucid/dists/lucid/restricted/binary-amd64
This will take care of the problem. Hats off to Sascha Kauffman, from whose article I learned this solution.