-
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
WD HDD Ultrastar DC HC520 HUH721212AL4205 12TB 3.5" SAS Server Hard Disk Drive
$45.01
Seagate ST8000NM0055 8TB 7200RPM 256MB SATA 6.0 Gb/s 3.5" Enterprise Hard Drive
$41.38
HITACHI HUS724040ALA640 4TB 7200RPM 64MB SATA 6.0Gb/s 3.5" HARD DRIVE ZERO HOURS
$52.00
Seagate ST12000NM0127 12TB SATA 6Gb/s 256MB 7200RPM 3.5" Enterprise Hard Drive
$99.99
HGST Ultrastar DC HC520 12TB SATA 6Gb 256MB 3.5" Enterprise HDD- HUH721212ALE601
$89.99
HGST Ultrastar HE10 10TB SATA 6.0Gb/s 7200 3.5" Datacenter HDD - HUH721010ALE601
$79.99
Seagate ST12000NM0127 12TB 256MB 7200RPM 3.5" SATA 6.0Gb/s Enterprise Hard Drive
$87.99
WD Ultrastar DC HC530 14TB SATA 6G 3.5" 7200RPM Enterprise HDD - WUH721414ALE604
$109.00
Seagate ST1000VM002 1TB 64MB SATA6Gb/s 3.5" (Low Power) Hard Drive -PC, CCTV DVR
$24.99
1TB HDD/SSD 2.5" SATA Hard Drive for Laptop with Win 10/Win 11 Pro Pre-installed
$44.55