将Ubuntu/Debian打包成自己的ISO镜像
前奏
Ubuntu 22.04.1 LTS / 16G / 8U
# 设置固定IP
rambo@test:~$ cat /etc/netplan/01-network-manager-all.yaml
# Let NetworkManager manage all devices on this system
network:
ethernets:
ens33:
addresses:
- 172.16.186.144/24
gateway4: 172.16.186.2
nameservers:
addresses:
- 172.16.186.2
version: 2
renderer: NetworkManager
# apt源
rambo@test:~$ grep -v ^# /etc/apt/sources.list | grep -v ^$
deb http://ca.archive.ubuntu.com/ubuntu jammy main restricted
deb http://ca.archive.ubuntu.com/ubuntu jammy-updates main restricted
deb http://ca.archive.ubuntu.com/ubuntu jammy universe
deb http://ca.archive.ubuntu.com/ubuntu jammy-updates universe
deb http://ca.archive.ubuntu.com/ubuntu jammy multiverse
deb http://ca.archive.ubuntu.com/ubuntu jammy-updates multiverse
deb http://ca.archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
deb http://ca.archive.ubuntu.com/ubuntu jammy-security main restricted
deb http://ca.archive.ubuntu.com/ubuntu jammy-security universe
deb http://ca.archive.ubuntu.com/ubuntu jammy-security multiverse
# 安装图形化(按需)
rambo@test:~$ sudo apt install -y ubuntu-desktop
安装systemback
rambo@test:~$ sudo bash -c 'echo "deb [arch=amd64] https://mirrors.bwbot.org/ stable main" > /etc/apt/sources.list.d/systemback.list'
rambo@test:~$ sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key 50B2C005A67B264F
rambo@test:~$ sudo apt -y update && sudo apt -y upgrade
rambo@test:~$ sudo apt install -y systemback
安装make
rambo@test:~$ sudo apt install -y make gcc
安装cdtools
rambo@test:~$ wget https://sourceforge.net/projects/cdrtools/files/alpha/cdrtools-3.02a09.tar.gz
rambo@test:~$ tar -zxvf cdrtools-3.02a09.tar.gz
rambo@test:~$ cd cdrtools-3.02a09
rambo@test:~$ make && sudo make install
# 创建测试数据
rambo@test:~$ touch usb{1..10}
在图形化中打开systemback
用新生成的镜像重新装OS
具体往后怎么安装看 这里