Squashfs

From www.deloptes.org
Revision as of 22:05, 20 September 2013 by Admin (talk | contribs) (Created page with "As root, copy filesystem.squashfs to some empty dir, e.g.: cp /mnt/target/casper/filesystem.squashfs /data/local/dev/ubuntu cd /data/local/dev/ubuntu Unpack the file then ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

As root, copy filesystem.squashfs to some empty dir, e.g.:

cp /mnt/target/casper/filesystem.squashfs /data/local/dev/ubuntu
cd /data/local/dev/ubuntu

Unpack the file then move it somewhere else (so you still have it as a backup):

unsquashfs filesystem.squashfs
mv filesystem.squashfs /data/local/dev/ubuntu/backup.filesystem.squashfs

Go in squashfs-root, add/modify as per your taste then recreate filesystem.squashfs:

cd /data/local/dev/ubuntu
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/target/casper/filesystem.squashfs

then reboot and use your LIVE USB.

Note: the above commands are part of squashfs-tools.

http://unix.stackexchange.com/questions/80305/mounting-a-squashfs-filesystem-in-read-write