====== USB-Live-Stick for DeBuSysCo ====== There is a original Debian 5 Live Stick which was created by Stefan Rauch (ACO) and committed to BEA in June 2024. This Live Stick is restricted to read only access. This makes extension of the system for purposes cumbersome up to impossible. To make changes to the system on the Live Stick there are two ways. Either change the Live system on a host system or create a USB Live Stick which also provides write access and stores data persistently. ===== Change live system on host system ===== Tested with Ubuntu 22.04 LTE To remaster a live stick with Ubuntu, you need to follow a series of steps that include unpacking the live ISO, editing the file system, and creating a new ISO image. Here is a step-by-step guide: === Step 1: Preparations === - Install the necessary packages on your Ubuntu system: sudo apt update sudo apt install squashfs-tools genisoimage isomaster - Make a working copy of the Live Stick on your PC (Just copy all directories and files from the stick) and change into this directory. === Step 2: Unpack the ISO file === - Change into directory where the SquashFS image is cd live - Unpack the SquashFS file system, which contains the root file system: sudo unsquashfs -d squashfs iso/LiveOS/squashfs.img === Step 3: Make changes === - Prepare a chroot environment to make changes: sudo mount --bind /dev squashfs/dev sudo mount --bind /proc squashfs/proc sudo mount --bind /sys squashfs/sys sudo mount --bind /run squashfs/run sudo chroot squashfs - Within the chroot environment, you can install packages, change files, and make configurations: # Example: Install a package apt install package_name - After making the desired changes, exit the chroot environment: exit sudo umount squashfs/dev sudo umount squashfs/proc sudo umount squashfs/sys sudo umount squashfs/run === Step 4: Create a new SquashFS file system === - Create a new SquashFS file system with the changes: sudo mksquashfs squashfs filesystem.squashfs - If sure, all necessary changes have been done, remove the extracted SquashFS sudo rm -rf squashfs ==== Create a new ISO image ==== The tools to create a new bootable USB live stick are mostly using ISO images as source. Therefore one first has to create an ISO image. - Check the directory structure and adjust boot configuration files if necessary. - Use genisoimage to create a new ISO image (e.g. new-live-image.iso): sudo genisoimage -o /path/to/your-new.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -J -R -V "Some Name" ../ ==== Create a new USB live stick ==== === Non persistant live stick: === sudo dd if=/path/to/your-new.iso of=/dev/sdX bs=4M status=progress && sync === Persistent live stick: === Install mkusb sudo add-apt-repository ppa:mkusb/ppa sudo apt update sudo apt install mkusb mkusb-nox usb-pack-efi Start mksub and choose "Install (make a boot device)", "Persistent live" and the size of the persistant memory space on the stick. ===== Persistantly installed additional software ===== [[ed:debusysco:installed-sw|Additionally installed software on original live stick]] ===== Persitantly changed configurations ===== [[ed:debusysco:os-config|OS configuration for DeBuSysCo]]