← Previous | ↑ Home | ↑ Live System | Next → |
A caching proxy might help if
Install squid
In the virtual machine used to build the live systems, run as root:
apt install squid
Modify squid configuration
Edit the /etc/squid/squid.conf file:
cache_dir aufs /var/spool/squid 2048 32 256
refresh_pattern deb$ 129600 100% 129600 refresh_pattern udeb$ 129600 100% 129600 refresh_pattern tar.gz$ 129600 100% 129600 refresh_pattern tar.xz$ 129600 100% 129600 refresh_pattern tar.bz2$ 129600 100% 129600 refresh_pattern .* 0 0% 0
maximum_object_size 512 MB
Example /etc/squid/squid.conf file:
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
include /etc/squid/conf.d/*.conf
http_access allow localhost
http_access deny all
http_port 3128
maximum_object_size 512 MB
cache_dir aufs /var/spool/squid 2048 64 256
cache_mem 256 MB
maximum_object_size_in_memory 10240 KB
coredump_dir /var/spool/squid
refresh_pattern deb$ 129600 100% 129600
refresh_pattern udeb$ 129600 100% 129600
refresh_pattern tar.gz$ 129600 100% 129600
refresh_pattern tar.xz$ 129600 100% 129600
refresh_pattern tar.bz2$ 129600 100% 129600
refresh_pattern .* 0 0% 0 refresh-ims
Create PROXY entry in dklivesys.conf
In the dklivesys.conf file create a line:
PROXY=http://127.0.0.1:3128
The specified proxy URL is passed to “lb config” as --apt-http-proxy option value. Additionally the environment variables “http_proxy” and “ALL_PROXY” are set for all sub processes of dklivesys-build-livesys.
Run all VM updates through the proxy
In the virtual machine create a file /etc/apt/apt.conf.d/proxy.conf containing
Acquire::http::Proxy "http://127.0.0.1:3128/";
Acquire::https::Proxy "http://127.0.0.1:3128/";
Acquire::ftp::Proxy "http://127.0.0.1:3128/";
In the custom/dklivesys.conf file create a LIVETYPE entry, i.e.
LIVETYPE=hybrid
The “hybrid” type results in a *.iso file you can use on USB stick or DVD, the “nfs” type results in data for network boot.
Note: Extra preparation steps are required to build network boot systems.
In the custom/dklivesys.conf file create a DESKTOP entry, i.e.
DESKTOP=gnome
The following desktops are supported:
The following desktops are not really supported, their use is “experimental”:
In the custom/dklivesys.conf file create a ALLOWLIBREOFF entry, i.e.
ALLOWLIBREOFF=no
to avoid LibreOffice installation, use “yes” to install LibreOffice.
Write the package names into the custom/pkg.txt file, one package name per line.
Optionally you can add a comment after the package name use the raute character # to start the comment. The comment ends at the end of line.
Create the custom/pkgs directory, place the *.deb files in this directory.
Place the files you want to have in the live system in the custom/root directory.
For software packages using a configure script and supporting the DESTDIR variable you can use:
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make
make DESTDIR=/.../custom/root install
Security note: Create images containing WiFi access data only for yourself or for use by specific persons or on specific computers.
Publishing an image with included WiFi access data discloses your WiFi access data!
Many (most ?) WiFi devices do not work without non-free firmware files. Probably you want to set
ALLOWNONFREE=yes
in custom/dklivesys.conf.
Set the BOOKMARKURLS option in the custom/dklivesys.conf file, i.e.:
BOOKMARKURLS=One Bank|https://www.one-bank.com/|Other Bank|https://www.other.com/
Bookmark items are separated by “|”.
Each bookmark item contains Bank name and URL separated by “|”.
To use the kernel from Debian Unstable (Sid) instead of the kernel from Debian Stable, just add the line
SIDKERNEL=yes
to your custom/dklivesys.conf file before building the live system.
To use a non-standard kernel, i.e. the latest kernel from Debian testing, download the kernel as *.deb package.
In your “custom” directory create a “pkgs” subdirectory, place the *.deb file in the “custom/pkgs” directory.
In your “custom” directory create a “hooks” subdirectory, place the following files in that directory:
#! /bin/sh
if [ "X${VERBOSE}" = "Xyes" ]
then
echo 'P:' `date '+%Y-%m-%d %H:%M:%S'` 'Hook chroot 0605-list-k-pkgs (start)'
fi
dpkg-query --show --showformat='${Package}\n' 'linux-image-*' \
> /tmp/kernel-packages-to-delete.txt
if [ "X${VERBOSE}" = "Xyes" ]
then
echo 'I: Kernel packages to remove'
cat /tmp/kernel-packages-to-delete.txt
echo 'P:' `date '+%Y-%m-%d %H:%M:%S'` 'Hook chroot 0605-list-k-pkgs (finished)'
fi
exit 0
#! /bin/sh
if [ "X${VERBOSE}" = "Xyes" ]
then
echo 'P:' `date '+%Y-%m-%d %H:%M:%S'` 'Hook chroot 0615-remove-k-pkgs (start)'
echo 'I: Packages to remove'
cat /tmp/kernel-packages-to-delete.txt
fi
dpkg --force-all -P `cat /tmp/kernel-packages-to-delete.txt`
rm /tmp/kernel-packages-to-delete.txt
if [ "X${VERBOSE}" = "Xyes" ]
then
echo 'P:' `date '+%Y-%m-%d %H:%M:%S'` 'Hook chroot 0615-remove-k-pkgs (finished)'
fi
exit 0
Both hooks are available in the share/dklivesys/contrib/hooks/own-kernel directory.
The *.deb package containing the kernel is installed by the 0610-custom-pkgs.hook.chroot hook. So we build the list of kernel packages to remove in a hook executed before the installation. Package removal is executed after installing our kernel package, so we ensure to have at least one kernel remaining.
← Previous | ↑ Home | ↑ Live System | Next → |