-
Senior Member
registered user
An extremely simple remastering script for Debian-live
The details
Here, I work "somewhere" with a few GB free space. In this case, 15 GB would be enough.
The persistent store is /media/sda8/live-rw, and the compressed image file is /mnt-system/live/filesystem.squashfs. Those names are default Debian-live names.
I run this from Knoppix, so the files are not in use. I union-mount them, copy the file system to a directory copyfs, and compress this into a squashfs image to replace the original one.
If you insist on running from the ISO, as it is copied onto sticks, you get problems replacing the squashfs image. You may have to create a new ISO image in some way.
But I have simply copied the /live directory (corresponds to the KNOPPIX directory) onto a hard drive, and set up good old legacy grub to boot it.
Code:
#!/bin/bash
#
[ -d sqfs ] || mkdir sqfs ;
[ -d persfs ] || mkdir persfs
[ -d aufs ] || mkdir aufs
[ -d copyfs ] || mkdir copyfs
#
sudo mount -o ro,loop /mnt-system/live/filesystem.squashfs sqfs
sudo mount -o loop /media/sda8/live-rw persfs
sudo mount -t aufs -o br:persfs:sqfs none aufs
#
#
sudo rm -rf copyfs/*
sudo rsync -axu aufs/* copyfs
#
sudo mksquashfs copyfs filesystem_rem.squashfs
You may want to keep the old squashfs image as a backup before copying in the new one.
Next setup a new persistent image
Code:
cd /media/sda8
sudo mv live-rw live-rw-0 # Or whatever version number
sudo dd if=/dev/zero of=live-rw bs=1M count=3950
sudo mkfs.ext2 -F live-rw
And I still can't see the great advantages of working in a chroot environment, glad I was able to completely avoid it..
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

INTEL XEON E5-2680V4 SR2N7 2.40GHZ CPU
$11.00

Dell Precision Tower 7810 Xeon E5-2630 v3 @ 2.40GHz , 32GB Ram, NO HDD, NO OS
$239.99

Dell Precision T7820 2x Xeon Silver 4114 2.20GHz 950W No RAM GPU HDD 4x SATA
$350.48

Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram 2x 550W PSU No HDD
$275.00

Dell Precision T5820 Workstation 3.70GHz W-2135 No RAM/ GPU/ HDD/ OS
$179.98

Intel Xeon E5-2699 V4 2.20GHz 55M 22-CORES LGA2011-3 Server Processor 145W SR2JS
$84.49

DELL Precision 5820 Workstation Xeon W-2123 3.6ghz/NO RAM/NO SSD/P400 Vid
$139.99

Matched Pair _ Intel Xeon E5-2698 V4 2.2GHz 20-Core Processor CPU LGA2011 SR2JW
$94.99

Dell Precision T5820 950W Workstation 4.00GHz W-2125 No RAM/ GPU/ HDD/ OS
$144.98

Dell PowerEdge FX2s + 8x FC430 Blades 16x E5-2630v4 160 Cores Rails No PSU/RAM
$699.00