site  contact  subhomenews

Fix for PC_HARDWARE_PROFILE

September 10, 2025 — BarryK

At startup, /etc/rc.d/rc.country writes to /tmp/pc-hardware-profile, with the value of the partition-uuid of an internal drive, for example:

PC_HARDWARE_PROFILE="91da59bf-979c-4d2c-b0da-a758cb1ba74f"

This is read in /usr/sbin/delayedrun, /usr/sbin/quicksetup and /usr/sbin/set_hwclock_type

Problem is, that variable is empty. Here is the code in rc.country:

INTDRV="$(readlink /sys/block/sd* /sys/block/nvme* /sys/block/mmc* | grep -v '/usb' | head -n 1 | rev | cut -f 1 -d '/' | rev)" #ex: sda
lsblk --pairs -o PTUUID --nodeps /dev/${INTDRV} > /tmp/pc-hardware-profile
sed -i -e 's%PTUUID%PC_HARDWARE_PROFILE%' /tmp/pc-hardware-profile

How did that ever work? I suppose it must have, but doesn't now. Here is the fix:

INTDRV="$(readlink /sys/block/sd* /sys/block/nvme* /sys/block/mmc* | grep -v '/usb' | head -n 1 | rev | cut -f 1 -d '/' | rev)" #ex: sda
echo -n "PC_HARDWARE_PROFILE='$(blkid -s PTUUID -o value /dev/${INTDRV})'" > /tmp/pc-hardware-profile

Hmmm. Anyway, fixed. Hardware profiling is discussed in posts to this blog. It is to handle booting Easy from a usb-drive on different computers.

EDIT:
I have replaced the lsblk utility with one from an older version of util-linux, from Easy Scarthgap:

# ./lsblk --pairs -o PTUUID --nodeps /dev/sda
PTUUID="91da59bf-979c-4d2c-b0da-a758cb1ba74f"
# ./lsblk -V
lsblk from util-linux 2.39.3

This has not made it into Easy 7.0.9, targeted for next release.

It is a pity that Debian Trixie has been so poorly tested prior to release. Another one, that really should have been fixed, is this, that I fixed for Easy 7.0:

https://bkhome.org/news/202507/found-cause-crash-compaq-presario.html

I know Linux these days is very complex. Even so, Debian has heaps of testers.     

Tags: easy