-
Senior Member
registered user
Script for remastering Debian 9.1.0 under Knoppix
For the record, here is the script used to remaster Debian Live 9.1.0. Basically, it performs the aufs union mount, copies the whole thing to a directory with rsync, and then compresses the result. Squashfs-tools are needed. The whole operation takes only a few minutes on a contemporary i7 machine with SSD disk.
Code:
#!/bin/bash
#
[ -d sqfs ] || mkdir sqfs ;
[ -d persfs ] || mkdir persfs
[ -d aufs ] || mkdir aufs
[ -d copyfs ] || mkdir copyfs
#
# Running under Knoppix 7.7.1 w/Debian 9.1 image on same partition as Knoppix, persistent store at /dev/sda9
[ -d /media/sda9/deb91_1p ] || mount /media/sda9
fsck.ext3 -y /media/sda9/deb91_1p/persistence
mount -o ro,loop /mnt-system/deb910/live/filesystem.squashfs sqfs
mount -o loop /media/sda9/deb91_1p/persistence persfs
mount -t aufs -o "br=persfs/rw=rw:sqfs=ro,noplink" none aufs
#
#
# Clean up, in case
rm -rf copyfs/*
# Copy union file system
rsync -axu aufs/* copyfs
# Clean up mounts
umount aufs
umount sqfs
umount persfs
#
# Compress file system to new live file
mksquashfs copyfs filesystem_rem_1.squashfs
Afterwards, the new live file is copied to a new directory, a new persistence file is created in a new directory, and a new grub entry is created with the new locations. This way, it is possible to go back to an earlier version on the fly if somethings goes very wrong. At irregular intervals, depending on how much is changed, the new persistence file is backed up.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
![New Precision DWDM SFP+ 10G 80km Tunable Transceiver 50GHz C-Temp DWDM-SFP10G-C picture](/store/img/g/tqEAAOSwkbxmR-l8/s-l225/New-Precision-DWDM-SFP-10G-80km-Tunable-Transceive.jpg)
New Precision DWDM SFP+ 10G 80km Tunable Transceiver 50GHz C-Temp DWDM-SFP10G-C
$90.00
![LOT OF 20 Genuine Cisco SFP-10G-SR V03 10GBASE-SR SFP+ Transceiver Module picture](/store/img/g/JEEAAOSwzu9ibCFX/s-l225/LOT-OF-20-Genuine-Cisco-SFP-10G-SR-V03-10GBASE-SR-.jpg)
LOT OF 20 Genuine Cisco SFP-10G-SR V03 10GBASE-SR SFP+ Transceiver Module
$95.00
![For Cisco SFP-10G-T, Ubiquiti UF-RJ45-10G Transceiver, SFP+ to RJ45 10GBase-T picture](/store/img/g/H0kAAOSwYRJhQsEA/s-l225/For-Cisco-SFP-10G-T-Ubiquiti-UF-RJ45-10G-Transceiv.jpg)
For Cisco SFP-10G-T, Ubiquiti UF-RJ45-10G Transceiver, SFP+ to RJ45 10GBase-T
$49.99
![New Cisco SFP-10G-LRM 10G SFP+ LRM 1310nm 220m SMF/MMF LC Module picture](/store/img/g/Y-EAAOSw2pVl1CqO/s-l225/New-Cisco-SFP-10G-LRM-10G-SFP-LRM-1310nm-220m-SMF-.jpg)
New Cisco SFP-10G-LRM 10G SFP+ LRM 1310nm 220m SMF/MMF LC Module
$34.99
![🔥🔥🔥 CISCO SFP-10G-SR V03 10-2415-03 850nm 10GBASE-SR SFP+ Multi Module 🔥🔥🔥 picture](/store/img/g/KTkAAOSwcmBisISE/s-l225/-CISCO-SFP-10G-SR-V03-10-2415-03-850nm-10GBASE-SR-.jpg)
🔥🔥🔥 CISCO SFP-10G-SR V03 10-2415-03 850nm 10GBASE-SR SFP+ Multi Module 🔥🔥🔥
$6.80
![GENUINE Cisco SFP-10G-SR V03 SFP+ GBIC Transceiver Module 10-2415-03 picture](/store/img/g/tAkAAOSwdENkHItI/s-l225/GENUINE-Cisco-SFP-10G-SR-V03-SFP-GBIC-Transceiver-.jpg)
GENUINE Cisco SFP-10G-SR V03 SFP+ GBIC Transceiver Module 10-2415-03
$6.80
![SFP-H10GB-CU3M Cisco 10GB SFP+ Twinax Copper 3M Passive Cable picture](/store/img/g/FssAAOSwsJxl2ME5/s-l225/SFP-H10GB-CU3M-Cisco-10GB-SFP-Twinax-Copper-3M-Pas.jpg)
SFP-H10GB-CU3M Cisco 10GB SFP+ Twinax Copper 3M Passive Cable
$7.99
![Genuine Cisco ‎SFP-10G-SR Transceiver Module (10-2415-03) picture](/store/img/g/EGsAAOSwOLplBoX9/s-l225/Genuine-Cisco-SFP-10G-SR-Transceiver-Module-10-241.jpg)
Genuine Cisco ‎SFP-10G-SR Transceiver Module (10-2415-03)
$5.85
![Cisco C9300-NM-8X Catalyst 9300 Series 8x 10GB SFP+ Port Switch Module picture](/store/img/g/kvMAAOSwhcxmdan2/s-l225/Cisco-C9300-NM-8X-Catalyst-9300-Series-8x-10GB-SFP.jpg)
Cisco C9300-NM-8X Catalyst 9300 Series 8x 10GB SFP+ Port Switch Module
$359.00
![New Cisco GLC-TE 1G SFP Copper RJ45 100m 1000BASE-T Transceiver Module picture](/store/img/g/UFgAAOSwrw9l1Cbr/s-l225/New-Cisco-GLC-TE-1G-SFP-Copper-RJ45-100m-1000BASE-.jpg)
New Cisco GLC-TE 1G SFP Copper RJ45 100m 1000BASE-T Transceiver Module
$23.50