site  contact  history  index

Kernel 6.8.1 with btrfs fscrypt

March 16, 2024 — BarryK

I posted about 52 patches available to implement fscrypt in btrfs:

https://bkhome.org/news/202403/linux-kernel-btrfs-supports-fscrypt.html

I have compiled the 6.8.1 kernel with btrfs builtin (not as a module) and those 52 patches applied. The kernel also has both overlay and aufs builtin.

For anyone who wants them, those patches are in a tarball, available here (inside build-kernel.tar.gz):

https://distro.ibiblio.org/easyos/source/kernel/6.8.x/6.8.1-20240316/

Here is how I applied the patches:

if [ -f 3rd-party/filesystem/btrfs-fscrypt.tar.gz ];then
echo "btrfs fscrypt patch..."
cp -a -f 3rd-party/filesystem/btrfs-fscrypt.tar.gz temp1/
cd temp1
tar -xf btrfs-fscrypt.tar.gz
cd ..
cd linux-${KERNVER}
Psorted="$(find ../temp1/btrfs-fscrypt -type f -name '*.patch' | sort -n | tr '\n' ' ')"
for aP in ${Psorted}
do
patch -p1 < ${aP}
done
cd ..
rm -f temp1/btrfs-fscrypt.tar.gz
rm -rf temp1/btrfs-fscrypt
fi

...excessive "cd" operations, but it works.

The kernel was compiled in EasyOS Kirkstone-series version 5.7 and the PET is here:

https://distro.ibiblio.org/easyos/amd64/packages/pet/pet_packages-kirkstone/

...there is no broadcom-sta module for it, as it failed to compile.

Note, it you are running EasyOS, there is a bit more involved than just installing the PET. The PET is used in WoofQ when building EasyOS. Developers can, however, open up the PET and extract 'vmlinuz' and the modules, then manually change to use that kernel (it is at /boot/vmlinuz).    

Tags: quirky

Improved support for btrfs

March 15, 2024 — BarryK

I posted earlier today about compiling 'btrfs-progs' linked-statically, as I want to include the 'btrfs' utility in the initrd:

https://bkhome.org/news/202403/btrfs-progs-compiled-statically-in-oe.html

I will also have the 'btrfs-progs' package in the main filesystem.

using Gparted, I created a btrfs filesystem in a partition in a USB-stick, but the icon for the partition did not display on the desktop.

Hmmm... I have never worked with btrfs before, despite it being around for so many years, and the choice for root filesystem of some distros such as Fedora. I looked through the scripts and found out what was wrong. Fixes committed:

https://github.com/bkauler/woofq/commit/00505fe6ccfdd950d3d89d011afa2bbf9d868724

For anyone interested in reading more about btrfs:

https://btrfs.readthedocs.io/en/latest/   

Tags: easy

btrfs-progs compiled statically in OE

March 14, 2024 — BarryK

OpenEmbedded calls the package "btrfs-tools". I have compiled it linked statically with musl. Recipe:

https://github.com/bkauler/oe-qky-kirkstone/commit/ab75d7c484a76ab237354d53dcc5831d0999f984

It required that 'util-linux' had to be recompiled, to build libblkid.a and libuuid.a:

https://github.com/bkauler/oe-qky-kirkstone/commit/d1d43ecf7ee4eae89177d754bbc82e1f0f14156f

I know that the btrfs-progs git site has it available as a static binary; however, mine is smaller, and I want to use it in the initrd which is not compressed.   

Tags: oe

Linux kernel btrfs supports fscrypt

March 14, 2024 — BarryK

Well that was shortlived:

https://bkhome.org/news/202403/linux-kernel-680-with-bcachefs.html

What interested me in particular about bcachefs is file checksumming, encryption and compression.

I encountered problems with 'bcachefs-tools'; firstly, there doesn't seem to be a utility to resize the filesystem. Secondly and thirdly, it is written in rust, and has to link with a lot of shared libraries. I want to compile it statically, but that looks very difficult, or rather, the final binary will be enormous.

The 'bcachefs-tools' were originally written in C, about 6 years ago; however, the guy who took over maintaining it is a rust proponent. It looks like he is gradually porting it to rust. I find that annoying, when there are perfectly OK utilities written in C and a rust idealogue wants to turn them into difficult-to-compile and super-large binaries. And probably very dependent on the rust version to compile, as rust is still a moving target. Rant over.

However, while browsing online about filesystem encryption, I discovered that 'fscrypt' is being developed for btrfs. Not yet mainlined, currently at v5 patches:

https://lore.kernel.org/linux-btrfs/20240124195831.GA1212739@perftesting/T/#t

...I downloaded all 52 of them.

Fscrypt is particularly attractive to me, as it is the same per-folder native-filesystem encryption as in ext4. So I know how to use it.

Then, btrfs brings something to the table that ext4 lacks; read-write compression.

Btrfs is also far more mature than bcachefs, and the 'btrfs-progs' package includes ability to resize a filesystem:

https://man7.org/linux/man-pages/man8/btrfs-filesystem.8.html

Btrfs-progs are written in C and readily compiled as statically-linked binaries:

https://github.com/kdave/btrfs-progs

Another important point is that I don't know of any boot manager that will recognize a bcachefs partition.      

Tags: quirky

Linux kernel 6.8.0 with bcachefs

March 14, 2024 — BarryK

The specifications for bcachefs are great, though it does seem to be still immature. It was mainlined in the 6.7 kernel, with intense development, major improvements, in the 6.8 kernel.

So, I have compiled the 6.8.0 kernel, with bcachefs enabled, builtin.

Going off on a tangent, exploring a new distro variant, using bcachefs instead of ext4. Just playing, too early to report anything more.  

Here is the website for bcachefs:

https://bcachefs.org/     

Tags: quirky

Heim versus ball joint

March 12, 2024 — BarryK

A few weeks ago, I admired Tomek's "Street Fox" DIY recumbent trike front suspension:

https://bkhome.org/news/202402/trike-front-suspension-using-tie-rods.html

Those type of joints are known as "Heim" joints, as distinct from normal ball joints. These are also known as "Rose" joints in Britain.

There is at least one trike manufacturer using the same technique; Stein Trikes (based in Serbia). See video about the "Wild One" trike front suspension and a snapshot from the video:

https://www.youtube.com/watch?v=-TBdcZqQ_g0

img1

I did some reading-up on Heim joints. Two major problems; they do not have high axial strength, and secondly they can wear out quickly.

That bottom joint is the main concern. You can imagine, if the wheel hits a bump, there will be a severe upward force, that the lower swing-arm will resist due to the shock absorber, hence strong axial force trying to rip the joint apart.

Then riding in inclement weather, rain and dirt will get into the joint. On dry dirt roads, dust will get in.

So, it seems to me, that bottom joint will have a limited lifetime. But does that matter if the joints are cheap?

I purchased three different types of joints, to compare. Firstly, Heim joint:

img3

I bought the cheapest, m10 thread and hole diameter, they cost only about AU$3.50 each and AU$2.50-ish postage. Postage remainded about the same for bigger quantity. Ha ha, compare with RS Components here in Australia, they are asking AU$45 each (plus postage?). eBay AU vendor wants AU$25 each plus AU$10 postage.

Maybe these ones from Aussie vendors are higher quality. Perhaps they have higher axial strength. The couple that I purchased from Aliexpress look okay, just eyeballing them.

I also purchased this ball joint:

img5

As far as I can make out, it looks like the ball has been inserted from the bottom, which means that it cannot be pulled out. That is an important point for the bottom joint in the swingarm that you can see in the Stein Trike photo.

I found, however, that the join is incredibly stiff, and when I did get it to move, it did so very jerkily. It would probably loosen up in time, I suppose. The Heim joint, in comparison, moved freely, without feeling loose.

The third one I purchased is this:

img2

Also a bit stiff to move, but again I suppose it will loosen up with usage. I pulled that little spring clip out, thinking that would allow the ball to be pulled out; but no, it is locked in, as shown in this section view:

img4

I don't think that this would last if used upside down. For that bottom joint in the swingarm, there would have to be a bracket so that the joint can be bolted on right-side-up.

Both of those last two have rubber boots, so very good protection from water, dirt and dust.

Having a respite from the DIY trike project while my thumb heals; it has been an opportunity to rethink the design. Lots of thoughts, will post when something definite is decided. Definitely don't want to start from scratch; will use parts already constructed, such as the steering knuckles.

One very interesting bit of information; Stein Trikes did design a full-suspension leaning trike about 9 years ago, named "Wild Wave". There were prototypes but it never went into production. From a couple of short videos, it looked like the leaning was purely by body lean, not via the steering mechanism.   

Tags: light

Bugfix easyVoid non-US keyboard

March 10, 2024 — BarryK

Caramel reported this problem:

https://forum.puppylinux.com/viewtopic.php?p=113730#p113730

The problem is that there are scripts that expect the Xorg keyboard layout files to be at /etc/X11/xkb. The normal path is /usr/share/X11/xkb, with extras allowed in /etc/X11/xkb; however, Puppy Linux from the very early days had /usr/share/X11/xkb a symlink to /etc/X11/xkb

easyVoid has installed the keyboard layouts to the normal path, /usr/share/X11/xkb, not a symlink, so some scripts are not working.

This goes back a long way... when the keyboard layout is chosen in the initrd, it writes the selection to /etc/keymap. At startup of X from the commandline, /usr/bin/xwin script runs, and one thing this script does is call "keymap-set --xopt", which edits /etc/X11/xorg.conf.d/10-evdev-puppy.conf with the appropriate keyboard layout.

It is that 'keymap-set' script that is broken, as it looks at /etc/X11/xkb only. Forum member shinobar wrote that script in 2010, minor mods in 2012, 2015, 2016 and one small change in 2023.

I really should fix those scripts to look at /usr/share/X11/xkb, but for now have just implemented the easy solution; made /usr/share/X11/xkb into a symlink. Here is the woofV commit:

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

Tags: easy

Package uninstall fixes

March 10, 2024 — BarryK

Caramel has been performing some install and uninstall tests in easyVoid:

https://forum.puppylinux.com/viewtopic.php?p=113691#p113691

Yes, there are some issues; folders and icons getting left behind after a package is uninstalled. These issues apply to all Easy* variants. I have applied some fixes:

/usr/local/petget/removepreview.sh:

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

/usr/bin/xbps-remove.sh:

https://github.com/bkauler/woofq/commit/7ddf41bbd34fa72ed2be6e313d3fa5a186bdc08e

One issue was that you might create an icon on the desktop for an application, but after uninstalling the application, the desktop icon is still there. Sure, you can manually delete it, but now it is likely to get deleted automatically.   

Tags: easy