How to mount squashfs?

Booting, installing, newbie
Post Reply
Message
Author
folks
Posts: 24
Joined: Thu 13 Dec 2007, 07:18

How to mount squashfs?

#1 Post by folks »

Hello To every one..

I can mount squashsfs file sytem.. ..after mounting i cant able to write.. its in read only mode....but i copied into root... it shows error message...

So my objective.. i want to edit pup_300.sfs (script).. how to copy these file sytem ..and also to make squash file system.. how to do..?


Give a best solution for this.. [/b]

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#2 Post by muggins »

If you just want to mount a squashfs, add/delete/change some files, then recompress it:

mount -o loop /xxx.sfs /yyy
cp xxx.sfs xxx.sfs.bak #Back up your squashfile, just in case
mkdir /zzz
cp -rf /yyy/* /zzz
umount /yyy
Do whatever you want to files located in /zzz, then,
mksquashfs /zzz /xxx.sfs

Bruce B

#3 Post by Bruce B »

I've never had success with this command for mounting .sfs files, your mileage may differ:

mount -o loop /xxx.sfs /yyy

This is what I try, which usually works:

mount -o loop -t squashfs /xxx.sfs /yyy

In rare cases where the above fails, I set it up using losetup first.

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#4 Post by muggins »

Hi Bruce,

yes, I've seen you post elsewhere, wondering why people continue to use the first. My reasons are, a) it usually works & b) I'm terminally lazy, less keystrokes. (pun intended here!).

Oddly, I did have an episode where it stopped working for some reason then, probably after several reboots, decided to work again! I'm pretty sure that when it wasn't working, I tried -t squashfs, using mount-FULL etc, all to no avail. The only conclusion that I can draw is that I must have installed something that corrupted some system/library file. I should have been more meticulous in noting how I got it working again.

Bruce B

#5 Post by Bruce B »

Muggins,

That's why I said - your mileage may differ (vary).

Versions may vary.

I suppose you've noticed that 'mount' is getting pretty smart about recognizing file system types and the -t argument often not required.

What some may or may not have noticed is Puppy's mount command in 2.17 (at least) is actually a BK script and not the mount command at all. It works great, but I like to know what I'm running and in the case of running mount, I'm running one of Barry's scripts.

If I want to actually run the mount command itself, I'd have to type in mount-FULL

Bruce

Post Reply