I recently started building my own iso from the 1.4 branch.
This works but i noticed that the images i create are a bit larger than the ones i downloaded before.
My image is 448MByte while the ones provided by VyOs were somewhere in the 390’s.
Why is this, am i missing something that should be in the build manual for 1.4?
Using a native build on a clean debian12
Did a pull today and i use the following commands:
git clone -b sagitta--single-branch https://github.com/vyos/vyos-build
# next i installed all dependencies noted in the dockerfile
sudo ./build-vyos-image iso --architecture amd64 --build-by "me@mydomain.com"
If you boot that image and do a “unsqushfs -s ./filesystem.squashfs”, whats the output of that?
For example here is how to locate the squashfs file in VyOS 1.5-rolling-202309120021:
vyos@vyos:~$ sudo find / -iname "*.squashfs" | grep -i 230912
/boot/rw/usr/lib/live/mount/rootfs/1.5-rolling-202309120021.squashfs
find: File system loop detected; ‘/sys/kernel/debug/pinctrl’ is part of the same file system loop as ‘/sys/kernel/debug’.
/boot/1.5-rolling-202309120021.squashfs
/usr/lib/live/mount/rootfs/1.5-rolling-202309120021.squashfs
/usr/lib/live/mount/persistence/boot/1.5-rolling-202309120021/rw/usr/lib/live/mount/rootfs/1.5-rolling-202309120021.squashfs
/usr/lib/live/mount/persistence/boot/1.5-rolling-202309120021/1.5-rolling-202309120021.squashfs
vyos@vyos:~$ unsquashfs -s /usr/lib/live/mount/persistence/boot/1.5-rolling-202309120021/1.5-rolling-202309120021.squashfs
Found a valid SQUASHFS 4:0 superblock on /usr/lib/live/mount/persistence/boot/1.5-rolling-202309120021/1.5-rolling-202309120021.squashfs.
Creation or last append time Tue Sep 12 03:43:07 2023
Filesystem size 352555862 bytes (344292.83 Kbytes / 336.22 Mbytes)
Compression xz
Dictionary size 262144
Filters selected: x86
Block size 262144
Filesystem is exportable via NFS
Inodes are compressed
Data is compressed
Uids/Gids (Id table) are compressed
Fragments are compressed
Always-use-fragments option is specified
Xattrs are compressed
Duplicates are removed
Number of fragments 1965
Number of inodes 69779
Number of ids 47
Number of xattr ids 8
Im thinking if the increased size is due to your local debian kernel is dragged into the iso itself while the filesystem.squashfs is expected size?
Yeah so thats correct mksquashfs and we can see its the rootfs itself that is enlarged in your case (and not whats outside of this within the iso). That is yours is 393 MB where the official is 336MB (which sums up to the iso difference between yours being 448MB and the official being 391MB).
Nextup, lets compare boot partition to verify that the vyos linux kernel is being used:
vyos@vyos:~$ du -sm /usr/lib/modules
113 /usr/lib/modules
And we could also do a rough package comparision:
vyos@vyos:~$ dpkg -l | wc -l
788
There are also a couple of cleanups during build where manpages are deleted and content of /var/cache (the later is not successfully cleaned during build and will also be recreated after boot):
vyos@vyos:~$ sudo du -sm /usr/local/man
du: cannot access '/usr/local/man': No such file or directory
vyos@vyos:~$ sudo du -sm /usr/local/share/man
du: cannot access '/usr/local/share/man': No such file or directory
vyos@vyos:~$ sudo du -sm /usr/share/man
du: cannot access '/usr/share/man': No such file or directory
vyos@vyos:~$ sudo du -sm /var/cache
5 /var/cache
Would be interresting what of the above that differs from your build?
So even if the initrd differs by a few bytes the large difference is that the official 1.5-rolling (as of 230912) have 788 packages installed while yours have 825.
So the question there is why your compile drags in more packages than the official one?
Want to attached the output of that?
dpkg -l > /config/dpkg_230910.txt
I have attached the one from VyOS 1.5-rolling-202309120021 below:
ii frr 9.0.1-5-g9c36b56d4 amd64 FRRouting suite of internet protocols (BGP, OSPF, IS-IS, ...)
ii frr-pythontools 9.0.1-5-g9c36b56d4 all FRRouting suite - Python tools
ii frr-rpki-rtrlib 9.0.1-5-g9c36b56d4 amd64 FRRouting suite - BGP RPKI support (rtrlib)
ii frr-snmp 9.0.1-5-g9c36b56d4 amd64 FRRouting suite - SNMP support
ii open-vm-tools 2:12.2.0-1 amd64 Open VMware Tools for virtual machines hosted on VMware (CLI)
ii usr-is-merged 35 all Transitional package to assert a merged-/usr system
ii vyos-1x 1.4dev0-5105-g3f4c320cb amd64 VyOS configuration scripts and data
ii vyos-1x-vmware 1.4dev0-5105-g3f4c320cb amd64 VyOS configuration scripts and data for VMware
230912:
ii frr 9.0.1-9-ga0280e49d amd64 FRRouting suite of internet protocols (BGP, OSPF, IS-IS, ...)
ii frr-pythontools 9.0.1-9-ga0280e49d all FRRouting suite - Python tools
ii frr-rpki-rtrlib 9.0.1-9-ga0280e49d amd64 FRRouting suite - BGP RPKI support (rtrlib)
ii frr-snmp 9.0.1-9-ga0280e49d amd64 FRRouting suite - SNMP support
ii open-vm-tools 2:12.2.0-1+deb12u1 amd64 Open VMware Tools for virtual machines hosted on VMware (CLI)
ii usrmerge 35 all Convert the system to the merged /usr directories scheme
ii vyos-1x 1.5dev0-81-gcd3dda755 amd64 VyOS configuration scripts and data
ii vyos-1x-vmware 1.5dev0-81-gcd3dda755 amd64 VyOS configuration scripts and data for VMware
But yours also have (which 230912 doesnt):
ii apt-rdepends 1.3.0-10 all recursively lists package dependencies
ii containernetworking-plugins 1.1.1+ds1-3+b5 amd64 standard networking plugins - binaries
ii gdb 13.1-3 amd64 GNU Debugger
ii libapt-pkg-perl 0.1.40+b2 amd64 Perl interface to libapt-pkg
ii libbabeltrace1:amd64 1.5.11-1+b2 amd64 Babeltrace conversion libraries
ii libbcg729-0:amd64 1.1.1-2 amd64 ITU G.729 Annex A compatible audio codec
ii libcurl3-gnutls:amd64 7.88.1-10+deb12u1 amd64 easy-to-use client-side URL transfer library (GnuTLS flavour)
ii libdebuginfod-common 0.188-2.1 all configuration to enable the Debian debug info server
ii libdebuginfod1:amd64 0.188-2.1 amd64 library to interact with debuginfod (development files)
ii libdeflate0:amd64 1.14-1 amd64 fast, whole-buffer DEFLATE-based compression and decompression
ii libdw1:amd64 0.188-2.1 amd64 library that provides access to the DWARF debug information
ii libgpm2:amd64 1.20.7-10+b1 amd64 General Purpose Mouse - shared library
ii libipt2 2.0.5-1 amd64 Intel Processor Trace Decoder Library
ii libjbig0:amd64 2.1-6.1 amd64 JBIGkit libraries
ii libjpeg62-turbo:amd64 1:2.1.5-2 amd64 libjpeg-turbo JPEG runtime library
ii liblerc4:amd64 4.0.0+ds-2 amd64 Limited Error Raster Compression library
ii liblua5.2-0:amd64 5.2.4-3 amd64 Shared library for the Lua interpreter version 5.2
ii libpython3.11:amd64 3.11.2-6 amd64 Shared Python runtime library (version 3.11)
ii libsbc1:amd64 2.0-1 amd64 Sub Band CODEC library - runtime
ii libsmi2ldbl:amd64 0.4.8+dfsg2-16 amd64 library to access SMI MIB information
ii libsource-highlight-common 3.1.9-4.2 all architecture-independent files for source highlighting library
ii libsource-highlight4v5:amd64 3.1.9-4.2+b3 amd64 source highlighting library
ii libspandsp2:amd64 0.0.6+dfsg-2+b1 amd64 Telephony signal processing library
ii libspeexdsp1:amd64 1.2.1-1 amd64 DSP library derived from speex
ii libssh-gcrypt-4:amd64 0.10.5-2 amd64 tiny C SSH library (gcrypt flavor)
ii libtiff6:amd64 4.5.0-6 amd64 Tag Image File Format (TIFF) library
ii libunwind8:amd64 1.6.2-3 amd64 library to determine the call-chain of a program - runtime
ii libwebp7:amd64 1.2.4-0.2 amd64 Lossy compression of digital photographic images
ii libwireshark-data 4.0.6-1~deb12u1 all network packet dissection library -- data files
ii libwireshark16:amd64 4.0.6-1~deb12u1 amd64 network packet dissection library -- shared library
ii libwiretap13:amd64 4.0.6-1~deb12u1 amd64 network packet capture library -- shared library
ii libwsutil14:amd64 4.0.6-1~deb12u1 amd64 network packet dissection utilities library -- shared library
ii skopeo 1.9.3+ds1-1+b5 amd64 Tooling to work with remote images registries
ii strace 6.1-0.1 amd64 System call tracer
ii tshark 4.0.6-1~deb12u1 amd64 network traffic analyzer - console version
ii vim 2:9.0.1378-2 amd64 Vi IMproved - enhanced vi editor
ii vim-common 2:9.0.1378-2 all Vi IMproved - Common files
ii vim-runtime 2:9.0.1378-2 all Vi IMproved - Runtime files
ii vyos-1x-smoketest 1.4dev0-5105-g3f4c320cb all VyOS build sanity checking toolkit
ii wireshark-common 4.0.6-1~deb12u1 amd64 network traffic analyzer - common files
And 230912 have these where yours doesnt:
ii libfile-find-rule-perl 0.34-3 all module to search for files based on rules
ii libnumber-compare-perl 0.03-3 all module for performing numeric comparisons in Perl
ii libtext-glob-perl 0.11-3 all Perl module for matching globbing patterns against text
My best guess is that you have built a development iso instead of a release iso: