Would be nice to see an alterante method for using squashfs in the remastering how-to.
since one changes the kernel very often on remastering,then why not switch to squashfs instead of cloop ;running time are quite similar ,compression is a bit better (5%) and one is no more
dependent on this "version-kernel-cloop" problem.A squashfs image can be read by any kernel-squashfs-vanilla.
There is only 2 lines to replace by 1 line in miniroot.gz to reflect
mounting loopback image.sqfs instead of image.cloop
(see Armando's PrometeusX.iso)
Get squashfs -2.0 from Philip Lougher at sfnet.
It works beautifully .(see physicstools-1.3-sqfs-us.iso )
Would be nice to see an alterante method for using squashfs in the remastering how-to.
KnoppixRemastering-with-squashfs-guidance.
Foreword.
This is not a howto ;there are so many good knoppixremasteringhowto around ,so I only discuss the main points with enough details so anyone could
switch from cloop-to-squashfs remastering.
Introduction.
Let me put aside zisofs,zftree ,but only give here a comparison of cloop and squashfs :compression ratio and runtime .Let me call
knoppix.clp the usual knoppix image obtained with cloopcompress the isofile (or mkiso piped thru createcompressfs )
knoppix.sqf the knoppix image of the same structure using mksquashfs.
compression ratio sqfs 689655Kb in 34 minutes
cloop 729163Kb in 43.7minutes (a small gain of 5% and 10 min in favor of sqfs ) Source=2082Mb
runtime
In order to avoid errors induced by bad behaviour of cdrom-reading (aleas due to dust ,mechanics & feedback-control )the runtime measures are
done directly on running knoppix-image sitting on hard drive in both compression cases .In both cases mkzftree of a huge /usr is measured.
runtime-sqfs 27min25s (985.3Mb/1769Mb)
runtime-cloop 27min59s (985Mb/1785Mb)
Almost no difference in runtime.So we must consider other factors to favor the one or the other.
The cloop are compiled in modules ,so don't touch the kernel ;but in fact it is almost impossible -without too much contorsion if ever possible-to mount
the clooped image with another-version-kernel.One needs to boot with the same-version-numbered-kernel to be able to insmod cloop !
The squashfs has to be compiled with patched kernel ;but any other-version-patched-kernel can "mount loopback" the image.Now,each time one changes
the kernel,one needs at least patch modifying the cmdline-length from 256 to 512 characters (a line in /linux/include/asm-i386/setup.h ) to keep
Klaus'idea of having a flexible command line .For amateur-developer-remastering the last solution makes life easy !
Philosophy
To switch from cloop to squashfs just replace the make-image. and of course the loopback mount the image during booting phase
Requirements
1 Get the kernel and the squashfs patch (squashfs.sourcefore.net ; latest version 2.0-alpha) .Modify setup.h as said ,patch with squashfs,compile.
compile the "mksquashs-tools" directory to get the binary "mksquashfs" and put in /usr/bin .
2 Get a copy of /KNOPPIX to some /remaster ;replace in /remaster the following directories to reflect the new kernel
/boot /lib/modules/2.6.x /usr/src/linux-2.6.x (this is standard kernel playing game ) and any eventual add/remove apps !
3 create the image: mksquashfs /remaster /outside-remaster-dir/knoppix
This line replaces the mkisofs ...| create_compressed_fs ...>knoppix.
4 modify linuxrc (from miniroot.gz or initrd.gz ) by commenting out the lines
(after scsi driver,at the paragraph "try to find cdrom" )
#insmod -f /modules/cloop.*o file=/cdrom/KNOPPIX/KNOPPIX
#mountit /dev/cloop /KNOPPIX "-o ro" || FOUND_KNOPPIX=""
insert there a line
mount /cdrom/KNOPPIX/KNOPPIX /KNOPPIX -o loop ,ro || FOUND_KNOPPIX=""
This mounts the image as squashfs tree.The rest is independant of compression mechanism.
Do not forget to change vmlinuz (new) when building the isocd.Some other version uses insmod cloop and losetup the loopback file ,it 's quite similar.
The Fun
By remaking the sqfs images of diferents knoppix-like-distro (cebit-3.4,quantian-openmosix,pollix,kurumin,physicstools...) with kernel-2.6.6 and put them
all in a /KNOPPIX ext2-directory ,I am able to boot any of them with just a boot-cd-15Mb and typing ...a label !
Have fun,
wangji
KnoppixRemastering-with-squashfs-guidance.
Foreword.
This is not a howto ;there are so many good knoppixremasteringhowto around ,so I only discuss the main points with enough details so anyone could
switch from cloop-to-squashfs remastering.
Introduction.
Let me put aside zisofs,zftree ,but only give here a comparison of cloop and squashfs :compression ratio and runtime .Let me call
knoppix.clp the usual knoppix image obtained with cloopcompress the isofile (or mkiso piped thru createcompressfs )
knoppix.sqf the knoppix image of the same structure using mksquashfs.
compression ratio sqfs 689655Kb in 34 minutes
cloop 729163Kb in 43.7minutes (a small gain of 5% and 10 min in favor of sqfs ) Source=2082Mb
runtime
In order to avoid errors induced by bad behaviour of cdrom-reading (aleas due to dust ,mechanics & feedback-control )the runtime measures are
done directly on running knoppix-image sitting on hard drive in both compression cases .In both cases mkzftree of a huge /usr is measured.
runtime-sqfs 27min25s (985.3Mb/1769Mb)
runtime-cloop 27min59s (985Mb/1785Mb)
Almost no difference in runtime.So we must consider other factors to favor the one or the other.
The cloop are compiled in modules ,so don't touch the kernel ;but in fact it is almost impossible -without too much contorsion if ever possible-to mount
the clooped image with another-version-kernel.One needs to boot with the same-version-numbered-kernel to be able to insmod cloop !
The squashfs has to be compiled with patched kernel ;but any other-version-patched-kernel can "mount loopback" the image.Now,each time one changes
the kernel,one needs at least patch modifying the cmdline-length from 256 to 512 characters (a line in /linux/include/asm-i386/setup.h ) to keep
Klaus'idea of having a flexible command line .For amateur-developer-remastering the last solution makes life easy !
Philosophy
To switch from cloop to squashfs just replace the make-image. and of course the loopback mount the image during booting phase
Requirements
1 Get the kernel and the squashfs patch (squashfs.sourcefore.net ; latest version 2.0-alpha) .Modify setup.h as said ,patch with squashfs,compile.
compile the "mksquashs-tools" directory to get the binary "mksquashfs" and put in /usr/bin .
2 Get a copy of /KNOPPIX to some /remaster ;replace in /remaster the following directories to reflect the new kernel
/boot /lib/modules/2.6.x /usr/src/linux-2.6.x (this is standard kernel playing game ) and any eventual add/remove apps !
3 create the image: mksquashfs /remaster /outside-remaster-dir/knoppix
This line replaces the mkisofs ...| create_compressed_fs ...>knoppix.
4 modify linuxrc (from miniroot.gz or initrd.gz ) by commenting out the lines
(after scsi driver,at the paragraph "try to find cdrom" )
#insmod -f /modules/cloop.*o file=/cdrom/KNOPPIX/KNOPPIX
#mountit /dev/cloop /KNOPPIX "-o ro" || FOUND_KNOPPIX=""
insert there a line
mount /cdrom/KNOPPIX/KNOPPIX /KNOPPIX -o loop ,ro || FOUND_KNOPPIX=""
This mounts the image as squashfs tree.The rest is independant of compression mechanism.
Do not forget to change vmlinuz (new) when building the isocd.Some other version uses insmod cloop and losetup the loopback file ,it 's quite similar.
The Fun
By remaking the sqfs images of diferents knoppix-like-distro (cebit-3.4,quantian-openmosix,pollix,kurumin,physicstools...) with kernel-2.6.6 and put them
all in a /KNOPPIX ext2-directory ,I am able to boot any of them with just a boot-cd-15Mb and typing ...a label !
Have fun,
wangji
wangji,
I struggle with the same problem the morphix people did. How do you mount back the squashfs filesystem if the version of ash does not support the "-o loop" option?
There is much more to be documented about the editing of the miniroot for each kernel as well as the changes in linuxrc.
Please can you elaborate a little bit more?
short answer : attach your image to the loopback device before mount ! I 've not tried morphix_remaster (will do for fun).so here is a
long answer:
On most knoppix-standard-version-3.3-like ,I just do this
if test -n "$FOUND_KNOPPIX" -a -f /cdrom/KNOPPIX/$IMAGE; then
# DEBUG
# echo "6" > /proc/sys/kernel/printk
#insmod -f /modules/cloop.o file=/cdrom/KNOPPIX/KNOPPIX
#mountit /dev/cloop /KNOPPIX "-o ro" || FOUND_KNOPPIX=""
mount /cdrom/KNOPPIX/$IMAGE /KNOPPIX -o loop,ro || FOUND_KNOPPIX=""
fi
-----most of them work ---
on peanut-9.6 ,which rather follow the jaco-Greef 's script-like
so ,do not have similarity with knoppix ,I just modify as follow:
original >
> mount -r -t iso9660 $drive /mnt/cd 2>/dev/null
> if [ -e /mnt/cd/peanut.clp ]
> then
> insmod /mnt/cd/cloop.o file=/mnt/cd/peanut.clp 2>/dev/null
> mount -r /dev/cloop /mnt/cdclp 2>/dev/null
---then modified as follow
for drive in `echo /dev/hd? /dev/hd?[1-9] /dev/hd?[1-9][0-9] /dev/scd? /dev/sr? /dev/sd?`
do
if ! mount -r -t ext3 $drive /mnt/tmp 2>/dev/null
then continue
elif [ -e /mnt/tmp/KNOPPIX/peanut.sqfs ]
then
umount /mnt/tmp
mount -r -t ext3 $drive /mnt/cd 2>/dev/null
if [ -e /mnt/cd/KNOPPIX/peanut.sqfs ]
then
# insmod /mnt/cd/cloop.o file=/mnt/cd/peanut.clp 2>/dev/null
losetup /dev/loop1 /mnt/cd/KNOPPIX/peanut.sqfs
mount -r -t squashfs /dev/loop1 /mnt/cdclp 2>/dev/null
----
and it works !
If by bad chance ,your "ash" do not understand
the command losetup ...(simply loopback not included on compile) you have to pick up from some other iso
if you don't want to compile busybox yourself.(not so hard)
HTH
Dell PowerEdge R730 2x E5-2699V3 2.3Ghz 36 Core 128GB RAM H730 X520-I350 2x750W
$329.99
Dell Poweredge R630 2x Xeon E5-2680 v4 2.4ghz 28-Cores / 128gb / H330 / 2x 1TB
$334.99
Dell Poweredge R730xd LFF 14-Bay 2U Server | Choose Your CPU & RAM Config
$489.99
Dell Poweredge R630 Server 2x E5-2620 V4 =16 Cores | S130 | 32GB RAM | 2x trays
$159.99
Dell PowerEdge R630 Server 2x E5-2680 V4 = 28 Cores S130 32GB RAM NEW 480GB SSD
$197.99
Dell PowerEdge R630 Server 2x E5-2640v3 2.60Ghz 16-Core 64GB H330
$182.65
1U Supermicro Server 10 Bay 2x Intel Xeon 3.3Ghz 8C 128GB RAM 240GB SSD 2x 10GBE
$259.00
Dell PowerEdge R720xd 26HDD 300gb 2.5-inch E5-2697 X 2CPU 384RAM 7.2 Tb HDD 
$180.00
1U Server ( 4x VM's ) Hosting VPS Short Depth 20" 1U Xeon 3.5Ghz 16GB X10SLM-F
$149.00
Dell PowerEdge T620 8-Bay LFF Xeon E5-2660 0 2.20GHz 48GB NO HDD S110 Server
$174.99