Solved

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

Posted on 2014-10-04
6
362 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 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

785 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