Again, since our main goal is to put together a newbie-friendly "immutable bkworm", our approach in creating a live "usb" is different from the conventional approach. It is done in an HD not a usb.It is much more convenient to prepare the live_iso/persistence_partition iterations on an HD/SSD/NVME. This is what I would like to discuss first.
Preparatory steps:
1. Use gparted to create two ext4 partitions, labeled "persistence" and "iso", respectively
2. Create a file named "persistence.conf" in the persistence partition, with the content of "/ union"
3. Use gnome files or any other tool to mount the live iso file, then copy the /live folder to the iso partition
4. Edit the 40_custom file in the /etc/grub.d folder as follows:
Code:
# menu entries you want to add after this comment. Be careful not to change# the 'exec tail' line above.menuentry "Debian 12 ISO with persistence" { search --no-floppy --label --set=iso_partition isoset root=$iso_partitionrmmod tpmlinux /live/vmlinuz-6.1.0-18-amd64 boot=live components persistence quiet quiet splashinitrd /live/initrd.img-6.1.0-18-amd64}menuentry "Debian 12 ISO" { search --no-floppy --label --set=iso_partition isoset root=$iso_partitionrmmod tpmlinux /live/vmlinuz-6.1.0-18-amd64 boot=live components quiet quiet splashinitrd /live/initrd.img-6.1.0-18-amd64}
After running the persistence live iso for a while, you can merge the persistence partition with the original live iso file to create a new live iso file:
Code:
sudo mkdir /liveusb /overlaysudo mount -o loop,ro /media/ryzen/d-live\ 12.5.0\ gn\ amd64/live/filesystem.squashfs /liveusbsudo mount -t overlay overlay -o lowerdir=/liveusb,upperdir=/media/ryzen/persistence/rw,workdir=/media/ryzen/persistence/work /overlay/ sudo mksquashfs /overlay newfilesystem.squashfs -comp xz
Statistics: Posted by pwzhangzz — 2024-05-28 03:24