You are not logged in.

#1 2023-07-22 04:59:12

cog
Member
From: The Southwest
Registered: 2015-10-27
Posts: 655
Website

Shrinking the live-build iso

NOTE (by johnraff) This thread was split off from alpha1 feedback. The title is fairly general to allow for other discussion about reducing the iso size to come in.
---
(by cog)

Another thing screwed up with the live build version in bookworm is if you tell it to not use the gui installer but only the cli one it will still install a bunch of the gui stuff and bloat the iso.  This wasn’t true in bullseye.  Then it just disables gui installer in the boot loader.

I don’t allow the gui installer because I have calamares as a secondary option.  But still it was a bug that emerged in bookworm.

Last edited by johnraff (2023-07-25 06:37:45)

Offline

#2 2023-07-22 05:19:11

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,557
Website

Re: Shrinking the live-build iso

cog wrote:

Another thing screwed up with the live build version in bookworm is if you tell it to not use the gui installer but only the cli one it will still install a bunch of the gui stuff and bloat the iso.

That's not good news. I was using the text-only installer when trying to squeeze i386 down to fit on a CD. Definite saving in size, especially because it's at the top, not squeezed in the squashfs. I was thinking of trying a minimal CD sized build one more time but it gets harder with every Debian release. It would need every hook, hack and patch in the book to get there...


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#3 2023-07-22 05:22:16

cog
Member
From: The Southwest
Registered: 2015-10-27
Posts: 655
Website

Re: Shrinking the live-build iso

@johnraff let me know if you figure out what the gui bs is.  I’ll dig around too.

Offline

#4 2023-07-22 06:51:37

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,557
Website

Re: Shrinking the live-build iso

If you've still got the live-build root directory around after a build, then the installer GTK stuff gets put in binary/install/gtk and it's about 60MiB, though then it gets compressed into the installer's initrd.gz on the iso.

You set --debian-installer-gui false of course? That worked for me up to now too.
/lib/live/build/installer_debian-installer still seems to be looking at that config and not downloading the GTK stuff if it's not needed, round line 338. Maybe if you had a look at the build.log it would suggest something...


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#5 2023-07-25 06:59:55

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,557
Website

Re: Shrinking the live-build iso

I just did a quick build of a simple cli-only system - mostly standard system utilities - with auto/config like this:

#!/bin/sh

# SET --mirror-bootstrap TO YOUR FASTEST LOCAL MIRROR
# It will reduce build time, but will not be used in the produced iso.

# Set --image-name to the build version, *without* the architecture,
# which will be appended automatically.

lb config noauto \
--image-name 'lb-nolivepkgs-noarmfirmware-noguiinstaller' \
--mirror-bootstrap https://ftp.riken.jp/Linux/debian/debian/ \
--archive-areas "main contrib non-free-firmware" \
--architecture amd64 \
--linux-flavours amd64 \
--distribution bookworm \
--checksums md5 \
--debian-installer live \
--debian-installer-gui false \
--debian-installer-distribution bookworm \
--memtest memtest86+ \
--firmware-binary true \
--firmware-chroot true \
"${@}"

And this preseed.cfg:

d-i passwd/root-login boolean false
d-i passwd/user-default-groups string audio video cdrom floppy plugdev dip lp sudo lpadmin scanner bluetooth netdev systemd-journal
d-i mirror/country string manual
d-i mirror/protocol string https
d-i mirror/https/hostname string deb.debian.org
d-i mirror/https/directory string /debian
d-i mirror/https/proxy string
d-i apt-setup/use_mirror boolean true
d-i apt-setup/non-free boolean true
d-i apt-setup/non-free-firmware boolean true
d-i apt-setup/contrib boolean true
d-i apt-setup/services-select multiselect updates
d-i apt-setup/local0/repository \
    string https://deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
d-i apt-setup/local0/comment string Debian security updates
d-i apt-setup/enable-source-repositories boolean false
d-i apt-setup/disable-cdrom-entries boolean true
d-i clock-setup/utc boolean true
d-i partman-auto/cap-ram string false

I haven't yet installed the iso but --debian-installer-gui false seems to have worked, and there aren't any gui installer files in binary/install, just the usual initrd.gz at 22MiB. There's no trace of downloading any gtk installer files in build.log.

Last edited by johnraff (2023-07-25 07:23:29)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#6 2023-07-25 21:25:59

sleekmason
zoom
Registered: 2018-05-22
Posts: 1,103
Website

Re: Shrinking the live-build iso

Adding:

--debian-installer-gui false \

to /auto/config worked for me.


Another possible savings:

--apt-indices 'false' \

This will require users to 'apt update' before trying to install any programs.

Offline

#7 2023-07-26 00:25:47

cog
Member
From: The Southwest
Registered: 2015-10-27
Posts: 655
Website

Re: Shrinking the live-build iso

That's wierd.  I have it set to false and it still pulled in gtk/fonts/etc .udebs

Here's my top level config:

#!/bin/sh

set -e

lb config noauto \
	--apt-recommends false \
	--archive-areas "main contrib non-free non-free-firmware" \
	--apt-indices false \
	--debian-installer live \
	--debian-installer-gui false \
	--debian-installer-distribution bookworm \
	--distribution bookworm \
	--debootstrap-options "--include=apt-transport-https,ca-certificates,openssl" \
	--image-name pecos-072323 \
	--iso-volume pecos-072323 \
	--memtest none \
	--win32-loader false \
	--zsync false \
	"${@}"

Here's all the .udebs in the ISO

├── a
│   ├── acl
│   │   ├── acl-udeb_2.3.1-3_amd64.udeb
│   │   └── libacl1-udeb_2.3.1-3_amd64.udeb
│   ├── alsa-lib
│   │   └── libasound2-udeb_1.2.8-1+b1_amd64.udeb
│   ├── alsa-utils
│   │   └── alsa-utils-udeb_1.2.8-1_amd64.udeb
│   ├── apt-setup
│   │   ├── apt-cdrom-setup_0.182_all.udeb
│   │   ├── apt-mirror-setup_0.182_all.udeb
│   │   └── apt-setup-udeb_0.182_amd64.udeb
│   ├── argon2
│   │   └── libargon2-1-udeb_0~20171227-0.3+deb12u1_amd64.udeb
│   ├── at-spi2-core
│   │   ├── at-spi2-core-udeb_2.46.0-5_amd64.udeb
│   │   ├── libatk-adaptor-udeb_2.46.0-5_amd64.udeb
│   │   ├── libatk-bridge-2.0-0-udeb_2.46.0-5_amd64.udeb
│   │   └── libatspi0-udeb_2.46.0-5_amd64.udeb
│   └── attr
│       ├── attr-udeb_2.5.1-4_amd64.udeb
│       └── libattr1-udeb_2.5.1-4_amd64.udeb
├── b
│   ├── base-installer
│   │   ├── base-installer_1.213_all.udeb
│   │   └── bootstrap-base_1.213_amd64.udeb
│   ├── beep
│   │   └── beep-udeb_1.4.9-1+b1_amd64.udeb
│   ├── bterm-unifont
│   │   └── bterm-unifont_1.7+b1_amd64.udeb
│   └── btrfs-progs
│       └── btrfs-progs-udeb_6.2-1_amd64.udeb
├── c
│   ├── ca-certificates
│   │   └── ca-certificates-udeb_20230311_all.udeb
│   ├── cdebconf-entropy
│   │   ├── cdebconf-gtk-entropy_0.52_amd64.udeb
│   │   ├── cdebconf-newt-entropy_0.52_amd64.udeb
│   │   └── cdebconf-text-entropy_0.52_amd64.udeb
│   ├── cdebconf-terminal
│   │   └── cdebconf-newt-terminal_0.43_amd64.udeb
│   ├── choose-mirror
│   │   ├── choose-mirror_2.123_all.udeb
│   │   └── choose-mirror-bin_2.123_amd64.udeb
│   ├── clock-setup
│   │   └── clock-setup_0.161_amd64.udeb
│   ├── console-data
│   │   └── console-keymaps-mac_1.12-9_all.udeb
│   ├── console-setup
│   │   ├── console-setup-amiga-ekmap_1.221_all.udeb
│   │   ├── console-setup-ataritt-ekmap_1.221_all.udeb
│   │   ├── console-setup-freebsd-charmaps-udeb_1.221_all.udeb
│   │   ├── console-setup-freebsd-fonts-udeb_1.221_all.udeb
│   │   ├── console-setup-linux-charmaps-udeb_1.221_all.udeb
│   │   ├── console-setup-linux-fonts-udeb_1.221_all.udeb
│   │   ├── console-setup-pc-ekbd_1.221_all.udeb
│   │   ├── console-setup-pc-ekmap_1.221_all.udeb
│   │   ├── console-setup-sun4-ekmap_1.221_all.udeb
│   │   ├── console-setup-sun5-ekmap_1.221_all.udeb
│   │   └── console-setup-udeb_1.221_all.udeb
│   ├── cracklib2
│   │   └── libcrack2-udeb_2.9.6-5+b1_amd64.udeb
│   └── cryptsetup
│       ├── cryptsetup-udeb_2.6.1-4~deb12u1_amd64.udeb
│       └── libcryptsetup12-udeb_2.6.1-4~deb12u1_amd64.udeb
├── d
│   ├── dbus
│   │   ├── dbus-udeb_1.14.8-2~deb12u1_amd64.udeb
│   │   └── libdbus-1-3-udeb_1.14.8-2~deb12u1_amd64.udeb
│   ├── debian-archive-keyring
│   │   └── debian-archive-keyring-udeb_2023.3_all.udeb
│   ├── debian-installer-utils
│   │   ├── di-utils-exit-installer_1.146_all.udeb
│   │   └── di-utils-mapdevfs_1.146_amd64.udeb
│   ├── debian-ports-archive-keyring
│   │   └── debian-ports-archive-keyring-udeb_2023.02.01_all.udeb
│   ├── debootstrap
│   │   └── debootstrap-udeb_1.0.128+nmu2_all.udeb
│   ├── depthcharge-tools-installer
│   │   └── depthcharge-tools-installer_2_all.udeb
│   ├── devio
│   │   └── devio-udeb_1.2-1.3_amd64.udeb
│   ├── dmidecode
│   │   └── dmidecode-udeb_3.4-1_amd64.udeb
│   └── dosfstools
│       └── dosfstools-udeb_4.2-1_amd64.udeb
├── e
│   ├── e2fsprogs
│   │   └── e2fsprogs-udeb_1.47.0-2_amd64.udeb
│   ├── efi-reader
│   │   └── efi-reader_0.16_amd64.udeb
│   ├── espeak
│   │   └── espeak-data-udeb_1.48.15+dfsg-3_amd64.udeb
│   ├── espeak-ng
│   │   └── espeak-ng-data-udeb_1.51+dfsg-10_amd64.udeb
│   └── espeakup
│       └── espeakup-udeb_0.90-13_amd64.udeb
├── f
│   ├── f2fs-tools
│   │   └── f2fs-tools-udeb_1.15.0-1_amd64.udeb
│   ├── finish-install
│   │   └── finish-install_2.117_all.udeb
│   ├── fonts-android
│   │   └── fonts-android-udeb_6.0.1r16-1.1_all.udeb
│   ├── fonts-dejavu
│   │   ├── fonts-dejavu-mono-udeb_2.37-6_all.udeb
│   │   └── fonts-dejavu-udeb_2.37-6_all.udeb
│   ├── fonts-farsiweb
│   │   └── fonts-farsiweb-udeb_0.4.dfsg-13_all.udeb
│   ├── fonts-freefont
│   │   └── fonts-freefont-udeb_20120503-10_all.udeb
│   ├── fonts-gubbi
│   │   └── fonts-knda-udeb_1.3-7_all.udeb
│   ├── fonts-khmeros
│   │   └── fonts-khmeros-udeb_5.0-9_all.udeb
│   ├── fonts-lao
│   │   └── fonts-lao-udeb_0.0.20060226-10_all.udeb
│   ├── fonts-lohit-guru
│   │   └── fonts-lohit-guru-udeb_2.91.2-3_all.udeb
│   ├── fonts-lohit-telu
│   │   └── fonts-telu-udeb_2.5.5-2_all.udeb
│   ├── fonts-noto
│   │   ├── fonts-noto-hinted-udeb_20201225-1_all.udeb
│   │   └── fonts-noto-unhinted-udeb_20201225-1_all.udeb
│   ├── fonts-samyak
│   │   └── fonts-taml-udeb_1.2.2-6_all.udeb
│   ├── fonts-sil-abyssinica
│   │   └── fonts-sil-abyssinica-udeb_2.100-3_all.udeb
│   ├── fonts-sil-padauk
│   │   └── fonts-sil-padauk-udeb_5.000-3_all.udeb
│   ├── fonts-sil-scheherazade
│   │   └── fonts-sil-scheherazade-udeb_2.100-2.1_all.udeb
│   ├── fonts-smc-rachana
│   │   └── fonts-mlym-udeb_7.0.2-1_all.udeb
│   ├── fonts-tibetan-machine
│   │   └── fonts-tibetan-machine-udeb_1.901b-6_all.udeb
│   ├── fonts-tlwg
│   │   └── fonts-thai-tlwg-udeb_0.7.3-1_all.udeb
│   ├── fonts-ukij-uyghur
│   │   └── fonts-ukij-uyghur-udeb_20110217-4_all.udeb
│   ├── fuse
│   │   ├── fuse-udeb_2.9.9-6+b1_amd64.udeb
│   │   └── libfuse2-udeb_2.9.9-6+b1_amd64.udeb
│   └── fuse3
│       ├── fuse3-udeb_3.14.0-4_amd64.udeb
│       └── libfuse3-3-udeb_3.14.0-4_amd64.udeb
├── g
│   ├── gdk-pixbuf
│   │   ├── libgdk-pixbuf-2.0-0-udeb_2.42.10+dfsg-1+b1_amd64.udeb
│   │   └── libgdk-pixbuf2.0-0-udeb_2.42.10+dfsg-1+b1_amd64.udeb
│   ├── glibc
│   │   └── libc6-udeb_2.36-9+deb12u1_amd64.udeb
│   ├── gnupg2
│   │   └── gpgv-udeb_2.2.40-1.1_amd64.udeb
│   ├── grub2
│   │   └── grub-mount-udeb_2.06-13_amd64.udeb
│   ├── grub-installer
│   │   └── grub-installer_1.194_amd64.udeb
│   ├── gtk+2.0
│   │   ├── libgail18-udeb_2.24.33-2_amd64.udeb
│   │   └── libgtk2.0-0-udeb_2.24.33-2_amd64.udeb
│   ├── gtk+3.0
│   │   └── libgtk-3-0-udeb_3.24.37-2_amd64.udeb
│   └── gtk4
│       └── libgtk-4-1-udeb_4.8.3+ds-2_amd64.udeb
├── h
│   ├── harfbuzz
│   │   └── libharfbuzz0-udeb_6.0.0+dfsg-3_amd64.udeb
│   ├── haveged
│   │   └── haveged-udeb_1.9.14-1+b1_amd64.udeb
│   └── hw-detect
│       ├── disk-detect_1.159_amd64.udeb
│       ├── driver-injection-disk-detect_1.159_all.udeb
│       └── ethdetect_1.159_all.udeb
├── i
│   ├── installation-report
│   │   └── save-logs_2.89_all.udeb
│   └── isc-dhcp
│       └── isc-dhcp-client-udeb_4.4.3-P1-2_amd64.udeb
├── j
│   ├── jfsutils
│   │   └── jfsutils-udeb_1.1.15-5_amd64.udeb
│   └── json-c
│       └── libjson-c5-udeb_0.16-2_amd64.udeb
├── k
│   ├── kexec-tools
│   │   └── kexec-tools-udeb_2.0.25-3+b1_amd64.udeb
│   ├── kickseed
│   │   ├── initrd-kickseed_0.63_all.udeb
│   │   └── kickseed-common_0.63_all.udeb
│   └── kmod
│       ├── kmod-udeb_30+20221128-1_amd64.udeb
│       └── libkmod2-udeb_30+20221128-1_amd64.udeb
├── l
│   ├── linux-signed-amd64
│   │   ├── btrfs-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── btrfs-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── crc-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── crc-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── crypto-dm-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── crypto-dm-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── crypto-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── crypto-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── efi-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── efi-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── event-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── event-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── ext4-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── ext4-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── f2fs-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── f2fs-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── firewire-core-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── firewire-core-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── fuse-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── fuse-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── i2c-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── i2c-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── jfs-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── jfs-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── loop-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── loop-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── md-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── md-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── mmc-core-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── mmc-core-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── mtd-core-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── mtd-core-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── multipath-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── multipath-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── nbd-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── nbd-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── nic-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── nic-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── nic-pcmcia-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── nic-pcmcia-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── nic-shared-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── nic-shared-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── nic-usb-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── nic-usb-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── nic-wireless-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── nic-wireless-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── pata-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── pata-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── pcmcia-storage-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── pcmcia-storage-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── ppp-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── ppp-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── rfkill-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── rfkill-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── scsi-nic-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── scsi-nic-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── sound-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── sound-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── squashfs-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── squashfs-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── udf-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── udf-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── uinput-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   ├── uinput-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   │   ├── xfs-modules-6.1.0-10-amd64-di_6.1.38-1_amd64.udeb
│   │   └── xfs-modules-6.1.0-9-amd64-di_6.1.27-1_amd64.udeb
│   ├── live-installer
│   │   └── live-installer_58_amd64.udeb
│   ├── lowmem
│   │   └── lowmem_1.51_all.udeb
│   ├── lvm2
│   │   ├── dmsetup-udeb_1.02.185-2_amd64.udeb
│   │   ├── libdevmapper1.02.1-udeb_1.02.185-2_amd64.udeb
│   │   └── lvm2-udeb_2.03.16-2_amd64.udeb
│   ├── lvmcfg
│   │   └── lvmcfg-utils_1.63_all.udeb
│   └── lzo2
│       └── liblzo2-2-udeb_2.10-2_amd64.udeb
├── liba
│   └── libaio
│       └── libaio1-udeb_0.3.113-4_amd64.udeb
├── libb
│   └── libbsd
│       └── libbsd0-udeb_0.11.7-2_amd64.udeb
├── libc
│   └── libcap2
│       └── libcap2-udeb_2.66-4_amd64.udeb
├── libd
│   └── libdatrie
│       └── libdatrie1-udeb_0.2.13-2+b1_amd64.udeb
├── libe
│   ├── libeatmydata
│   │   └── eatmydata-udeb_130-2_all.udeb
│   ├── libepoxy
│   │   └── libepoxy0-udeb_1.5.10-1_amd64.udeb
│   └── libevdev
│       └── libevdev2-udeb_1.13.0+dfsg-1_amd64.udeb
├── libf
│   ├── libfakekey
│   │   └── libfakekey0-udeb_0.3+git20170516-2_amd64.udeb
│   └── libffi
│       └── libffi8-udeb_3.4.4-1_amd64.udeb
├── libg
│   ├── libgcrypt20
│   │   └── libgcrypt20-udeb_1.10.1-3_amd64.udeb
│   └── libgpg-error
│       └── libgpg-error0-udeb_1.46-1_amd64.udeb
├── libi
│   ├── libinih
│   │   └── libinih1-udeb_55-1_amd64.udeb
│   └── libinput
│       └── libinput10-udeb_1.22.1-1_amd64.udeb
├── libm
│   └── libmd
│       └── libmd0-udeb_1.0.4-2_amd64.udeb
├── libn
│   └── libnl3
│       ├── libnl-3-200-udeb_3.7.0-0.2+b1_amd64.udeb
│       └── libnl-genl-3-200-udeb_3.7.0-0.2+b1_amd64.udeb
├── libp
│   └── libpng1.6
│       └── libpng16-16-udeb_1.6.39-2_amd64.udeb
├── libs
│   └── libselinux
│       └── libselinux1-udeb_3.4-1+b6_amd64.udeb
├── libt
│   ├── libtextwrap
│   │   └── libtextwrap1-udeb_0.1-16_amd64.udeb
│   ├── libthai
│   │   ├── libthai0-udeb_0.1.29-1_amd64.udeb
│   │   └── libthai-data-udeb_0.1.29-1_all.udeb
│   └── libtirpc
│       └── libtirpc3-udeb_1.3.3+ds-1_amd64.udeb
├── libu
│   ├── liburcu
│   │   └── liburcu8-udeb_0.13.2-1_amd64.udeb
│   ├── libusb
│   │   └── libusb-0.1-udeb_0.1.12-32_amd64.udeb
│   └── libusb-1.0
│       └── libusb-1.0-0-udeb_1.0.26-1_amd64.udeb
├── libx
│   ├── libxcrypt
│   │   └── libcrypt1-udeb_4.4.33-2_amd64.udeb
│   ├── libxcvt
│   │   └── libxcvt0-udeb_0.1.2-1_amd64.udeb
│   ├── libxfont
│   │   └── libxfont2-udeb_2.0.6-1_amd64.udeb
│   ├── libxrandr
│   │   └── libxrandr2-udeb_1.5.2-2+b1_amd64.udeb
│   ├── libxshmfence
│   │   └── libxshmfence1-udeb_1.3-1_amd64.udeb
│   └── libxtst
│       └── libxtst6-udeb_1.2.3-1.1_amd64.udeb
├── libz
│   └── libzstd
│       └── libzstd1-udeb_1.5.4+dfsg2-5_amd64.udeb
├── m
│   ├── matchbox-keyboard
│   │   └── matchbox-keyboard-udeb_0.2+git20160713-1_amd64.udeb
│   ├── matchbox-window-manager
│   │   └── matchbox-window-manager-udeb_1.2.2+git20200512-1_amd64.udeb
│   ├── mbr
│   │   └── mbr-udeb_1.2.1+b1_amd64.udeb
│   ├── mdadm
│   │   └── mdadm-udeb_4.2-5_amd64.udeb
│   ├── mdcfg
│   │   └── mdcfg-utils_1.77_all.udeb
│   ├── media-retriever
│   │   ├── load-media_1.57_all.udeb
│   │   └── media-retriever_1.57_all.udeb
│   ├── mountmedia
│   │   └── mountmedia_0.26_all.udeb
│   ├── mtdev
│   │   └── libmtdev1-udeb_1.1.6-1_amd64.udeb
│   └── multipath-tools
│       ├── kpartx-udeb_0.9.4-3+deb12u1_amd64.udeb
│       └── multipath-udeb_0.9.4-3+deb12u1_amd64.udeb
├── n
│   ├── ncurses
│   │   ├── libncursesw6-udeb_6.4-4_amd64.udeb
│   │   └── libtinfo6-udeb_6.4-4_amd64.udeb
│   ├── ndisc6
│   │   ├── ndisc6-udeb_1.0.5-1+b2_amd64.udeb
│   │   └── rdnssd-udeb_1.0.5-1+b2_amd64.udeb
│   ├── netcfg
│   │   └── netcfg_1.187_amd64.udeb
│   ├── net-retriever
│   │   └── net-retriever_1.57_all.udeb
│   ├── network-console
│   │   └── network-console_1.93_amd64.udeb
│   ├── newt
│   │   └── libnewt0.52-udeb_0.52.23-1+b1_amd64.udeb
│   ├── nobootloader
│   │   └── nobootloader_1.67_all.udeb
│   └── ntfs-3g
│       └── ntfs-3g-udeb_2022.10.3-1+b1_amd64.udeb
├── o
│   ├── oldsys-preseed
│   │   └── oldsys-preseed_3.23_amd64.udeb
│   ├── open-iscsi
│   │   └── open-iscsi-udeb_2.1.8-1_amd64.udeb
│   ├── open-isns
│   │   └── libisns-udeb_0.101-0.2+b1_amd64.udeb
│   ├── openssh
│   │   ├── openssh-client-udeb_9.2p1-2_amd64.udeb
│   │   └── openssh-server-udeb_9.2p1-2_amd64.udeb
│   ├── openssl
│   │   ├── libcrypto3-udeb_3.0.9-1_amd64.udeb
│   │   └── libssl3-udeb_3.0.9-1_amd64.udeb
│   └── os-prober
│       └── os-prober-udeb_1.81_amd64.udeb
├── p
│   ├── partconf
│   │   └── partconf-find-partitions_1.52_amd64.udeb
│   ├── parted
│   │   ├── libparted2-udeb_3.5-3_amd64.udeb
│   │   ├── libparted-fs-resize0-udeb_3.5-3_amd64.udeb
│   │   └── parted-udeb_3.5-3_amd64.udeb
│   ├── partman-auto
│   │   └── partman-auto_162_amd64.udeb
│   ├── partman-auto-crypto
│   │   └── partman-auto-crypto_34_all.udeb
│   ├── partman-auto-lvm
│   │   └── partman-auto-lvm_91_all.udeb
│   ├── partman-auto-raid
│   │   └── partman-auto-raid_51_all.udeb
│   ├── partman-base
│   │   ├── partman-base_226_amd64.udeb
│   │   └── partman-utils_226_amd64.udeb
│   ├── partman-basicfilesystems
│   │   └── partman-basicfilesystems_164_amd64.udeb
│   ├── partman-basicmethods
│   │   └── partman-basicmethods_74_all.udeb
│   ├── partman-btrfs
│   │   └── partman-btrfs_59_all.udeb
│   ├── partman-cros
│   │   └── partman-cros_3_all.udeb
│   ├── partman-crypto
│   │   ├── partman-crypto_121_amd64.udeb
│   │   └── partman-crypto-dm_121_all.udeb
│   ├── partman-efi
│   │   └── partman-efi_101_amd64.udeb
│   ├── partman-ext3
│   │   └── partman-ext3_112_all.udeb
│   ├── partman-iscsi
│   │   └── partman-iscsi_76_all.udeb
│   ├── partman-jfs
│   │   └── partman-jfs_62_all.udeb
│   ├── partman-lvm
│   │   └── partman-lvm_146_all.udeb
│   ├── partman-md
│   │   └── partman-md_106_all.udeb
│   ├── partman-multipath
│   │   └── partman-multipath_7_all.udeb
│   ├── partman-nbd
│   │   └── partman-nbd_0.72_all.udeb
│   ├── partman-partitioning
│   │   └── partman-partitioning_147_amd64.udeb
│   ├── partman-target
│   │   └── partman-target_127_all.udeb
│   ├── partman-xfs
│   │   └── partman-xfs_68_all.udeb
│   ├── pciutils
│   │   ├── libpci3-udeb_3.9.0-4_amd64.udeb
│   │   └── pciutils-udeb_3.9.0-4_amd64.udeb
│   ├── pcmciautils
│   │   └── pcmciautils-udeb_018-14_amd64.udeb
│   ├── pcre2
│   │   └── libpcre2-8-0-udeb_10.42-1_amd64.udeb
│   ├── pkgsel
│   │   └── pkgsel_0.79_all.udeb
│   ├── popt
│   │   └── libpopt0-udeb_1.19+dfsg-1_amd64.udeb
│   ├── ppp
│   │   └── ppp-udeb_2.4.9-1+1.1+b1_amd64.udeb
│   └── preseed
│       └── network-preseed_1.117_all.udeb
├── r
│   ├── rdate
│   │   └── rdate-udeb_1.11-3_amd64.udeb
│   ├── readline
│   │   ├── libreadline8-udeb_8.2-1.3_amd64.udeb
│   │   └── readline-common-udeb_8.2-1.3_all.udeb
│   ├── reiserfsprogs
│   │   └── mkreiserfs-udeb_3.6.27-4_amd64.udeb
│   └── rescue
│       └── rescue-mode_1.93_all.udeb
├── s
│   ├── screen
│   │   └── screen-udeb_4.9.0-4_amd64.udeb
│   ├── strace
│   │   └── strace-udeb_6.1-0.1_amd64.udeb
│   ├── sysfsutils
│   │   └── libsysfs2-udeb_2.1.1-4_amd64.udeb
│   └── systemd
│       └── libudev1-udeb_252.12-1~deb12u1_amd64.udeb
├── t
│   └── tzsetup
│       └── tzsetup-udeb_0.122_all.udeb
├── u
│   ├── user-setup
│   │   └── user-setup-udeb_1.95_all.udeb
│   └── util-linux
│       ├── eject-udeb_2.38.1-5+b1_amd64.udeb
│       ├── fdisk-udeb_2.38.1-5+b1_amd64.udeb
│       ├── libblkid1-udeb_2.38.1-5+b1_amd64.udeb
│       ├── libfdisk1-udeb_2.38.1-5+b1_amd64.udeb
│       ├── libmount1-udeb_2.38.1-5+b1_amd64.udeb
│       ├── libsmartcols1-udeb_2.38.1-5+b1_amd64.udeb
│       ├── libuuid1-udeb_2.38.1-5+b1_amd64.udeb
│       └── util-linux-udeb_2.38.1-5+b1_amd64.udeb
├── v
│   └── vte2.91
│       └── libvte-2.91-0-udeb_0.70.6-1~deb12u1_amd64.udeb
├── w
│   ├── wget
│   │   └── wget-udeb_1.21.3-1+b2_amd64.udeb
│   ├── wide-dhcpv6
│   │   └── wide-dhcpv6-client-udeb_20080615-23_amd64.udeb
│   ├── wireless-regdb
│   │   └── wireless-regdb-udeb_2022.06.06-1_all.udeb
│   ├── wireless-tools
│   │   ├── libiw30-udeb_30~pre9-14_amd64.udeb
│   │   └── wireless-tools-udeb_30~pre9-14_amd64.udeb
│   └── wpa
│       └── wpasupplicant-udeb_2.10-12_amd64.udeb
├── x
│   ├── xfsprogs
│   │   └── xfsprogs-udeb_6.1.0-1_amd64.udeb
│   └── xserver-xorg-input-libinput
│       └── xserver-xorg-input-libinput-udeb_1.2.1-1+b1_amd64.udeb
└── z
    └── zlib
        └── zlib1g-udeb_1.2.13.dfsg-1_amd64.udeb

Offline

#8 2023-07-26 00:29:18

cog
Member
From: The Southwest
Registered: 2015-10-27
Posts: 655
Website

Re: Shrinking the live-build iso

@johnraff @sleekmason this is in the "pool-udeb" folder on the iso

Offline

#9 2023-07-26 01:27:50

sleekmason
zoom
Registered: 2018-05-22
Posts: 1,103
Website

Re: Shrinking the live-build iso

Here's mine at the moment.

#!/bin/sh

lb config noauto \
     --apt-recommends 'false' \
     --apt-source-archives 'false' \
     --apt-indices 'false' \
     --archive-areas "main contrib non-free non-free-firmware" \
     --debian-installer 'live' \
     --debian-installer-gui false \
     --debian-installer-distribution 'bookworm' \
     --distribution 'bookworm' \
     --mirror-binary 'https://deb.debian.org/debian' \
     --mirror-binary-security 'https://security.debian.org/debian-security' \
     --mirror-bootstrap 'https://deb.debian.org/debian' \
     --firmware-binary 'true' \
     --firmware-chroot 'true' \
     --security 'true' \
     --memtest 'memtest86+' \
     --image-name 'Beardog-Bookworm-23.07.22' \
     --iso-application 'Beardog-Bookworm' \
     --iso-publisher 'Beardog-bookworm GNU/Linux' \
     --iso-volume 'Beardog-Bookworm' \
     --system 'live' \
     --updates 'true' \
     --win32-loader 'false' \
     --zsync 'false' \
     --quiet \
     "${@}"

I'm building now to take a look to see if the udebs are there. Shouldn't take but 10 minutes or so.

Last edited by sleekmason (2023-07-26 01:28:51)

Offline

#10 2023-07-26 02:14:51

sleekmason
zoom
Registered: 2018-05-22
Posts: 1,103
Website

Re: Shrinking the live-build iso

Upon build completion, nothing in binary/install/gtk, so there is that.

It does look like all the udebs appear to be present.

Offline

#11 2023-07-26 05:39:30

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,557
Website

Re: Shrinking the live-build iso

Confirmed, using --debian-installer-gui false in Bookworm, while the gtk initrd and vmlinuz are left out, there are gtk 2 3 &4 udebs along with a lot of exotic fonts.
The last BL iso I built with --debian-installer-gui false was lithium-cd (Buster). At that time debs and udebs were mixed together in pool/ but I can see some libgtk udebs in there.

@cog where was the point when you found a change in live-build's behaviour, putting more udebs on the iso?


---
Meanwhile here are a few tweaks I used back in the day when I was trying to squeeze a BL i386 iso down to 700MB to fit on a CD. Not all of this is still valid though:

auto/build: Boost the squashfs compression, and add functions to apply patches to live-build at build time (the patches are in config/patches, applied by config/lb_patches.sh:

#!/bin/sh

set -e

# maximum possible squashfs compression, at the expense of build time
# https://lists.debian.org/debian-live/2017/02/msg00028.html
# https://techoverflow.net/2013/01/11/creating-a-highly-compressed-squashfs-from-a-folder/
# '-Xdict-size 100%' is probably redundant, because 100% seems to be the default.
export MKSQUASHFS_OPTIONS='-b 1048576 -Xbcj x86 -Xdict-size 100%'

# config/lb_patches is a script to make temporary changes to live-build.
# Please keep these to a minimum!

trap : INT QUIT HUP PIPE TERM # ensure EXIT trap works with 'set -e' on dash
# see https://unix.stackexchange.com/a/596985
# This is so user can interrupt build with Ctrl+C and patched files will be restored.
trap restore_files EXIT

apply_patches() {
    if [ -x config/lb_patches.sh ]
    then
        patch_msg=''
        echo "Applying live-build patches..." | tee -a build.log
        if patch_msg=$( config/lb_patches.sh apply 2>&1 )
        then
            echo "$patch_msg" | tee -a build.log
            applied_patches=true
            sleep 4
        else
            echo "$patch_msg" | tee -a build.log
            echo "ERROR Patching live-build failed!
    Check config/lb_patches.sh" | tee -a build.log
            exit 1 # exit now, before trying to run live-build
        fi
    else
        echo 'Not applying any patches to live-build.'
        sleep 2
    fi
}

restore_files() {
    if [ "$applied_patches" = 'true' ]
    then
        echo ""
        if [ -x config/lb_patches.sh ]
        then
            patch_msg=''
            echo "Removing live-build patches..." | tee -a build.log
            if patch_msg=$( config/lb_patches.sh remove 2>&1 )
            then
                echo "$patch_msg" | tee -a build.log
            else
                echo "$patch_msg" | tee -a build.log
                echo "ERROR Unpatching live-build failed!" | tee -a build.log
                exit 1
            fi
        else
            echo "ERROR Failed to execute 'lb_patches remove'" | tee -a build.log
            exit 1
        fi
    else
        echo ""
        echo 'No files were patched - nothing to restore.'
    fi
}

echo "Starting build at $( date )" | tee build.log

applied_patches=false

apply_patches

echo "
Starting live-build...
" | tee -a build.log
sleep 1

lb build noauto "${@}" 2>&1 | tee -a build.log

# Now handled with trap above.
#restore_files

Couple of settings in auto/config:

--apt-recommends false \
--apt-indices false \
--architectures i386 -k 686 \
--bootloaders syslinux \
--debian-installer-gui false \

config/lb_patches.sh

#!/bin/sh

# - script to make temporary changes to live-build while building iso -
# Please do not over-use this!

case $1 in
apply)
    mode=apply
    ;;
remove)
    mode=remove
    ;;
*)
    echo "usage: $0 [apply|remove]" >&2
    exit 1
    ;;
esac

for i in 1 2 3
do
    case "$i" in
    1)
        # This patch enables squashfs X* options to be passed in MKSQUASHFS_OPTIONS.
        # (Such options must be passed *after* '-comp xz'.)
        file=/usr/lib/live/build/binary_rootfs
        patch=config/patches/binary_rootfs-squashfs_options.patch
        ;;
    2)
        # This patch removes the comments at the top of md5sum.txt,
        # created by /usr/lib/live/build/binary_checksums.
        # Such comments break the "Check the CD-ROM(s) integrity" menu item
        # in Debian Installer.
        file=/usr/lib/live/build/binary_checksums
        patch=config/patches/binary_checksums-nocomment.patch
        ;;
    3)
        # This patch adds any files in config/dpkg to chroot/etc/dpkg/dpkg.cfg.d
        # This will be done before chroot package installation,
        # allowing customization of dpkg behaviour.
        # Currently, this is used to add some path-exclude options
        # for locales, doc and man files.
        # This is to squeeze the CD iso size down as much as possible.
        file=/usr/lib/live/build/chroot_dpkg
        patch=config/patches/chroot_dpkg-configs.patch
        ;;
    *)
        echo "${0}: bad loop index" >&2
        exit 1
        ;;
    esac


    if ! [ -w "$file" ]
    then
        echo "Cannot write to ${file}." >&2
        exit 1
    fi
    if ! [ -r "$patch" ]
    then
        echo "Cannot read from ${patch}." >&2
        exit 1
    fi

    case $mode in
    apply)
        if mv "$file" "${file}-bak" && cp "${file}-bak" "$file"
        then
            if patch -u "$file" -i "${patch-X}" # patch will hang on unset variable, waiting for stdin
            then
                echo "Patched ${file}."
            else
                echo "Failed to patch ${file}." >&2
                exit 1
            fi
        else
            echo "Failed to make backup of ${file}." >&2
            exit 1
        fi
        ;;
    remove)
        if ! [ -f "${file}-bak" ]
        then
            echo "Cannot restore $file, backup does not exist." >&2
            exit 1
        fi
        if mv -f "${file}-bak" "$file"
        then
            echo "Restored ${file} to former state."
        else
            echo "Failed to restore ${file}." >&2
            exit 1
        fi
        ;;
    esac
done

exit

config/patches/ has binary_rootfs-squashfs_options.patch and binary_checksums-nocomment.patch (no longer needed) and chroot_dpkg-configs.patch (this would need to be rewritten to match the current state of /usr/lib/live/build/chroot_dpkg):

--- /usr/lib/live/build/chroot_dpkg	2018-06-08 02:29:28.000000000 +0900
+++ chroot_dpkg-configs	2020-06-19 12:09:26.300444595 +0900
@@ -57,6 +57,16 @@
 force-unsafe-io
 EOF
 
+		# Add any dpkg config files in config/dpkg/
+		if Find_files config/dpkg/*; then
+			dpkg_confdir=chroot/etc/dpkg/dpkg.cfg.d
+			mkdir -p "$dpkg_confdir"
+			for CONFIG_FILE in config/dpkg/*
+			do
+				cp -b --suffix='.orig' "${CONFIG_FILE}" "$dpkg_confdir"
+			done
+		fi
+
 		# Manual hacks for special packages
 
 		# Generic live-build handle for other live packages to act upon
@@ -95,6 +105,22 @@
 		# Remove dpkg sync configuration
 		rm -f chroot/etc/dpkg/dpkg.cfg.d/live-build
 
+		# Remove dpkg custom configs
+		if Find_files config/dpkg/*; then
+			dpkg_confdir=chroot/etc/dpkg/dpkg.cfg.d
+			for CONFIG_FILE in config/dpkg/*
+			do
+				CHROOT_FILE="$dpkg_confdir/$(basename "${CONFIG_FILE}")"
+
+				rm -f "$CHROOT_FILE"
+
+				if [ -f "${CHROOT_FILE}.orig" ]
+				then
+					mv "${CHROOT_FILE}.orig" "$CHROOT_FILE"
+				fi
+			done
+		fi
+
 		# Removing stage file
 		rm -f .build/chroot_dpkg
 		;;

That patch lets you put dpkg config files in config/dpkg. I had cd-excludes:

# This file will not be recognized by live-build without a patch.
# This is currently implemented by config/lb_patches.sh
# and config/patches/chroot_dpkg-configs.patch

# Stop dpkg from installing man, doc or most locale files.
# This is to squeeze the CD iso size down as much as possible.

#path-exclude=/usr/share/locale/*
#path-include=/usr/share/locale/en/*
#path-include=/usr/share/locale/en@boldquot/*
#path-include=/usr/share/locale/en@quot/*
#path-include=/usr/share/locale/en@shaw/*
#path-include=/usr/share/locale/locale.alias
#path-exclude=/usr/share/man/*
path-exclude=/usr/share/doc/*
path-include=/usr/share/doc/loadlin/*

Most of it was commented out, but you could put other stuff in there maybe.

config/enviroment.chroot sets a variable:

INITRAMFS_COMPRESSION_OVERRIDE=lzma

In config/hooks/normal, these two might possibly be of interest:

0550-initramfs-compression.hook.chroot which uses that environment variable:

#!/bin/sh

set -e

# chroot hooks have access to the build config/ directory,
# temporarily mounted on /live-build/config in the chroot.

# The chroot filesystem has not yet been compressed at this stage.

# 'chroot_hacks', which executes after hooks, uses gzip to unpack initrd files
# for bzip2 or lzma compression, which fails because they are
# the concatenation of a CPIO archive and a gzip-ed cpio archive.
# See https://unix.stackexchange.com/a/163353/189202

# This is a script to check INITRAMFS_COMPRESSION_OVERRIDE (custom envvar),
# and, if bzip2 or lzma, to add a file in /etc/initramfs-tools/conf.d/
# with COMPRESS=[bzip2|lzma].
# (Non-default options for bzip2 or lzma cannot be set this way.)

# Put 'INITRAMFS_COMPRESSION_OVERRIDE=<value>' in config/environment.chroot
# Leave --initramfs-compression set to gzip, or unset.

echo "Running $0"

echo "INITRAMFS_COMPRESSION_OVERRIDE: ${INITRAMFS_COMPRESSION_OVERRIDE}"

[ -n "${INITRAMFS_COMPRESSION_OVERRIDE}" ] || exit 0

config_dir=/etc/initramfs-tools/conf.d
mkdir -p "$config_dir"

case "${INITRAMFS_COMPRESSION_OVERRIDE}" in
    gzip)
        ;;

    bzip2|lzma)
        echo "COMPRESS=${INITRAMFS_COMPRESSION_OVERRIDE}" >> "${config_dir}/compression"
        ;;
    *)
        echo "$0: initramfs compression ${INITRAMFS_COMPRESSION_OVERRIDE} is not supported" >&2
        ;;
esac

0540-reduce-binary.hook.binary

#!/bin/sh

set -e

# (binary hooks are run in binary/ in live-build >= 5.0~a9-1
#   but in lb root dir previously)

# script to reduce size of binary directory

echo "Running $0"

# sanity check to avoid accidental system damage!
if ! [ "${PWD##*/}" = binary ]
then
    echo "Not in 'binary' directory!" >&2
    exit 1
fi

for dir in .build auto config chroot binary
do
    if ! [ -d ../"$dir" ]
    then
        echo "$dir missing: is this a live-build directory?" >&2
        exit 1
    fi
done

# remove duplicate files, if identical
for bootfile in live/vmlinuz live/initrd.img
do
    [ -f "$bootfile" ] || continue
    for file in "${bootfile}-"*
    do
        [ -f "$file" ] || continue
        if cmp "$file" "$bootfile"
        then
            echo "removing $file"
            rm "$file"
        fi
    done
done

# remove pae kernel
find pool -type f -name 'linux-image*686-pae*' -exec sh -c 'echo "Removing ${1##*/}"; rm "$1"' _ '{}' \;

And finally, a way to trim unwanted udebs. I hope this still works!
config/debian-installer/udeb_exclude:

# remove all pae udebs
*686-pae-di*

I'm sure you could add other globs to taste.

And if that failed, probably another binary hook could remove any file you liked from the binary before it was packed into the iso.

I don't know if any of that is any use. I haven't looked at extreme iso-squeezing since the 700MB goal slipped out of reach.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#12 2023-07-26 07:15:07

cog
Member
From: The Southwest
Registered: 2015-10-27
Posts: 655
Website

Re: Shrinking the live-build iso

@johnraff I’ll try and see if I can find a point in time on salsa when it started happening.

Offline

Board footer

Powered by FluxBB