-
Senior Member
registered user
As you have noticed, I tried out the idea of squashfs. Eversince, I have been using it without a single problem. There is actually no downside, but there are a few ( perhaps not very significant ) upsides. For summary, they are :-
1. stock kernel module (vs patched module ).
2. less virtual memory required.
3. slightly better compression.
To create the compress image, this is what I use :-
Code:
mksquashfs /mnt/knx/source/KNOPPIX /mnt/knx/master/KNOPPIX/KNOPPIX.sq -b 262144 -noappend
For comparison, this is what I use for cloop image :-
Code:
mkisofs -R -U -V "KNOPPIX.net filesystem" -publisher "KNOPPIX www.knoppix.net" \
-hide-rr-moved -cache-inodes -pad /mnt/knx/source/KNOPPIX \
| nice -5 /usr/bin/create_compressed_fs - 262144 > /mnt/knx/master/KNOPPIX/KNOPPIX
You notice that for both cases, I don't sort the files according to 'frequent use', but that does not mean it is not important. I just don't bother to do it.
Last but not least, I have modified the initrd.gz to mount squashfs accordingly :-
Code:
indknoppix(){
local dev
for dev in "$@"; do
[ -b "$dev" ] || continue
message -n -e "\r${CRE}${BLUE}${SEARCHINGFOR} $DISTRO in: ${MAGENTA}$dev${NORMAL} "
trymount "$dev" /mnt-system >/dev/null 2>&1 || continue
if [ -r /mnt-system/"$knoppix_dir"/KNOPPIX -o -r /mnt-system/"$knoppix_dir"/KNOPPIX.sq ]; then
message -e "\r${CRE}${GREEN}$DISTRO ${FOUNDAT}: ${MAGENTA}$dev${NORMAL} "
return 0
fi
umount /mnt-system
done
return 1
}
....
mountknoppix(){
local k dev dir count=0 RC=0
[ -b /dev/cloop ] || mknod m 644 /dev/cloop b 240 0
[ -f /mnt-system/"$knoppix_dir"/modules/squashfs.ko ] && \
insmod /mnt-system/"$knoppix_dir"/modules/squashfs.ko
[ -d /sys/module/cloop ] || insmod /mnt-system/"$knoppix_dir"/modules/cloop.ko preload=32 || return 2
[ -d /sys/module/aufs ] || insmod /mnt-system/"$knoppix_dir"/modules/aufs.ko || return 3
if checkbootparam squashfs && [ -f /mnt-system/"$knoppix_dir"/[Kk][Nn][Oo][Pp][Pp][Ii][Xx].[Ss][Qq] ]
then
mount -o loop=/dev/loop1 /mnt-system/"$knoppix_dir"/[Kk][Nn][Oo][Pp][Pp][Ii][Xx].sq /KNOPPIX
elif [ -f /mnt-system/"$knoppix_dir"/[Kk][Nn][Oo][Pp][Pp][Ii][Xx].[Ss][Qq] -a \
! -f /mnt-system/"$knoppix_dir"/[Kk][Nn][Oo][Pp][Pp][Ii][Xx] ]
then
mount -o loop=/dev/loop1 /mnt-system/"$knoppix_dir"/[Kk][Nn][Oo][Pp][Pp][Ii][Xx].sq /KNOPPIX
else
for k in /mnt-system/"$knoppix_dir"/[Kk][Nn][Oo][Pp][Pp][Ii][Xx] \
/mnt-system/"$knoppix_dir"/[Kk][Nn][Oo][Pp][Pp][Ii][Xx][0-9]; do
.....
I retained the cloop booting capability for comparison purposes. When both images are present, I use a cheatcode to select the preferred one. It was kind of elaborate but now I can safely say, it is unnecessary to retain the cloop image at all.
Have fun.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
New Precision DWDM SFP+ 10G 80km Tunable Transceiver 50GHz C-Temp DWDM-SFP10G-C
$90.00
SFP-10G-SR CISCO 10G SR SFP+ C-CLASS TRANSCEIVER 10 PACK
$99.00
Lot (10) Dell 0N8TDR 850nm SFP-10G-SR-85C 10Gbs sfp+ FTLX8574D3BNL-FC N8TDR NEW
$68.00
New Cisco w/ Green Hologram SFP-25G-SR-S 25G SFP28 SR 850nm 300m LC MMF Module
$64.39
ProLabs 10GBase-TX SFP+ RJ-45 Copper Transceiver Module P/N: SFP-10GBASE-T-C NEW
$34.99
CISCO SFP-10G-LR SFP TRANSCEIVER MODULE GBIC 10G 10GB SFP - 1 Year Warranty
$39.99
Genuine Cisco SFP-10G-SR Transceiver Module (10-2415-03)
$5.85
New Sealed Cisco GLC-LH-SMD 1000BASE-LX/LH SFP Transceiver Module *US Shipping*
$9.50
10 PCS Cisco GLC-LH-SMD 10-2625-01 1310nm SFP Transceiver Module
$85.00
CVR-QSFP-SFP10G Cisco 40G QSFP+ to 10G SFP+ Adapter Modules 74-9474-02 V01 V02
$74.99