今日已更新 310 条资讯 | 累计 24969 条内容
关于我们

Procedure for Modifying a SquashFS-Based Live Linux System

vast cow 2026年07月28日 14:53 0 次阅读 来源:Dev.to

A Live Linux system such as SystemRescue generally has the following structure: ISO9660 ├── EFI/, boot/, syslinux/, grub/ ← Bootloader ├── vmlinuz ← Kernel ├── initramfs ← Initial RAM disk └── airootfs.sfs / filesystem.squashfs └── Actual root filesystem Because SquashFS is read-only, the basic process is as follows: Extract the ISO ↓ Extract the SquashFS ↓ Edit the rootfs or enter it with chroot ↓ Rebuild the SquashFS ↓ Replace the SquashFS inside the ISO ↓ Rebuild it as a bootable ISO ↓ Test with BIOS and UEFI However, with SystemRescue, it is safer not to rebuild airootfs.sfs directly from the outset, but to select a method in the following order of priority: YAML configuration in sysrescue.d Overlay using an SRM (SystemRescueModule) Direct reconstruction of airootfs.sfs Full build from the SystemRescue source The official SystemRescue documentation also recommends sysrescue-customize for modifying ISO images. An SRM is an additional layer in SquashFS format, and files at the same paths in the SRM take precedence over those in the base rootfs. ( SystemRescue ) 1. Preparing the Working Environment It is easiest to perform this work on Linux. On Debian/Ubuntu-based systems, install the following: sudo apt update sudo apt install squashfs-tools xorriso rsync file It is also useful to install QEMU for testing: sudo apt install qemu-system-x86 ovmf The official SystemRescue customization script also lists xorriso and squashfs-tools among its main dependencies. It can also be run under WSL. ( SystemRescue ) Create a working directory: mkdir -p ~/work/systemrescue cd ~/work/systemrescue cp /path/to/systemrescue.iso original.iso Ensure that you have at least several times the original ISO size in free space. When rebuilding from within SystemRescue itself, the official documentation notes that the Copy-on-Write area may require approximately three times the ISO size. ( SystemRescue ) Method A: Use the Official SystemRescue sysrescue-customize Tool For SystemRescue, this

本文内容来源于互联网,版权归原作者所有
查看原文