1、分解映象
cp Core-current.iso tinycore.iso
sudo rm /mnt/tmp -rf
sudo rm /tmp/boot -rf
sudo rm /tmp/cde -rf
sudo rm /tmp/extract -rf
sudo mkdir /mnt/tmp
sudo mount tinycore.iso /mnt/tmp -o loop,ro
sudo cp -r /mnt/tmp/* /tmp
sudo mv /tmp/boot/core.gz /tmp
sudo umount /mnt/tmp
mkdir /tmp/extract
cd /tmp/extract
zcat /tmp/core.gz | sudo cpio -i -H newc -d
cd /tmp
2、自定義增減
/tmp/extract 裡面有系統根目錄。。。加加減減等等,略
/home 新增個 tc 資料夾,就是終端預設的目錄
3、打包檔案
sudo rm /tmp/core.gz
cd /tmp/extract
sudo find | sudo cpio -o -H newc | \
gzip -2 > ../core.gz
cd /tmp
advdef -z4 core.gz
4、重製iso
cd /tmp
sudo mv core.gz boot
mkdir newiso
sudo mv boot newiso
sudo mv cde newiso
sudo mkisofs -l -J -R -V TC-custom -no-emul-boot -boot-load-size 4 \
-boot-info-table -b boot/isolinux/isolinux.bin \
-c boot/isolinux/boot.cat -o TC-remastered.iso newiso
sudo rm -rf newiso
/tmp目錄生成的TC-remastered.iso檔案,rufus寫入隨身碟即可使用。