Solved

USB mounts squashfs partition, need to make changes to file (write to squashfs)

Posted on 2014-10-04
6
350 Views
Last Modified: 2014-10-04
hi

i have a usb stick that has several partitions on it.

one if them is squashfs.

when i attach the usb stick it gets mounted automatically as /dev/sdc7

now i need to make changes to one of the files in the squasfs partition

how can I do that (as it not possible to directly mount or remount squashfs as rw)

thanks
0
Comment
Question by:netslt
  • 3
  • 3
6 Comments
 
LVL 61

Expert Comment

by:gheist
ID: 40361289
squashfs is read-only by design
you must mount it, then copy everything with permissions to better place
and re-create new squashfs.
0
 

Author Comment

by:netslt
ID: 40361334
i know it is r only, i am looking for a workaround....

so when i copy all the files drom the partition, make changes and create the squashfs again - how do i replace the existing partition with the new squashfs file?

i see no "file" on the stick - so how exactly do i have to proceed?

thanks again
0
 
LVL 61

Expert Comment

by:gheist
ID: 40361354
You need to use "dd" command to transfer squashfs file to (not mounted) disk partition
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:netslt
ID: 40361559
can you pls explain more in detail or give me sample for the commands necessary?

thanks
0
 
LVL 61

Accepted Solution

by:
gheist earned 500 total points
ID: 40361574
It is a single command... There is nothing to detail
mkdir whatever
cd whatever
unsquashfs /dev/sdb4
(do your changes)
mksquashfs squash.new .
dd if=squash.new of=/dev/sdb4
0
 

Author Comment

by:netslt
ID: 40361710
I'll try that - thank you very much
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now