Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: ibug on February 05, 2012, 12:21:43 PM
-
is there any wai to mount one partition or one whole disk
in to one file not directory for example to compress it with mksquashfs
-
Filesystems are mounted onto directories.
Drives or partitions are not mounted. The filesystems they contain are.
You do not mount files.
mksquashfs makes a filesystem image from a source directory.
If you would explain exactly what you are trying to accomplish, perhaps someone can help you.
-
is there really no way to make SquashFS of partition
without copy it in to file
-
So you want to make a squashfs file without writing it to a file?
That makes no sense.
-
Hi ibug
This is straight from the info file of squashfs-tools-4.x.tcz:
mksquashfs directory/ filename.extensionname
The command has two options, a source directory, and a destination file. Since you insist on asking
vague questions rather than just saying what you are trying to accomplish, I can only presume you
are trying to compress an existing file system to get some more space on a hard drive. If that is the
case, then this is the wrong approach, squash file system is read only.
-
Hi ibug
This is straight from the info file of squashfs-tools-4.x.tcz:
mksquashfs directory/ filename.extensionname
The command has two options, a source directory, and a destination file. Since you insist on asking
vague questions rather than just saying what you are trying to accomplish, I can only presume you
are trying to compress an existing file system to get some more space on a hard drive. If that is the
case, then this is the wrong approach, squash file system is read only.
can use
--------
dd if=/dev/sda5 of=/mnt/sda6/dir/sda5.file.copy
mksquashfs /mnt/sda6/dir/ /mnt/sda6/another.dir/sda5.file.copy.sfs
--------
but need
--------
mksquashfs /dev/sda5 /mnt/sda6/another.dir/sda5.file.copy.sfs
--------
need to backup 80GB device with 78GB data
in to 30GB partition with compression
did use 7zip and it takes only 6GB from 30GB
but it do not compress those 2GB
which are needed for further data recovery with
double mount sfs then mount partition
and many search engine on it with out any writing to this partition
if 7z this partition
7zip can not be mount or read in real time
it can only decompress full 80GB
and creating ntfs compressed partition is not good for me
if you know everything now
how to mksquashfs /dev/*
-
Hi ibug
If I understand you correctly, you want to compress sda5, save it to sda6, mount the saved file
and read it. Try this:
mount /mnt/sda5
mount /mnt/sda6
mksquashfs /mnt/sda5 /mnt/sda6/another.dir/sda5.file.copy.sfs
sudo mkdir /mnt/squashed
mount /mnt/sda6/another.dir/sda5.file.copy.sfs /mnt/squashed -t squashfs -o loop
ls -l /mnt/squashed
-
As we learned from Roberts earlier post sfs's are not supported..
-
Hi coreplayer2
I saw that post too. Not knowing what it meant, I Googled linux sfs and came up with Secure File
System and a reference to extensions for Puppy Linux, so roberts may have meant one of those.
SFS also stands for squash file system which is used for packaging extensions.
-
Hi ibug
If I understand you correctly, you want to compress sda5, save it to sda6, mount the saved file
and read it. Try this:
mount /mnt/sda5
mount /mnt/sda6
mksquashfs /mnt/sda5 /mnt/sda6/another.dir/sda5.file.copy.sfs
sudo mkdir /mnt/squashed
mount /mnt/sda6/another.dir/sda5.file.copy.sfs /mnt/squashed -t squashfs -o loop
ls -l /mnt/squashed
but if you try
mksquashfs /mnt/sda5 /mnt/sda6/another.dir/sda5.file.copy.sfs
it create 4KB size sda5.file.copy.sfs file
with device or inode inside of it
not a data stream with MB or GB of data from partition or disk
As we learned from Roberts earlier post sfs's are not supported..
if you do not believe TinyCore support SquashFS4 mount'ing look in:
TinyCore-4.3rc1.iso
boot/core.gz
core.cpio
lib/modules/3.0.3-tinycore/kernel/fs/squashfs/squashfs.ko.gz
and inside of it kernel module named
squashfs.ko
it exist [how could this be] and it is not a blank file
aware and realize fact that every extensions in TC repository in
http://distro.ibiblio.org/tinycorelinux/4.x/x86/tcz/ (http://distro.ibiblio.org/tinycorelinux/4.x/x86/tcz/)
all *.tcz files are in fact SquashFS4 compressed File System
or if you do not believe TinyCore support creating SquashFS4 read
http://distro.ibiblio.org/tinycorelinux/4.x/x86/tcz/squashfs-tools-4.x.tcz.info (http://distro.ibiblio.org/tinycorelinux/4.x/x86/tcz/squashfs-tools-4.x.tcz.info)
or even download and install http://distro.ibiblio.org/tinycorelinux/4.x/x86/tcz/squashfs-tools-4.x.tcz (http://distro.ibiblio.org/tinycorelinux/4.x/x86/tcz/squashfs-tools-4.x.tcz)
and you can run
mksquashfs
-
Again, your arguments do not change your original question, or its answer.
-
I was assuming that you were using Puppy packages. If you are making extensions with .sfs then you are very likely not using the provided programs to access them. Perhaps manually? No one else seems to have your issues.
-
but if you try
mksquashfs /mnt/sda5 /mnt/sda6/another.dir/sda5.file.copy.sfs
/mnt/sda6 not /dev/sda6. You must mount the FS to be able to make a squashfs file out of it.
-
ok again
need to mksquashfs one partition in /dev/sda5 [as one file] in to one compressed file
you need to undestood [then mount sfs and then mount this one file which is inside]
and all without copying with dd
this do not work in any linux because mksquashfs compress original inode instead its data
mksquashfs /dev/sda5 /mnt/sda1/dir/sda5.sfs
this works but first require copy whole partition to another
dd if=/dev/sda5 of=/mnt/sda1/dir/sda5
mksquashfs /mnt/sda1/dir/sda5 /mnt/sda1/dir/sda5.sfs
and
if mount /dev/sda5 in to file /mnt/sda1/dir/sda5
and /mnt/sda1/dir/sda5 will be same size as /dev/sda5 is
then mksquashfs of this file will be possible and with inode is not possible
do you understand
or if device mapper like in crypt devices will work
-
I don't get why you want to avoid the mount. If you want a disk dump, squashfs has no advantage over gzip, since it's just compressing the single file - "dd if=/dev/sda5 | gzip > /mnt/sda1/dir/sda5" would work better.
So the main question is, do you want a disk dump, or a file dump?
-
I don't get why you want to avoid the mount. If you want a disk dump, squashfs has no advantage over gzip, since it's just compressing the single file - "dd if=/dev/sda5 | gzip > /mnt/sda1/dir/sda5" would work better.
So the main question is, do you want a disk dump, or a file dump?
first of all the gzip con not be mounted it need to be fully decompress to read last sector
mkSquashFS can use xz compression and can be mount
-
Hi ibug
OK, I'll try this again. Are you trying to open the drive as though it is one large file so you don't have
to go through directories and open individual files? That can be done without playing all these games.
Since you won't say exactly what you are trying to do or run, I'll give you a simple example that
demonstrates this.
Install less.tcz and enter less /dev/sda5 and if you have enough time you will see that you can
page through the entire drive as though it were one file.
-
I think there must be a communication or language barrier here..
if you do not believe TinyCore support SquashFS4 mounting look in:
Whatever gave the idea I did not believe??
ibug has made reference in many posts to sfs files which are commonly understood as Puppy SFS files. Until ibug explains otherwise how is anyone expected to read his mind?
ibug a lot of good folks here are more than willing to assist but nobody can read your mind. :) Please see the view from the other side, It's easy to get frustrated trying to help someone who will not help you to help them.