Commit 2a288465 authored by Marco Marinello's avatar Marco Marinello

Add a Makefile that recreates the squashfs

Signed-off-by: Marco Marinello's avatarMarco Marinello <mmarinello@sezf.it>
parent 7b9854f6
......@@ -3,3 +3,6 @@ README.pdf
vmlinuz
initrd.img
filesystem.squashfs
Clonezilla-Live-Version
live/squashfs-root
clonezilla_live.pub
CLONEZILLA_SOURCE="https://vorboss.dl.sourceforge.net/project/clonezilla/clonezilla_live_stable/2.6.2-15/clonezilla-live-2.6.2-15-i686.zip"
CLONEZILLA_SAVE_TO="../clonezilla-orig.zip"
all: rebuild-squashfs
clean:
rm -f ${CLONEZILLA_SAVE_TO}
rm -rf live
download:
test -e ${CLONEZILLA_SAVE_TO} || wget -O ${CLONEZILLA_SAVE_TO} ${CLONEZILLA_SOURCE}
prepare-clonezilla: download
test -e live || unzip ${CLONEZILLA_SAVE_TO} live/*
rm -f live/filesystem.packages live/filesystem.packages-remove live/filesystem.size live/freedos.img live/ipxe.efi live/ipxe.lkn live/memtest
rebuild-squashfs: prepare-clonezilla
useradd clonezilla || true
cd live; test -e squashfs-root || unsquashfs filesystem.squashfs
cd live/squashfs-root; test -e home/clonezilla/.ssh || mkdir -p home/clonezilla/.ssh
cd live/squashfs-root/home/clonezilla/.ssh; test -e id_rsa || ssh-keygen -t rsa -N "" -f id_rsa -C "clonezilla@fucc-live"
chmod 700 live/squashfs-root/home/clonezilla/.ssh
chmod 600 live/squashfs-root/home/clonezilla/.ssh/id_rsa
chmod 644 live/squashfs-root/home/clonezilla/.ssh/id_rsa.pub
chown -R clonezilla. live/squashfs-root/home/clonezilla/.ssh
cd live; rm -f filesystem.squashfs; mksquashfs squashfs-root filesystem.squashfs -comp zstd
rm -f live/squashfs-root/home/clonezilla/.ssh/id_rsa
cp live/squashfs-root/home/clonezilla/.ssh/id_rsa.pub utils/clonezilla_live.pub
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment