**Requirement **:
- Combine the required software with the official downloaded ISO on one disk
- Simplify the software packages in the official ISO
- Automation during the installation process of the system.
The method used here is to install the Debian basic system on a virtual machine, install the required software packages, and then use apt-move Generate your own pool
and replace the pool
in ISO with this pool
.
apt-move It is a tool designed to generate debian package repository file structures for software packages that have been downloaded to
/var/cache/app/archives
. By default, this local repository is generated in/mirrors/debian
.
This project is used for automated refactoring of ISO content, refer to the document 《Debian Rebuild ISO》.
Customized ISO content includes:
- Debian base system
- Docker
- Samba
- update-issue : Update pre login information, display IP, etc
- SystemInfo : Display system information
- helper : Customized system usage help document
- AddTmpfs : Script for creating a Tmpfs type file directory, which is created based on the system memory size at startup and used for Samba sharing.
###Install and configure the Debian basic system
Please install the Debian base system in the virtual machine, using **Bookworm (Debian 12. x) ** as an example for this.
Suggestion: Install SSH to better utilize this project. Using root privileges is necessary.
apt install ssh
# or
apt install openssh-server
By default, the root login password is disabled, so access permissions can be configured by setting a password and re enabling root login with the password:
passwd
editor /etc/ssh/sshd_config
Enable root login
PermitRootLogin yes
Other software packages will be installed as needed, and the installed packages will be used in the refactored ISO. Or modify InstallPackages.sh
as needed.
We need to mount the official downloaded ISO and then copy this project to the Debian base system, which can be done through SSH.
main.conf
is a configuration file that can be modified as needed. Then execute the following steps to automatically build the ISO
chmod +x run.sh
./run.sh
According to the configuration of main.conf
, the default output is /mnt/custom/out/
,
the new_debian.iso
in this directory has been rebuild. Copy it out and test it, just like installing Linux normally.
The partial configuration of main.conf
is as follows
# 调试模式(1:是|0:否)
Debug="0"
Debug="0"
Fully automate the entire process without the need for confirmation at every step.
check.sh
, Used to detect the source ISO media and generate ISO.conf configuration files.
# ---[ISO.conf覆写]------------------------
# 源ISO标签(作为目录名称)
ISOINFO_Str="Debian_12.8.0_amd64_Binary-1"
# 源ISO设备
ISOINFO_Device="/dev/sr0"
# ---[ISO.conf覆写]------------------------
last.sh
Used for the final stage of generating ISO. This script is copied from the main process and is typically used for debugging to avoid reinstalling and configuring software environments. The prerequisite for using this script is that all resources have been prepared. This script generates ISO files from the /mnt/custom/iso
directory.