-
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

G-Technology G-RAID 24TB Dual-Drive External HDD TB3 USB 3.1 7200RPM Silver
$299.99

Broadcom 9600-24i RAID Controller PCIe Gen 4.1 Tri-Mode NEW 05-50111-01004
$649.99

EMC KTN-SL3 15-Bay Disk Array Enclosure w/2x 303-108-000E Cards, Dual PSU,No HDD
$239.99

Areca ARC-1882IX-24 (16i4e)24-Port RAID Controller Card w/BBU /HDD Monitor Board
$300.00

MegaRAID 9580-8i8e 16-port 12G SAS/SATA/NVMe 8GB PCIe RAID - 05-50076-00
$1619.19

Broadcom LSI 9305-16i 12Gbps SAS-3 PCIe x8 HBA 16-Ports Raid Controller
$64.99

LSI 9305-16i SATA SAS 12Gbs Controller card PCIe 3.0 IT-Mode w/SAS SATA cable US
$125.98

Dell PowerEdge HBA330 LP PCI-E 12GBs RAID SAS Controller Adapter J7TNV
$18.95

Intel VROC Premium RAID Controller Card PCIe Add-On Module VROCPREMMOD
$265.00

OWC Mercury Elite Pro 2 Bay RAID Enclosure with USB 3.2 for Dual 3.5 inch HDDs
$87.99