Bug#448316: apt does not work in initramfs
Subject: apt fails when run in initramfs software appliance
Package: apt
Version: 0.6.46.4-0.1
Severity: important
While building a software appliance from Debian recently, I ran into
a problem with apt in which it prints this:
E: You don't have enough free space in /var/cache/apt/archives/.
Note that the appliance is a single cpio file that Linux mounts on boot
as an initramfs.
After reading bug #221666, I worked around the problem by hacking the
init scripts to mount a special tmpfs dir on that specific directly, but
this is a very undesirable solution.
Would you accept a patch to make apt deal with the case gracefully?
If not, would you accept a patch that adds a command line option to
ignore the check?
Right now, I cannot use apt in an initramfs-based software appliance
without hacking in a tmpfs mount, so I'd really like to get this
fixed somehow. Thanks.
I tried to report this as a reply to bug #221666, but the mail kept
getting bounced.
-- Package-specific info:
-- apt-config dump --
APT "";
APT::Architecture "i386";
APT::Build-Essential "";
APT::Build-Essential:: "build-essential";
Dir "/";
Dir::State "var/lib/apt/";
Dir::State::lists "lists/";
Dir::State::cdroms "cdroms.list";
Dir::State::userstatus "status.user";
Dir::State::status "/var/lib/dpkg/status";
Dir::Cache "var/cache/apt/";
Dir::Cache::archives "archives/";
Dir::Cache::srcpkgcache "srcpkgcache.bin";
Dir::Cache::pkgcache "pkgcache.bin";
Dir::Etc "etc/apt/";
Dir::Etc::sourcelist "sources.list";
Dir::Etc::sourceparts "sources.list.d";
Dir::Etc::vendorlist "vendors.list";
Dir::Etc::vendorparts "vendors.list.d";
Dir::Etc::main "apt.conf";
Dir::Etc::parts "apt.conf.d";
Dir::Etc::preferences "preferences";
Dir::Bin "";
Dir::Bin::methods "/usr/lib/apt/methods";
Dir::Bin::dpkg "/usr/bin/dpkg";
DPkg "";
DPkg::Pre-Install-Pkgs "";
DPkg::Pre-Install-Pkgs:: "/usr/sbin/dpkg-preconfigure --apt || true";
-- (no /etc/apt/preferences present) --
-- /etc/apt/sources.list --
deb http://ftp.debian.org/debian etch main
-- System Information:
Debian Release: 4.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.22-14-generic
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages apt depends on:
ii debian-archive-keyring 2007.07.31~etch1 GnuPG archive keys of the Debian a
ii libc6 2.3.6.ds1-13etch2 GNU C Library: Shared libraries
ii libgcc1 1:4.1.1-21 GCC support library
ii libstdc++6 4.1.1-21 The GNU Standard C++ Library v3
apt recommends no packages.
-- no debconf information
Reply to: