Update without rebuilding the whole disk
This commit is contained in:
Executable
+30
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
# we depend on a properly build rootfs
|
||||
if [ "$EUID" -ne 0 ]
|
||||
then echo "Please run as root"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -z disk.img ]
|
||||
then echo "Please run createLiveImage.sh first"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
CHIBRAX_MOUNT_POINT="/tmp/chibraxMountPoint"
|
||||
|
||||
OFFSET=$(cat diskoffset)
|
||||
losetup --offset $OFFSET -f disk.img
|
||||
LOOP=$(losetup -a | grep -v deleted | cut -d':' -f 1)
|
||||
|
||||
echo ${LOOP} $CHIBRAX_MOUNT_POINT $OFFSET
|
||||
mkdir $CHIBRAX_MOUNT_POINT -p
|
||||
mount ${LOOP} $CHIBRAX_MOUNT_POINT
|
||||
|
||||
echo "coping rootfs"
|
||||
cp rootfs/* $CHIBRAX_MOUNT_POINT -r
|
||||
echo "done"
|
||||
|
||||
echo "finishing..."
|
||||
umount $CHIBRAX_MOUNT_POINT
|
||||
losetup -d $LOOP
|
||||
Reference in New Issue
Block a user