-
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
![Extron RGB-160XI Analog Computer Video 60-378-01 picture](/store/img/acQAAOSw0rdcMWoG/s-l225//Extron-RGB-160XI-Analog-Computer-Video-60-378-01.jpg)
Extron RGB-160XI Analog Computer Video 60-378-01
$187.06
![Brand New - Apple Macintosh SE & SE/30 - Universal Replacement Power Supply picture](/store/img/dxUAAOSwKctmjgoV/s-l225//Brand-New-Apple-Macintosh-SE-SE-30-Universal-Repla.jpg)
Brand New - Apple Macintosh SE & SE/30 - Universal Replacement Power Supply
$134.99
![*KB* ANALOG DEVICES MODEL RTI-1221 VINTAGE COMPUTER (JKG1) picture](/store/img/OfwAAOSwvnpmiZiX/s-l225//-KB-ANALOG-DEVICES-MODEL-RTI-1221-VINTAGE-COMPUTER.jpg)
*KB* ANALOG DEVICES MODEL RTI-1221 VINTAGE COMPUTER (JKG1)
$63.75
![*KB* ANALOG DEVICES MODEL RTI-1220 VINTAGE COMPUTER (JKG13) picture](/store/img/OEYAAOSwAIRmiaJ-/s-l225//-KB-ANALOG-DEVICES-MODEL-RTI-1220-VINTAGE-COMPUTER.jpg)
*KB* ANALOG DEVICES MODEL RTI-1220 VINTAGE COMPUTER (JKG13)
$63.75
![NEC Multisync II JC-1402HMA VGA EGA CGA Analog TTL Computer Monitor Vintage 1988 picture](/store/img/YGUAAOSwFfZmntOs/s-l225//NEC-Multisync-II-JC-1402HMA-VGA-EGA-CGA-Analog-TTL.jpg)
NEC Multisync II JC-1402HMA VGA EGA CGA Analog TTL Computer Monitor Vintage 1988
$450.00
![Vintage Gateway 2000 Computer Intellimouse PC Mouse Pad Excellent NOS Analog Era picture](/store/img/4EQAAOSwb5llJfBu/s-l225//Vintage-Gateway-2000-Computer-Intellimouse-PC-Mous.jpg)
Vintage Gateway 2000 Computer Intellimouse PC Mouse Pad Excellent NOS Analog Era
$17.49
![NEW Aquarius+ Computer Signature Edition - 8Bit Retro System picture](/store/img/IlUAAOSwPmZlBzrJ/s-l225//NEW-Aquarius-Computer-Signature-Edition-8Bit-Retro.jpg)
NEW Aquarius+ Computer Signature Edition - 8Bit Retro System
$209.00
![Dual Systems AOM-12 Digital to Analog S-100 Computer picture](/store/img/YuIAAOSwM5tmC0L9/s-l225//Dual-Systems-AOM-12-Digital-to-Analog-S-100-Comput.jpg)
Dual Systems AOM-12 Digital to Analog S-100 Computer
$95.00
![Apple 661-0287 5.25](/store/img/4cYAAOSwz9hlQ79Z/s-l225//Apple-661-0287-5-25-Unidisk-Analog-CD-Card-Vintage.jpg)
Apple 661-0287 5.25" Unidisk Analog CD Card Vintage 1986 820-0190-A
$152.00
![NEC PC-9801 VGA Cable Converter Adapter Analog RGB 15Pin Female PC98 PC9821 9800 picture](/store/img/sIoAAOSwPRJhbwUr/s-l225//NEC-PC-9801-VGA-Cable-Converter-Adapter-Analog-RGB.jpg)
NEC PC-9801 VGA Cable Converter Adapter Analog RGB 15Pin Female PC98 PC9821 9800
$79.00