-
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

Cisco WS-X4712-SFP+E Catalyst 4500 Series Line Card 10GbE 12-Port Module SFP+
$59.00

For Cisco SFP-10G-T, Ubiquiti UF-RJ45-10G Transceiver, SFP+ to RJ45 10GBase-T
$40.99

LOT OF 20 Genuine Cisco SFP-10G-SR V03 10GBASE-SR SFP+ Transceiver Module
$74.99

Cisco SFP-10G-SR SFP Transceiver Module
$13.00

INTEL 10G SFP+ SR SFP E10GSFPSR FTLX8571D3BCV-IT For X520-DA2 X520-SR2 X710-DA2
$9.49

🔥🔥🔥Genuine Cisco SFP-10G-SR V03 10GBASE-SR SFP+ Transceiver 10-2415-03 🔥🔥🔥
$8.00

Cisco SFP-10G-SR 10-2415-03 10 Gigabit Transceiver LOT OF 8
$24.00

Lot of 10 Cisco SFP-10G-SR 10-2415-03 V03 10GBase-SR 850nmSFP+Transceiver Module
$34.95

XGS-PON ONU SFP+ Stick MAC SC/APC 1270/1577nm -40 to 85°C 10G/10G XGSPON ONT
$199.99

LOT of 96 - NEW Cisco SFP+ 10G Fabric Extender Transceiver 10-2566-02 FET-10G
$150.00