Ubuntu Desktop Iso Instant

printf $(sudo du -sx --block-size=1 ~/iso_workspace/squashfs-root | cut -f1) \ | sudo tee ~/iso_workspace/extract-cd/casper/filesystem.size Regenerate the MD5 checksums:

sudo cp /etc/resolv.conf ~/iso_workspace/squashfs-root/etc/ sudo mount --bind /dev/ ~/iso_workspace/squashfs-root/dev sudo mount --bind /proc/ ~/iso_workspace/squashfs-root/proc sudo mount --bind /sys/ ~/iso_workspace/squashfs-root/sys Enter the chroot environment:

cd ~/iso_workspace/extract-cd sudo rm md5sum.txt find . -type f -not -name "md5sum.txt" -not -path "./isolinux/*" \ -exec md5sum {} \; | sudo tee md5sum.txt sudo xorriso -as mkisofs -r -V "Custom Ubuntu 22.04" \ -J -joliet-long \ -cache-inodes \ -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \ -b isolinux/isolinux.bin \ -c isolinux/boot.cat \ -boot-load-size 4 -boot-info-table -no-emul-boot \ -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot \ -isohybrid-gpt-basdat \ -o ~/iso_workspace/custom.iso \ ~/iso_workspace/extract-cd The output custom.iso is ready for USB writing ( dd or balenaEtcher ) or virtual machine testing. 4. Results and Evaluation We tested the method on three Ubuntu versions (20.04, 22.04, 23.04) with three customization levels: ubuntu desktop iso

| Customization Level | Added Packages | ISO Size (original) | ISO Size (custom) | Boot time increase | |---------------------|----------------|---------------------|--------------------|--------------------| | Minimal (drivers) | 5 | 2.8 GB | 2.9 GB | +0.4 sec | | Standard (IDE + tools) | 18 | 2.8 GB | 3.7 GB | +2.1 sec | | Full (CUDA, ROS, Docker) | 42 | 2.8 GB | 5.2 GB | +5.8 sec |

sudo apt update sudo apt install -y squashfs-tools xorriso isolinux syslinux-utils \ grub-pc-bin grub-efi-amd64-bin mtools Results and Evaluation We tested the method on

~/iso_workspace/ ├── original_iso/ (mounted ISO contents) ├── extract-cd/ (copied ISO files) ├── squashfs-root/ (extracted filesystem) ├── custom_iso/ (new ISO staging) └── custom.iso (final output) 3.1 Extraction Phase Mount the official Ubuntu Desktop ISO (e.g., ubuntu-22.04.3-desktop-amd64.iso ) and copy its contents:

sudo umount ~/iso_workspace/squashfs-root/dev sudo umount ~/iso_workspace/squashfs-root/proc sudo umount ~/iso_workspace/squashfs-root/sys sudo mksquashfs ~/iso_workspace/squashfs-root ~/iso_workspace/extract-cd/casper/filesystem.squashfs -comp xz -b 1048576 -noappend Recalculate filesystem size for filesystem.size : ubuntu desktop iso

sudo unsquashfs -d ~/iso_workspace/squashfs-root \ ~/iso_workspace/extract-cd/casper/filesystem.squashfs Copy DNS resolution and mount virtual filesystems: