Ubuntu Kickstart Installs and Corrupt Packages File

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.

5 thoughts on “Ubuntu Kickstart Installs and Corrupt Packages File”

  1. I was hoping this would work for me, but when setting up on Ubuntu12.04 server i386, I then get a ‘Couldn’t retrieve dists/precise/restricted/binary-i386/Packages. This may be due to…..’
    I had run the command gunzip Packages.gz and it then just turned into an empty Packages file. Thoughts?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: