site  contact  history  index

Fix snapshots not saving /var

January 28, 2025 — BarryK

The problem was reported by Caramel, discussed here:

https://forum.puppylinux.com/viewtopic.php?t=13700

Some parts of /var are not to be snap-shotted, some are. Github fix:

https://github.com/bkauler/woofq/commit/fe9eee658069a0c18bd15ee2b777ce8f94bda1dd

...hmm, I'm assuming mksquashfs will accept paths in the exclude file.  

Tags: easy

Firmware updated for 6.12.x kernel

January 28, 2025 — BarryK

There is a script that I use, /usr/local/firmware/extract-fw-all. I copy the script to a working area, then download latest firmware from https://gitlab.com/kernel-firmware/linux-firmware, then:

# tar -xf linux-firmware-main.tar.gz
# sync
# cp -a -f --remove-destination linux-firmware-main/* /usr/lib/firmware/
# sync
# ./extract-fw-all

# mkdir -p firmware_linux_all_k6p12-20250128/usr/lib
# cp -a fnd-firmware/lib/firmware firmware_linux_all_k6p12-20250128/usr/lib/

took out some big firmware, to firmware_linux_extra_k6p12-20250128

# dir2pet firmware_linux_all_k6p12-20250128

The PET is 110MB, very big. The previous one, used in Easy Scarthgap and Daedalus, is 103MB.  

Tags: easy

Hopeful fix fstrim on USB SSD

January 28, 2025 — BarryK

I posted about compiling the kernel 6.12.11 with change to hopefully support TRIM over USB:

...there is also a link to forum discussion.

After more reading, I have devised code in the 'init' script in the initrd, that intends to detect if a USB SSD supports TRIM, then enables usage of fstrim. This is the modified code:

###execute TRIM on ssd###
TRIMflg=''
if [ "$WKG_FS" == "ext4" ];then #200302 200621 now have full hdparm.
#20250127 discard_granularity test not work 6.12.x kernel...
#TESTdiscard="$(cat /sys/block/${WKG_DRV}/queue/discard_granularity 2>/dev/null)"
TESTdiscard="$(cat /sys/block/${WKG_DRV}/queue/discard_max_bytes 2>/dev/null)"
if [ -n "$TESTdiscard" ];then
if [ "$TESTdiscard" != "0" ];then
TRIMflg='1'
fi
fi
#20250128 hdparm detect and CONFIG_USB_UAS kernel now maybe can run fstrim...
if [ "$TESTdiscard" == "0" ];then
hdparm -I /dev/${WKG_DRV} | grep 'Data Set Management TRIM supported'
if [ $? -eq 0 ];then
#fstrim may still not work, depends if usb interface supports usb-attached-scsi
#ref: https://askubuntu.com/questions/860618/fstrim-on-external-ssd-drives-dont-work
#ref: https://www.jeffgeerling.com/blog/2020/enabling-trim-on-external-ssd-on-raspberry-pi
#figuring out my own method, this matches scsi number to drive:
T1="$(ls -d -1 /sys/bus/scsi/drivers/sd/*/block/${WKG_DRV} | head -n 1)"
#ex: /sys/bus/scsi/drivers/sd/6:0:0:0/block/sdb
if [ -n "$T1" ];then
T2="$(echo -n "$T1" | rev | cut -f 3 -d '/' | rev)" #ex: 6:0:0:0
T3="$(find /sys/devices/ -path "*/scsi_disk/${T2}/*" -name provisioning_mode)"
#ex: /sys/devices/pci0000:00/0000:00:14.0/usb2/2-4/2-4:1.0/host6/target6:0:0/6:0:0:0/scsi_disk/6:0:0:0/provisioning_mode
if [ -n "$T3" ];then
T4="$(cat "$T3")"
if [ "$T4" == "full" ];then
echo unmap > $T3
#ex: this changes /sys/block/sdb/queue/discard_max_bytes from 0 to 4294966784
fi
#test again...
TESTdiscard="$(cat /sys/block/${WKG_DRV}/queue/discard_max_bytes 2>/dev/null)"
if [ "$TESTdiscard" != "0" ];then
TRIMflg='1'
fi
fi
fi
fi
fi
fi
export TRIMflg #read in /sbin/fscheck

Now, if the USB interface supports USB-attached-SCSI-protocol (UASP), then hopefully fstrim will work after doing the above.  

Tags: easy

Kernel 6.12.11 compiled on Easy Scarthgap

January 28, 2025 — BarryK

Easy Scarthgap 6.5.6 has the 6.12.10 kernel. I have compiled 6.12.11, making these two changes (bold):

# USB Host Controller Drivers
#
CONFIG_USB_C67X00_HCD=y
CONFIG_USB_XHCI_HCD=y
# CONFIG_USB_XHCI_DBGCAP is not set
CONFIG_USB_XHCI_PCI=y
CONFIG_USB_XHCI_PCI_RENESAS=y


# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
# also be needed; see USB_STORAGE Help for more info
#
CONFIG_USB_STORAGE=y
# CONFIG_USB_STORAGE_DEBUG is not set
CONFIG_USB_STORAGE_REALTEK=y
CONFIG_REALTEK_AUTOPM=y
CONFIG_USB_STORAGE_DATAFAB=y
CONFIG_USB_STORAGE_FREECOM=y
CONFIG_USB_STORAGE_ISD200=y
CONFIG_USB_STORAGE_USBAT=y
CONFIG_USB_STORAGE_SDDR09=y
CONFIG_USB_STORAGE_SDDR55=y
CONFIG_USB_STORAGE_JUMPSHOT=y
CONFIG_USB_STORAGE_ALAUDA=y
CONFIG_USB_STORAGE_ONETOUCH=m
CONFIG_USB_STORAGE_KARMA=m
CONFIG_USB_STORAGE_CYPRESS_ATACB=y
CONFIG_USB_STORAGE_ENE_UB6250=y
CONFIG_USB_UAS=y

The first change was due to I read somewhere that a USB3 interface, with a Renesas chip, was being treated as USB2 only, and enabling this fixed it.

The second change is in response to discussion here:

https://forum.puppylinux.com/viewtopic.php?t=13709

...but I still don't know how that helps to detect if a USB SSD supports trim.

I recently compiled 6.12.10 kernel for Easy Daedalus, see blog post:

...and will leave it at that.    

Tags: easy

OpenEmbedded Scarthgap revision-4 compile

January 27, 2025 — BarryK

This is a complete recompile in my fork of OpenEmbedded/Yocto of the packages used to build EasyOS Scarthgap-series. This is based upon OE/Yocto release 5.0.6:

https://wiki.yoctoproject.org/wiki/Releases

Which I have named "revision-4", and all the binary packages have "-r4" in their name, for example "acpid-2.0.34-r4-nocona-64.tar.xz". The current release of EasyOS, 6.5.6, is built with "revision-3" build in OE, which is based on the Yocto 5.0.4 release. Here are the package version changes r3 to r4:

chromium-x11     131.0.6778.85 131.0.6778.139
expat 2.6.3 2.6.4
flatpak 1.15.6 1.15.8
go 1.22.6 1.22.8
libgsf 1.14.52 1.14.53
librsvg 2.57.1 2.58.2
libstd-rs 1.75.0 1.80.1
libxml2 2.12.8 2.12.9
mbedtls 3.6.1 3.6.2
openvpn 2.6.10 2.6.12
orc 0.4.39 0.4.40
php 8.2.20 8.2.26
pup-tools 20221101 20250115
python3 3.12.6 3.12.8
python3-django 5.0.9 5.0.10
python3-lxml 5.0.0 5.0.2
python3-requests 2.31.0 2.32.3
python3-tornado 6.4 6.4.2
python3-urllib3 2.2.1 2.2.2
python3-werkzeug 3.0.3 3.0.6
qemu 8.2.3 8.2.7
sip 6.8.3 6.8.6
sqlite3 3.45.1 3.45.3
systemd-boot 255.4 255.13
tzdata 2024a 2024b
vim 9.1.0698 9.1.0764
xserver-xorg 21.1.13 21.1.14

Chromium needs special mention, as we were stuck, the Chromium developers upped the minimum required rust version from 1.75 to 1.80. The OE/Yocto Scarthgap release only has the former. The guys though, have a way around this, with something called a "meta-lts-mixins" layer, see here:

https://git.yoctoproject.org/meta-lts-mixins

...what that means practically, is that this has backported rust 1.80.1 to Scarthgap. See my post here:

https://github.com/OSSystems/meta-browser/pull/863#issuecomment-2615264822   

Tags: easy

Fix for version depth limit

January 25, 2025 — BarryK

Alfons discovered a little bug. He sent me a snapshot of Easy Version Control (in the Filesystem menu), showing that the depth-limit is 5, yet there are now 6 versions. In other words, when he updated to Scarthgap 6.5.6, it was the 6th, so the oldest version, 6.4.4, should have been deleted.

The cause was that /var/local/version-history-depth did not exist. This is read by the 'init' script in the initrd, but if the file doesn't exist then depth calculation will be messed up.

File /var/local/version-history-depth only gets created when Easy Version Control is run, and it looks like Alfons had never run it before. And of course the session has to be saved after running Easy Version Control.

I fixed it in the 'init' script by creating it if it doesn't exist, and assigning a default of "5".    

Tags: easy

Linux kernel 6.12.10 compiled in Easy Daedalus

January 24, 2025 — BarryK

I posted about compiling 6.12.10 for Easy Scarthgap:

...as well as the droidcam v4l2loopback-dc.ko and broadcom wl.ko kernel modules.

Ditto for Easy Daedalus.

Also have now compiled the NVIDIA 565.77 kernel modules and packaged as an SFS (installable vis SFSget), for both Scarthgap and Daedalus.

The next release of Daedalus will have the 6.12.10 kernel. Ongoing for both, now using the 6.12.x kernel.    

Tags: easy

Fix partition icons redraw every bootup

January 23, 2025 — BarryK

You have probably noticed this. When the desktop starts up, some of the partition icons get redrawn, some don't. The internal drive sd* partitions do not, the internal nvme* partitions do get redrawn, as do any USB partitions.

The internal nvme* parttions icons do not need to be redrawn, as they are always there, and the device name will not change.

This bug has been there since 2018! That's how long it has taken me to fix it. This morning decided, about time to fix it, so did. It makes the startup a bit faster.

Here is the commit:

https://github.com/bkauler/woofq/commit/f6ce712ec207bb8c3f67e7c6454c3d674950fbd4  

...it was just a stray space character making two strings unequal when they should have been equal.    

Tags: easy