91-siduction-entry-key.install: line 43: 10000 - : arithmetic syntax error

Started by wolegis, 2026/10/23, 21:44:59

Previous topic - Next topic

wolegis

Just an ordinary upgrade after 4 weeks. Big crime, NOX, rootfs on btrfs.

QuoteProcessing triggers for initramfs-tools (0.151) ...
update-initramfs: Generating /boot/initrd.img-7.2.12-1-siduction-amd64
Updating kernel version 7.2.12-1-siduction-amd64 in systemd-boot...
/usr/lib/kernel/install.d/91-siduction-entry-key.install: line 43: 10000 - : arithmetic syntax error: operand expected (
error token is "- ")

In the script

91-siduction-entry-key.install
variable entry_path gets set to /boot/siduction-nox/7.2.12-1-siduction-amd64. The pipe

grep -o "shot-[0-9@]\+" <<< $entry_path | sed s'!shot-!!'
produces no output, thus variable sn_nr gets assigned the empty string. The following lines

if [ "X$sn_nr" = "X@" ]; then
        key="10000"
else
        key=$((10000 - "$sn_nr"))
fi

are not prepared for this, producing the above mentioned error message.

I have worked around this issue by adapting the script. But I keep asking myself if I did something wrong here or if the script is simply buggy.

scholle1

Thanks for pointing that out.
I'll take a look at the script.
It's probably a bug.
"Pax in terris" - Das ist mein großer, mein einzigster für diese Welt von Herzen kommender Wunsch.
"Friede auf Erden" und alles Weitere erscheint einfach.

scholle1

The cause is an incomplete entry in the /etc/kernel/entry-token file.
To help you, I need the following information.
Please show the output of:
ls /usr/lib/modulesand  if only one ESP is used,
tree /efior if an XBOOTLDR partition is also used
tree /bootand last
btrfs subvolume get-default /
"Pax in terris" - Das ist mein großer, mein einzigster für diese Welt von Herzen kommender Wunsch.
"Friede auf Erden" und alles Weitere erscheint einfach.

wolegis

# ls /usr/lib/modules
 7.2.12-1-siduction-amd64  7.2.8-1-siduction-amd64

# tree /boot
/boot
├── config-7.2.12-1-siduction-amd64
├── config-7.2.8-1-siduction-amd64
├── EFI
│   ├── BOOT
│   │   └── BOOTX64.EFI
│   ├── Linux
│   └── systemd
│      ├── systemd-boot-fallbackx64.efi
│      └── systemd-bootx64.efi
├── initrd.img-7.2.8-1-siduction-amd64
├── loader
│   ├── entries
│   │   ├── siduction-nox-7.2.12-1-siduction-amd64.conf
│   │   └── siduction-nox-7.2.8-1-siduction-amd64.conf
│   ├── entries.srel
│   ├── keys
│   ├── loader.conf
│   └── random-seed
├── siduction-nox
│   ├── 7.2.12-1-siduction-amd64
│   │   ├── initrd.img-7.2.12-1-siduction-amd64
│   │   └── linux
│   └── 7.2.8-1-siduction-amd64
│      ├── initrd.img-7.2.8-1-siduction-amd64
│      └── linux
├── System.map-7.2.12-1-siduction-amd64
├── System.map-7.2.8-1-siduction-amd64
├── vmlinuz-7.2.12-1-siduction-amd64
└── vmlinuz-7.2.8-1-siduction-amd64

# btrfs subvolume get-default /
ID 256 gen 441 top level 5 path @

Mind that /boot is NOT XBOOTLDR, but ESP. (Cannot recall why it is not as you expected. As far as I remember, this was a clean install with NOX ISO without any extra fiddling.)