This commit is contained in:
gferg 2008-07-25 16:20:47 +00:00
parent ee92aa5778
commit 3f72848762
9 changed files with 115 additions and 128 deletions

View File

@ -302,7 +302,7 @@ How to reject junk mail in incoming SMTP transactions. </Para>
SquashFS-HOWTO</ULink>,
<CiteTitle>SquashFS HOWTO</CiteTitle>
</Para><Para>
<CiteTitle>Updated: Jan 2008</CiteTitle>.
<CiteTitle>Updated: Jul 2008</CiteTitle>.
Describes the usage of SquashFS - a highly-compressed
file system for Linux, which is intended for use in tiny/embedded
Linux systems, as well as for read-only archiving and general

View File

@ -4261,7 +4261,7 @@ describes some of the available software. </Para>
SquashFS-HOWTO</ULink>,
<CiteTitle>SquashFS HOWTO</CiteTitle>
</Para><Para>
<CiteTitle>Updated: Jan 2008</CiteTitle>.
<CiteTitle>Updated: Jul 2008</CiteTitle>.
Describes the usage of SquashFS - a highly-compressed
file system for Linux, which is intended for use in tiny/embedded
Linux systems, as well as for read-only archiving and general

View File

@ -896,7 +896,7 @@ been deleted. </Para>
SquashFS-HOWTO</ULink>,
<CiteTitle>SquashFS HOWTO</CiteTitle>
</Para><Para>
<CiteTitle>Updated: Jan 2008</CiteTitle>.
<CiteTitle>Updated: Jul 2008</CiteTitle>.
Describes the usage of SquashFS - a highly-compressed
file system for Linux, which is intended for use in tiny/embedded
Linux systems, as well as for read-only archiving and general

View File

@ -8,6 +8,7 @@
<!ENTITY chapter3 SYSTEM "chapter3.xml">
<!ENTITY chapter4 SYSTEM "chapter4.xml">
<!ENTITY chapter5 SYSTEM "chapter5.xml">
<!ENTITY chapter6 SYSTEM "chapter6.xml">
]>
@ -22,8 +23,8 @@
<othername>I.</othername>
<surname>Pavlov</surname>
<affiliation>
<orgname><ulink url="http://artemiolabs.com/">ArtemioLabs</ulink></orgname>
<address><email>ap (at) artemio (dot) net</email></address>
<orgname><ulink url="http://www.sinevibes.com/">Sinevibes</ulink></orgname>
<address></address>
</affiliation>
</author>
@ -33,7 +34,7 @@
<othername></othername>
<surname>Cecchetti</surname>
<affiliation>
<address><email>mrc (dot) ildp (at) gmail (dot) com</email></address>
<address><email>mrc (dot) ildp (dot) com</email></address>
</affiliation>
</author>
</authorgroup>
@ -75,7 +76,14 @@
</abstract>
<revhistory>
<revision>
<revnumber>1.9</revnumber>
<date>2008-07-24</date>
<authorinitials></authorinitials>
<revremark>Text corrections.
</revremark>
</revision>
<revision>
<revnumber>1.8</revnumber>
<date>2008-01-06</date>
@ -157,5 +165,6 @@
&chapter3;
&chapter4;
&chapter5;
&chapter6;
</article>

View File

@ -42,36 +42,36 @@ parameter is different in these release trees, it will be written as follows:
<itemizedlist>
<listitem>Data, inodes and directories are compressed
</listitem>
<listitem><para>Data, inodes and directories are compressed
</para></listitem>
<listitem>SquashFS stores full uid/gids (32 bits), and file creation time
</listitem>
<listitem><para>SquashFS stores full uid/gids (32 bits), and file creation time
</para></listitem>
<listitem>Files up to 2^64 bytes are supported; file systems can be up to 2^64 bytes
</listitem>
<listitem><para>Files up to 2^64 bytes are supported; file systems can be up to 2^64 bytes
</para></listitem>
<listitem>Inode and directory data are highly compacted, and packed on byte
<listitem><para>Inode and directory data are highly compacted, and packed on byte
boundaries; each compressed inode is on average 8 bytes in length
(the exact length varies on file type, i.e. regular file, directory,
symbolic link, and block/character device inodes have different sizes)
</listitem>
</para></listitem>
<listitem>SquashFS can use block sizes up to up to 64 Kb (2.x) and 1Mb (3.x). The default size is 128Kb (3.x), which achieves
<listitem><para>SquashFS can use block sizes up to up to 64 Kb (2.x) and 1Mb (3.x). The default size is 128Kb (3.x), which achieves
greater compression ratios than the normal 4K block size
</listitem>
</para></listitem>
<listitem>By the 2.x release it was introduced the concept of <emphasis>fragment blocks</emphasis>:
<listitem><para>By the 2.x release it was introduced the concept of <emphasis>fragment blocks</emphasis>:
an ability to join multiple files smaller than block size into a single
block, achieving greater compression ratios
</listitem>
</para></listitem>
<listitem>File duplicates are detected and removed
</listitem>
<listitem><para>File duplicates are detected and removed
</para></listitem>
<listitem>Both big and little endian architectures are supported; SquashFS can
<listitem><para>Both big and little endian architectures are supported; SquashFS can
mount file systems created on different byte-order machines
</listitem>
</para></listitem>
</itemizedlist>
@ -90,21 +90,21 @@ consists of the following steps:
<orderedlist>
<listitem>Patching and recompiling the target Linux kernel to enable SquashFS support
</listitem>
<listitem><para>Patching and recompiling the target Linux kernel to enable SquashFS support
</para></listitem>
<listitem>Compiling the <command>mksquashfs </command> and the <command>unsquashfs </command> tools
</listitem>
<listitem><para>Compiling the <command>mksquashfs </command> and the <command>unsquashfs </command> tools
</para></listitem>
<listitem>Creating a compressed file system with <command>mksquashfs</command>
</listitem>
<listitem><para>Creating a compressed file system with <command>mksquashfs</command>
</para></listitem>
<listitem>Testing: mounting a squashed file system to a temporary location
</listitem>
<listitem><para>Testing: mounting a squashed file system to a temporary location
</para></listitem>
<listitem>Modifying the <filename>/etc/fstab </filename> or startup scripts of
<listitem><para>Modifying the <filename>/etc/fstab </filename> or startup scripts of
your target Linux system to mount the new squashed file system when needed
</listitem>
</para></listitem>
</orderedlist>

View File

@ -88,7 +88,7 @@ will be given relative to <filename>/usr/src/linux</filename>.</para>
</sect3>
<sect3 id="2.6.x">
<sect3 id="compiling1">
<title>Compiling a 2.6.x kernel</title>
@ -108,32 +108,32 @@ will be given relative to <filename>/usr/src/linux</filename>.</para>
<orderedlist>
<listitem>
<listitem><para>
In the <quote><emphasis>File systems</emphasis></quote> section,
<quote><emphasis>Miscellaneous file systems</emphasis></quote> subsection, enable
the <quote><emphasis>Squashed filesystem</emphasis></quote> option, whether as
module or bundled with the kernel. It is only obligatory to compile SquashFS inside
the kernel if you plan using squashed initial RAM disks (<command>initrd</command>).
</listitem>
</para></listitem>
<listitem>
<listitem><para>
In the same subsection, <command>"do NOT"</command> enable the <quote><emphasis>Additional option for memory-constrained system</emphasis></quote>, unless
you are configuring your kernel for an embedded system.
</listitem>
</para></listitem>
<listitem>
<listitem><para>
If you would like to use a squashed initial RAM disk, enable the
<quote><emphasis>Initial RAM disk support</emphasis></quote> in the
<quote><emphasis>Device drivers</emphasis></quote> section,
<quote><emphasis>Block devices</emphasis></quote> subsection.
</listitem>
</para></listitem>
<listitem>
<listitem><para>
If you want to be able to mount the squashed file system via a <emphasis>loopback device</emphasis> in future, you should enable
<quote><emphasis>Loopback device support</emphasis></quote> in the
<quote><emphasis>Device drivers</emphasis></quote> section,
<quote><emphasis>Block devices</emphasis></quote> subsection.
</listitem>
</para></listitem>
</orderedlist>
@ -145,7 +145,7 @@ If you want to be able to mount the squashed file system via a <emphasis>loopbac
</sect3>
<sect3 id="2.4.x">
<sect3 id="compiling2">
<title>Compiling a 2.4.x kernel</title>
@ -157,24 +157,24 @@ If you want to be able to mount the squashed file system via a <emphasis>loopbac
<orderedlist>
<listitem>
<listitem><para>
In the <quote><emphasis>File systems</emphasis></quote> section, enable
the <quote><emphasis>Squashed filesystem</emphasis></quote> option, whether as
module or bundled with the kernel. It is only obligatory to compile SquashFS inside
the kernel if you plan using squashed initial RAM disks (<command>initrd</command>).
</listitem>
</para></listitem>
<listitem>
<listitem><para>
If you would like to use a squashed initial RAM disk, enable the
<quote><emphasis>Initial RAM disk support</emphasis></quote> in the <quote><emphasis>Block
devices</emphasis></quote> section.
</listitem>
</para></listitem>
<listitem>
<listitem><para>
If you want to be able to mount the squashed file system via a <emphasis>loopback
device</emphasis> in future, you should enable <quote><emphasis> Loopback device
support </emphasis></quote> in the <quote><emphasis>Block devices </emphasis></quote> section.
</listitem>
</para></listitem>
</orderedlist>
@ -250,8 +250,8 @@ this means you have successfully enabled SquashFS in your kernel.
<title>Compiling the SquashFS tools</title>
<para>
Now you need to compile <command>mksquashfs</command> - the tool for creating squashed file systems and
<command>unsquashfs</command>, which extracts files from an existing squashed file system.
Now you need to compile <command>mksquashfs</command> - the tool for creating squashed file systems and the
<command>unsquashfs</command> which extracts files from an existing squashed file system.
</para>
<programlisting>
@ -278,7 +278,7 @@ If everything went fine, typing <command>mksquashfs</command> or <command>unsqua
<title>Installing SquashFS on Debian</title>
<para>If you use Debian (or another Linux distribution) you may want to get SquashFS module and tools from the distro repositories. With Debian you have to install the proper kernel module and the tools with the following commands:
<para>If you use Debian (or onother Linux distribution) you may want to get SquashFS module and tools from the distro repositories. With Debian you have to install the proper kernel module and the tools with the following commands:
</para>
<para>
@ -286,9 +286,7 @@ If everything went fine, typing <command>mksquashfs</command> or <command>unsqua
</para>
<programlisting>
bash# apt-get install squashfs-modules-2.6-486
bash# apt-get install squashfs-tools
bash# apt-get install squashfs-modules-2.6-486 squashfs-tools
</programlisting>
<para> Now load the squashfs module for the Linux kernel and if it was correctly loaded you should find it in the relative list
@ -304,7 +302,7 @@ If everything went fine, typing <command>mksquashfs</command> or <command>unsqua
</programlisting>
<para>
Then you have to add the squashfs module to /etc/modules file if you need it loaded at boot time.
Then you have to add the squashfs module to /etc/modules if you need it loaded at boot time.
</para>
<programlisting>
@ -312,7 +310,7 @@ Then you have to add the squashfs module to /etc/modules file if you need it loa
</programlisting>
<para>
Note that at the time of writing, the Debian packages (Etch. 4.0 r2) relates to squashfs 3.1 release. Some latest options and features of 3.3 release may be not supported. Look at the next section for details.
Note that at the time of writing, the Debian packages (Etch. 4.0 r2) relates to squashfs 3.1 release. Some latest options and features of 3.2 release may be not supported. Look at the next section for details.
</para>
</sect2>

View File

@ -20,14 +20,14 @@ systems. The general command-line format for <command>mksquashfs</command> is:
<itemizedlist>
<listitem><filename>source1</filename>, <filename>source2</filename>, etc.: files and directories to be
<listitem><para><filename>source1</filename>, <filename>source2</filename>, etc.: files and directories to be
added to the resulting file system, given with relative and/or absolute paths
</listitem>
</para></listitem>
<listitem><filename>destination</filename>: a regular file (filesystem
<listitem><para><filename>destination</filename>: a regular file (filesystem
image file), or a block device (such as <filename>/dev/fd0</filename> or <filename>/dev/hda3</filename>)
where you want to have your squashed file system
</listitem>
</para></listitem>
</itemizedlist>
@ -37,39 +37,39 @@ Notes for default <command>mksquashfs</command> behavior:
<itemizedlist>
<listitem>
<listitem><para>
When the new files are added to the new file system or appended to an existing one,
<command>mksquashfs </command> will automatically rename files with duplicate names:
if two or more files named <filename>text</filename> will appear in the same
resulting directory, the second file will be renamed to
<filename>text_1</filename>, third one to <filename>text_2</filename> and so on.
</listitem>
</para></listitem>
<listitem>
<listitem><para>
Duplicate files will be removed, so there will be only one physical instance
(By the SquashFS 2.x, you can disable the detection/removal of the duplicates
with the <command>-no-duplicates </command> option).
</listitem>
</para></listitem>
<listitem>
<listitem><para>
If <emphasis>destination </emphasis> has a pre-existing SquashFS
file system on it, by default, the new <emphasis>source</emphasis> items will be appended to
the existing root directory. Examine the options table below to force <command>mksquashfs </command> to overwrite the whole destination
and/or change the way new source items are added.
</listitem>
</para></listitem>
<listitem>
<listitem><para>
If a single source file or directory is given, it becomes the root in a newly created file system. If two
or more source files and/or directories are given, they will all become sub-items in the root of
the new file system.
</listitem>
</para></listitem>
<listitem>
<listitem><para>
The resulting filesystem will be padded to a multiple of 4 Kb: this
is required for filesystems to be used on block devices. If you are very sure
you don't need this, use the <command>-nopad </command> option to disable this
you don't ned this, use the <command>-nopad </command> option to disable this
operation.
</listitem>
</para></listitem>
</itemizedlist>
@ -260,7 +260,7 @@ and [name] directory will contain all pre-existing files/directories
<row>
<entry><command>-write-queue [size]</command></entry>
<entry>-write-queue [size] (3.x)</entry>
<entry>set output queue to [size] Mb (3.x)</entry>
</row>
<row>
@ -305,9 +305,9 @@ unsquashfs [options] target [files/directories to extract]
</programlisting>
<itemizedlist>
<listitem>
<listitem><para>
target is the squashed file system to extract.
</listitem>
</para></listitem>
</itemizedlist>
<para>
@ -316,20 +316,20 @@ Notes for <command>unsquashfs</command> behavior:
<itemizedlist>
<listitem>
Not specifying any <emphasis>destination path</emphasis>, unsquashfs extracts the compressed file system in the
<listitem><para>
By not specifying any <emphasis>destination path</emphasis>, unsquashfs extracts the compressed file system in the
<emphasis>./squashfs-root </emphasis> directory.
</listitem>
</para></listitem>
<listitem>
<listitem><para>
The tool does not extract a squashed file system on already exsisting directory
unless the <command>-f</command> option is specified.
</listitem>
</para></listitem>
<listitem>
<listitem><para>
You can specify on the command line, a multiple number of files/directories to extract and the items
to be extracted can be also be given in a file with <command>-e [file]</command> option.
</listitem>
</para></listitem>
</itemizedlist>
@ -393,7 +393,7 @@ All possible options for <command>unsquashfs</command> are shown in the table be
<row>
<entry><command>-s[tat]</command></entry>
<entry>display file system's superblock informations (it can discover the file system version and the options used to compress it - 3.3)</entry>
<entry>display file system's superblock informations (it can discover the file system version and the options used to compress it) (3.3)</entry>
</row>
<row>
@ -402,7 +402,7 @@ All possible options for <command>unsquashfs</command> are shown in the table be
</row>
<row>
<entry><command>-r[egex] </command></entry>
<entry><command>-r[egex]</command></entry>
<entry>treat extract names as POSIX regular expressions (3.3)</entry>
</row>
</tbody>

View File

@ -291,18 +291,18 @@ will be used in live CDs (just as an example). For this purpose SquashFS is also
<orderedlist>
<listitem>
<listitem><para>
Enable SquashFS in the linux kernel of the target system
</listitem>
</para></listitem>
<listitem>
<listitem><para>
Create a squashed root file system
</listitem>
</para></listitem>
<listitem>
<listitem><para>
Modify the <filename>/etc/fstab</filename> or startup scripts of the target system
to mount the squashd file system when you need it
</listitem>
</para></listitem>
</orderedlist>
@ -326,7 +326,7 @@ for these exclusions).
<para>
As mentioned, another interesting use for <command>SquashFS</command> is with <command>Unionfs</command> filesystem, which
provides <emphasis>copy-on-write</emphasis> semantics for the read-only file systems, enahancing the possibilities. (For unionfs you can
look at <ulink url="http://www.filesystems.org/project-unionfs.html">http://www.filesystems.org/project-unionfs.html</ulink>, the Project site)
look at <ulink url="http://www.filesystems.org/project-unionfs.html">http://www.filesystems.org/project-unionfs.html</ulink>)
</para>
<para>
@ -360,7 +360,7 @@ bash# mount -t unionfs -o dirs=rw.fs=rw:/mnt=ro unionfs user1
</programlisting>
<para>
As you can see now you can apparently create new files in /home/user1.
As you can see, now you can create new files in /home/user1.
</para>
<programlisting>
@ -384,7 +384,7 @@ bash# ls /home/rw.fs
</programlisting>
<para>
You can see that the new <filename>file1</filename> was created in <filename>/home/rw.fs</filename> that's the phisical location of the real writeble <filename>branch</filename> of the "merged" file system.
You can see that the new <filename>file1</filename> was created in <filename>/home/rw.fs</filename>
</para>
<para>
@ -426,7 +426,7 @@ at boot time.
/home/ro.fs /mnt squashfs loop 0 0
unionfs /home/user1 unionfs dirs=/home/rw.fs=rw:/mnt=ro 0 0
</programlisting>
</sect2>
</sect2>
</sect1>

View File

@ -10,57 +10,37 @@ I would like to express my sincere thanks and immeasurable respect to:
<itemizedlist>
<listitem>
<listitem><para>
Phillip Lougher - for his brilliant work under squashfs, for creating an exculsive
patch for linux-2.4.18, for his help with polishing this howto and answers to my mails
</listitem>
</para></listitem>
<listitem>
<listitem><para>
Tabatha Marshall at TLDP for helping me with bringing this HOWTO to the final 1.0 release
</listitem>
</para></listitem>
<listitem>
<listitem><para>
Everybody at <ulink url="http://www.tldp.org">The Linux Documentation Project</ulink> for
their great work under all the HOWTOs and guides that helped me a lot with exploring and
hacking Linux
</listitem>
</para></listitem>
<listitem>
<listitem><para>
All those at the TLDP mailing lists who helped me with getting started
</listitem>
</para></listitem>
<listitem>
<listitem><para>
Endless thanks and respect to everybody who develops open-source software
</listitem>
</para></listitem>
</itemizedlist>
<para>Artemiy I. Pavlov</para>
<para>
Artemiy I. Pavlov
</para>
I want to thank Artemiy for his patience answering my emails, allowing me to work to this howto. I would express also my thanks and respect to everybody who is involved in free software</para>
<para>Marco Cecchetti</para>
<para>
I want to thank Artemiy for his patience answering my emails allowing me to work to this howto.
I would express also my thanks and respect to everybody who is involved in free software.
</para>
<para>
Marco Cecchetti
</para>
</sect1>
<sect1 id="license">
<title>License</title>
<para>
This document may be used and distributed under the terms and conditions set forth in
the Open Content licence. In short, this means that you can freely modify and re-distribute
the HOWTO under the main condition that you keep the author and copyright the article along.
The full text of the licence is available at <ulink url="http://www.opencontent.org/opl.shtml">http://www.opencontent.org/opl.shtml</ulink>
</para>
</sect1>