39

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 ...


7

The initramfs OpenWRT/LEDE kernel builds are including the rootfs image into initramfs, attaching it to the kernel so it will put the filesystem in a ramdisk during bootup and utilize it as /. You don't need such builds if the regular flash-based storage works for you, as it won't allow any persistent configuration by default. Such a configuration is useful ...


7

SquashFS is a read-only file system. https://en.wikipedia.org/wiki/SquashFS You could create a new filesystem and copy the contents of the squashfs to that. To do that, you need to: Backup your data from the old filesystem Start from a Live-CD/USB Make a new Filesystem on /dev/mtdblock3 Copy your data to the new filesystem Instead of booting from a Live-...


5

Most major distributions use squashfs to hold their live CD. squashfs is intended to be used for read-only filesystems, which is exactly what a live CD is. Decompressing filesystem.squashfs takes longer than any other process because filesystem.squashfs contains the entire system. For more information, look at the wikipedia page: https://en.wikipedia.org/...


5

If your system supports some uion-filesystem, such as aufs or overlayfs, you don't have to extract your original squashfs file. For example the overlayfs is used( a kernel option to enable it): You can mount your squashfs.file to /fm or somewhere else first. Prepare a writable filesystem with 2 directories in it, say /to and /temp. prepare another writable ...


5

Thanks to @msw, I figured out the package names for Ubuntu. Thank you! Here's the full steps for someone in the future. Get source here: http://sourceforge.net/projects/squashfs/ # sudo apt-get install lzma-dev # sudo apt-get install liblzma-dev # tar -zxvf squashfs4.2.tar.gz # cd squashfs4.2/squashfs-tools: Edit Makefile and uncomment this line "...


4

As I said in my other answer you have to move the old filesystem.squashfs to another location (or rename it) before repacking your modified squashfs-root into a new filesystem.squashfs: mv filesystem.squashfs /path/to/backup/ or mv filesystem.squashfs filesystem.squashfs.old then: mksquashfs squashfs-root filesystem.squashfs -b 1024k -comp xz -Xbcj x86 -...


4

Your root filesystem is squashfs, which saves some flash space by compressing everything, but as a result is read-only. You can not mount it read-write. Instead, you reflash the device with a new squashfs image. If you need writable storage, you have to partition your flash and mount a second, writable filesystem, of which there are several intended for use ...


3

Yes. Probably best is: mksquashfs s o u r c e s outfile -comp lz4 ...which I find typically manages output volumes something like 10% to 20% larger than the default gzip compressor, but also does so at least twice as fast and the online file access is also much faster still. Vanilla Linux kernels versions 3.18 and up support lz4 compression and so these ...


3

The line /dev/sda7 on /media/Datos type fuseblk (rw) from mount's output tells you that /media/Datos is an NTFS partition (type fuseblk). NTFS cannot store ownership and permissions in the same way Linux/Unix filesystems like ext{2..4} can. That's why you can set ownership/permissions but they do not persist. You'll need to switch to a "proper" ...


3

Since file doesn't recognize it, the vendor probably used a custom SquashFS magic signature. I expect that unsquashfs is also giving you an error about not being able to find a valid superblock. Give sasquatch a try; it's a modified version of unsquashfs that attempts to support such vendor hacks.


3

Linux kernels before 2.6.29 don't accept SquashFS version 4 filesystems (read here). This will probably the cause why your device does not boot with it. In order to build a SquashFS v3 image, you'll need an older version of the squashfs-tools package. The latest supported release of Ubuntu including this is the old Hardy 8.04 release with the package ...


3

The number in the second column of an entry in the output of ls -la is the number of hard links pointing to the same inode; in the case of a directory entry this means the number of subdirectories including the special . dir mentioned below; you can read more details e. g. in this answer. The entry .. represents the parent directory, which in this case is ...


3

Squashfs needs a block device to run, thus you need the block emulation over UBI. First make sure it is enabled in your kernel. You can test this by using the ubiblock command on a running system. For example, running ubiblock -c /dev/ubi0_0 will create the devnode /dev/ubiblock0_0. Once you have the dependency, you can enable the UBI block on the cmdline ...


2

Here, I found an other answer: bash# mount dir.sqsh /mnt/dir -t squashfs -o loop


2

I faced the same issue. Then from my configuration found that zlib was not supported, and used xz compression as it was supported in my configuration and it worked. mksquahfs source source.sqfs -comp xz mount source.sqfs destination


2

After some research, it seems that SquashFS is a read-only filesystem, and writing is not possible into it, so, even when you could chroot into it by installing squashfs support, the only way to change the contents is something like these instructions resumed to: Mount the SquashFS and extract the contents to a loop device or directory. Edit what should be ...


2

A squashFS is usually a single file in another filesystem (such as a FAT FS). It can also be copied raw to a single partition. SquashFS cannot be modified. To modify a squashFS one must extract it modify the contents and "squash" it again. On some Linux Distros, SquashFS is used in combination with OverlayFS ( or aufs or unionfs). These filesystems overlay ...


2

In my opinion, you should still use an initramfs. Pretty much any will do, but you'll need the squashfs file-system kernel module (if its not already compiled into your kernel) in your initramfs image. Most initramfs systems respect fstab - and definitely Dracut does. And so you can just configure two /etc/fstab files - one in your .sfs image and one in ...


2

You're basically looking for find /tmp/mnt -iname '*.squashfs' -exec unsquashfs {} \; {} is replaced by the path to the matched file. If you want to specify which directory to extract to, pass the -d option. find /tmp/mnt -iname '*.squashfs' -exec unsquashfs -d /tmp/unsquashedfs/files {} \;


2

You'd need to make a Feature Request on the squashfs site though, rather than here. Or ask in the discussion forum there.


2

BusyBox's built-in mount command doesn't recognize -B; you'll have to use -o bind: mount -o bind /mnt/flash/etc /mnt/root/etc Also, I think the remounting is unnecessary if /mnt/flash is already writable. But try fixing the bind mounting first.


2

Of course ;it is possible to append directory or file to a squashfs_file. One has to understand the way mksquashfs works : Roughly speaking it is incrementally adding compression blocks of data in similar way as growisofs writes to dvd ; and at the end update the TOC ,kind of table contents of the image. You cannot "clear" the old directory of course, ...


2

Initramfs kernel is like live os distro. You can test it without installing into the sd card. So, if you want to test the image initramfs is useful.


2

I use ls -lah /tmp to see all 1st level files and directory in /tmp. 'l' for list 'a' for all 'h' for human readable file size As tmp directory comes with 777 permission by default any user can read, write and index through the directory and root access is not mandatory to list it's contents. In Linux hidden files and folders start with a . at beginning. ...


1

You could run unsquashfs and check for errors - any errors should confuse the compression, like changing a few bytes in a zip/xz archive messes up at least a few blocks


1

You could take a look at the project squashmount. It mounts a directory with both a squashfs and an autofs/overlay/overlayfs system to allow for squashing ro access as well as write access. Completely configurable on how much change requires re-squashing, its a nice to use for database storage, repos spools, etc.


1

Apparently an old version of squashfs-tools doesn't have this, but the switch is -Xcompression-level. One can locally build working squashfs-tools with no root rights.


1

You can move your files you need to be writable in a directory on the jjfs2 partition and use unionfs to join the directory to your squashfs image mounted on a loop. there is a nice tutorial here: http://tldp.org/HOWTO/SquashFS-HOWTO/creatingandusing.html


1

It is possible to modify a squashfs image without extracting its contents, but there are limitations. If you specify an existing squashfs image as the destination parameter for mksquashfs, without specifying the -noappend option, it will attempt to add additional files from the specified source parameters. It appears that mksquashfs attempts to generate a ...


Only top voted, non community-wiki answers of a minimum length are eligible