[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Fwd: Clearing apt cache just before building root fs image.]



Hi again,

is there any reason for installing this packages after hooks are run?
Thanks again,

Victor.

libcap2 libgnutls26 libgssapi-krb5-2 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 libsasl2-2 libsasl2-modules libtalloc2 libwbclient0 samba-common samba-common-bin smbfs ucf


-------- Original Message --------
Subject: Clearing apt cache just before building root fs image.
Date: Fri, 05 Feb 2010 12:10:31 +0100
From: Victor Pablos Ceruelo <victorpablosceruelo@gmail.com>
Reply-To: victorpablosceruelo@gmail.com
To: debian-live@lists.debian.org


Hi,

I'm trying to build a really small image < 190MB with Xorg.
Distro is sid (X from squeeze does not work well with our machines) and 
arch i386.

I'm trying to remove apt cache just before building root filesystem,
but I don't know how to do it.

I've tried removing them with hook scripts (config/chroot_local-hooks/ dir)
but after running these scripts it downloads some files
(so it fails or it downloads again).

I've tried using a tmpfs, but it fails too.

# ...
# rm -fr /tmp/tmp-fs
# mkdir /tmp/tmp-fs
# mount -t tmpfs tmpfs /tmp/tmp-fs

# mv /var/cache/apt /tmp/tmp-fs/var-cache-apt
# ln -s /tmp/tmp-fs/var-cache-apt/ /var/cache/apt

# mv /var/lib/apt /tmp/tmp-fs/var-lib-apt
# ln -s /tmp/tmp-fs/var-lib-apt/ /var/lib/apt
# ...

This is the result obtained:

...
Reading package lists... Done
P: Begin building root filesystem image...
stat: no se puede efectuar `stat' sobre «chroot/var/cache/apt/archives»: 
No existe el fichero o el directorio
cp: target «chroot/var/cache/apt/archives» is not a directory
P: Begin unmounting filesystems...


Is there any way of doing this without using live helper "stripped"
(any directory where I can put scripts to be run just before building 
root fs)

Thanks,

Victor.


Reply to: