libreELEC uses a squashfs filesystem. This is a compressed read only filesystem. Because it is a sophisticated Linux method, I don't believe that you can manage it with MS Windows in any way. You should have to use Linux, maybe a live CD from Ubuntu or Debian if you haven't a running Linux system.
Another problem is that, if you are logged in to your libreELEC with ssh
, you cannot do the work on the squashfs image, because there are not the needed tools to manage it. So you have to pull out the SD Card of your RasPi and attach it with a card reader to your Linux computer. Now you are able to mount its partitions. You only need the first partition if the SD Card is attached for excample as /dev/sdb
:
pc ~$ sudo mkdir /mnt/p1
pc ~$ sudo mount /dev/sdb1 /mnt/p1
Then you will find the squashfs filesystem in the image /mnt/p1/SYSTEM
and its checksum in /mnt/p1/SYSTEM.md5
. Check with:
pc ~$ sudo file /mnt/p1/SYSTEM
/mnt/p1/SYSTEM: Squashfs filesystem, little endian, version 4.0, 131633489 bytes, 10022 inodes, blocksize: 524288 bytes, created: Sat May 4 18:29:03 2019
Now you are able to modify it. How to do it you can look at Mounting a squashfs filesystem in read-write. Here is a copy it:
Quote:
As root, copy filesystem.squashfs
to some empty dir, e.g.:
cp /mnt/clonezilla/live/filesystem.squashfs /path/to/workdir
cd /path/to/workdir
Unpack the file then move it somewhere else (so you still have it as a backup):
unsquashfs filesystem.squashfs
mv filesystem.squashfs /path/to/backup/
Go in squashfs-root
, add/modify as per your taste then recreate filesystem.squashfs
:
cd /path/to/workdir
mksquashfs squashfs-root filesystem.squashfs -b 1024k -comp xz -Xbcj x86 -e boot
copy the newly created filesystem.squashfs
over the existing one on your USB drive, e.g.:
cp filesystem.squashfs /mnt/clonezilla/live/
then reboot and use your LIVE USB.
Note: the above commands are part of squashfs-tools
.
End quote
I do not have verified the quoted instructions. It's up to you ;-)
I think when you have created the new /mnt/p1/SYSTEM
you have to make its checksum in /mnt/p1/SYSTEM.md5
.
LibreELEC_Backup.img\1.img
). Is there aLibreELEC_Backup.img\0.img
or..\2.img
that might be other partitions of the disk? – Roger Jones May 22 '19 at 15:33