I have been trying to get a local repository located on a usb drive working on an air-gapped machine. The repository was created with apt-mirror on the same kind of system (ubuntu i386).

Currently I am blocked by being unable to scan the packages on the usb drive. This is what happens:

cd /media/truecrypt1/apt-mirror/mirror/archive.ubuntu.com
sudo dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
bash: Packages.gz Input/output error
dpkg-deb: error: error reading archive magic version number from file ./ubuntu/pool/main/libm/libmaa/libmaa-dev_1.3.1-1_amd64.deb: Input/Output error
dpkg-scanpackages: error: couldn't parse control information from ./ubuntu/pool/main/libm/libmaa/libmaa-dev_1.3.1-1_amd64.deb

What could be my problem here? How do I diagnose an input/output error on a TrueCrypt container?

  • Does your script have write access to the USB hard drive? – Faheem Mitha Mar 27 '16 at 23:20
  • It's not a script, there are only two commands in the quote, cd and sudo dpkg-scanpackages. – Tyler Durden Mar 27 '16 at 23:53
  • if your mirror was created with apt-mirror, why do you even need to run dpkg-scanpackages? apt-mirror will have mirrored the Packages file along with the .deb files. As i mentioned for your previous question, you just need to specify the correct path in the deb line in your sources.list. If the one i suggested doesn't work, then examine your mirror directory tree and try another....eventually trial and error will get you the correct path. – cas Mar 28 '16 at 2:09
  • @cas There are four directories with Packages.gz files corresponding to main/restricted/universe/multiverse. One thing that concerns me is that all of them have a parent "binary-amd64". Does that mean they are all amd64 binaries? I don't understand this because the machine I built the repository on is i386. Why would it be creating an amd64 repository? – Tyler Durden Mar 28 '16 at 2:21
  • perhaps because you either told apt-mirror to mirror only the amd64 arch, or apt-mirror defaults to doing that (there's a defaultarch config option in mirror.list which defaults to the host's arch)? what does grep amd64 /etc/apt/mirror.list show? – cas Mar 28 '16 at 2:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.