?
Solved

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

Posted on 2014-10-04
6
Medium Priority
?
383 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 62

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 62

Expert Comment

by:gheist
ID: 40361354
You need to use "dd" command to transfer squashfs file to (not mounted) disk partition
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 

Author Comment

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

thanks
0
 
LVL 62

Accepted Solution

by:
gheist earned 2000 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.
Suggested Courses
Course of the Month10 days, 12 hours left to enroll

764 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