Christians Tagebuch

The latest posts in full-text for feed readers.


Error accessing 3TB SATA disk via USB

My Dreambox DM7080HD's internal flash chip died after 11 years, and after purchasing a DM900 I wanted to copy the movies from the old 3.5" 3 TB hard disk to the new 2.5" 5 TB SATA disk installed inside the new satellite TV receiver.

I attached the disk to my rusty old SATA-to-USB-adapter (JMicron JM20337 USB to ATA/ATAPI Bridge, USB ID 152d:2338) and connected it to the dreambox. The disk was recognized, but no partitions would be found. dmesg showed that the disk size was only 700 gigabytes instead of 3 terabytes:

usb 3-2.2: USB disconnect, device number 17
usb 3-2.2: new high-speed USB device number 18 using xhci_hcd
usb 3-2.2: New USB device found, idVendor=152d, idProduct=2338, bcdDevice= 1.00
usb 3-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=5
usb 3-2.2: Product: USB to ATA/ATAPI Bridge
usb 3-2.2: Manufacturer: JMicron
usb 3-2.2: SerialNumber: 7CC48306C0E5
usb-storage 3-2.2:1.0: USB Mass Storage device detected
scsi host0: usb-storage 3-2.2:1.0
scsi 0:0:0:0: Direct-Access     WDC WD30  WD-WCC4N30LCPEU 0A80 PQ: 0 ANSI: 2 CCS
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 0:0:0:0: [sda] 1565565872 512-byte logical blocks: (802 GB/747 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 38 00 00
sd 0:0:0:0: [sda] Asking for cache data failed
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Attached SCSI disk
  

fdisk also told me that the hard drive was smaller than I expected, but the partition on it was larger - but only 2TB instead of 3:

root@frm:~> fdisk -l /dev/sda
Disk /dev/sda: 746,52 GiB, 801569726464 bytes, 1565565872 sectors
Disk model:  WD-WCC4N30LCPEU
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start        End    Sectors Size Id Type
/dev/sda1           1 4294967295 4294967295   2T ee GPT
  

I unplugged the disk, attached it to my laptop and installed gdisk, a fdisk for GPT partitions:

root@frm:~> gdisk /dev/sda
GPT fdisk (gdisk) version 1.0.10

Warning! Disk size is smaller than the main header indicates! Loading
secondary header from the last sector of the disk! You should use 'v' to
verify disk integrity, and perhaps options on the experts' menu to repair
the disk.
Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.

Warning! One or more CRCs don't match. You should repair the disk!
Main header: OK
Backup header: ERROR
Main partition table: OK
Backup partition table: ERROR

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: damaged

****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************

Command (? for help): p
Disk /dev/sda: 1565565872 sectors, 746.5 GiB
Model:  WD-WCC4N30LCPEU
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): AFB7463D-B5C2-409F-86BB-C113231DDDB2
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 8-sector boundaries
Total free space is 3933 sectors (1.9 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048      5858436016   2.7 TiB     0700  primary
   2      5858436017      5860531215   1023.0 MiB  8200  primary

  

This was when I stopped experimenting on my laptop and searched for an explanation of the wrongly reported hard drive size. I found it in an answer by Rod Smith on Ask Ubuntu:

External USB enclosures often impose 32-bit limitations on disk sector values. 2^32 sectors, times a 512-byte sector size, means that these enclosures can handle, at most, 2 TiB disks.

Frequently, the symptom of using a disk bigger than this is that the disk size is reported as the disk's true size modulo 2 TiB -- that is, your 2.73 TiB disk is reported as 0.73 TiB.

This was the problem. The JM20337 SATA-to-USB adapter was from 2003, and just doesn't support disks larger than 2TB.

Connecting the drive to a more recent 4TB video backup harddisk adapter did work, and dmesg showed the real drive size. The partition table was broken, but I could recover it with TestDisk.

Published on 2025-12-07 in , ,


NFS: Hide shares

The network shares ("exports") available on a NFS server can be listed with showmount -e myserver. It will list all exported directories, even if the client is not allowed to mount all of them.

This here is a workaround. A real solution - hiding all exports that the client does not have access to, but showing the rest - does not exist to my knowledge.

With NFS v4 it is possible to limit listing the shares to select clients only: By restricting access to rpc.mountd via /etc/hosts.allow:

/etc/hosts.allow
mountd: client1 client2

This will allow client1 and client2 to list the shares:

root@client1:~> showmount -e myserver
Export list for myserver:
/data/media          client1,client2
/data/backup         client1,client2,client3

On client3 it will lead to an error:

root@client3:~> showmount -e myserver
rpc mount export: RPC: Authentication error; why = Failed (unspecified error)

The downside is that NFS v2 and v3 mounts will not work anymore, because a mount command in this versions needs to contact rpc.mountd.

Published on 2025-12-07 in ,


TYPO3: No content edit permission

On a TYPO3 v12 system one of our customers got this error when editing a mask content element:

No content edit permission for user 23 on page 42 1437679657

Exception code 1437679657 has the following comment in the source code:

A non page record is edited. If there is a parent page row, check content edit right of user

In my case it was a sys_file_reference entry that had a different pid than the tt_content element it was linked to. I have no idea how that happened; most likely a bug when copying or moving content elements in early stages of the project when things were in flux.

The backend user had access to the page with the content element, but not to the pid of the sys_file_reference record.

Solution

Find all affected content elements:

SELECT sfr.uid, sfr.pid as sfr_pid, tt_content.pid AS t_pid, tt_content.CType
  FROM sys_file_reference AS sfr
  JOIN tt_content ON tt_content.uid = sfr.uid_foreign
WHERE
  sfr.tablenames = "tt_content"
  AND sfr.pid != tt_content.pid
LIMIT 100

Now fix the file references:

UPDATE sys_file_reference
  INNER JOIN tt_content ON sys_file_reference.uid_foreign = tt_content.uid
SET
 sys_file_reference.pid = tt_content.pid,
 sys_file_reference.tstamp = UNIX_TIMESTAMP()
WHERE
 sys_file_reference.pid != tt_content.pid
 AND sys_file_reference.tablenames = "tt_content"

And in the end check if the records have the correct page IDs now:

SELECT
  sys_file_reference.uid AS sfr_uid,
  sys_file_reference.pid AS sfr_pid,
  tt_content.uid AS tt_uid,
  tt_content.pid AS tt_pid
FROM sys_file_reference, tt_content
WHERE
  tt_content.uid = sys_file_reference.uid_foreign
  AND sys_file_reference.tablenames = "tt_content"
  AND sys_file_reference.uid IN (94,95,96,97)

Published on 2025-11-26 in ,


Fahrschulkosten Moped

Kind #1 hat den Führerschein für das Moped (Klasse AM) gemacht, wobei es folgende Bruttokosten gab:

Posten Erläuterung # EP Gesamtpreis
DRK
Erste Hilfe-Ausbildung Teil vom Rettungsschwimmerkurs 0,00 €
Motorradladen
Helm 205,39 €
Helmpflegeset 24,99 €
Handschuhe 39,99 €
Fahrschule Rechnung #1: Theorie
Grundbetrag Klasse AM Theorieausbildung 10x 3/4h 495,00 €
Fahren Lernen Max - Klasse AM Lernsoftware 72,49 €
Vorstellung Theorieprüfung Kl. AM 42,99 €
Fahrschule Rechnung #2: Praxis
Übungsfahrten Klasse AM je eine 3/4h, mind. 10 13 64,50 € 838,47 €
Unterweisung Klasse AM je eine 3/4h 1 64,50 € 64,50 €
Vorstellung Praxisprüfung Kl. AM 174,00 €
Dekra
Theoretische Fahrprüfung 24,99 €
Praktische Fahrprüfung 129,83 €
Landratsamt Grimma
Antrag auf Erteilung einer Fahrerlaubnis 64,22 €
Vorläufige Fahrerlaubnis 11,20 €
Summe 2.188,08 €

Summiert:

Postengruppe Summe
Gesamtsumme 2.188,08 €
Helm + Handschuhe 270,37 €
Fahrschule Theorie + Prüfung 635,48 €
Fahrschule Praxis + Prüfung 1.206,80 €
Landratsamt 75,42 €

Published on 2025-11-16 in


Von Prüfbescheinigung zu vorläufiger Fahrerlaubnis

Kind #1 hat die Fahrschule fürs Moped gemacht und einen Tag vor dem 15. Geburtstag die praktische Prüfung. Der Prüfer stellte statt einer vorläufigen Fahrerlaubnis nur eine Prüfbescheinigung aus, auf der in großen Lettern folgendes stand:

Diese Prüfbescheinigung berechtigt nicht zum Führen von Kraftfahrzeugen.

Als das Kind dann wirklich 15 war, fuhren wir auf die Dekra-Geschäftsstelle nach Grimma - der Prüfer war von der Dekra, also werden wir dort auch die vorläufige Erlaubnis bekommen. Dort angekommen teilte man uns allerdings mit, daß man auf der Dekra nichts machen kann und wir uns ans Landratsamt wenden müssen.

Auf dem Landratsamt braucht man Termine, die es aber für Zeiten, in denen ein Schüler mitkommen kann, erst in 2 Wochen gibt. Ich habe mir deshalb einen Termin für den am nächsten Vormittag geklickt, bin allein hingefahren, habe die Prüfbescheinigung abgegeben und dann für 11,40€ ein Dokument mit dem Titel Vorläufiger Nachweis der Fahrberechtigung (FeV) bekommen.

Published on 2025-11-16 in


Tecvia GmbH: Sicherheitslücke bei Fahrschulanbieter

Heute bekamen wir eine E-Mail vom Verlag Heinrich Vogel | TECVIA GmbH, in der sehr geschickt mitgeteilt wurde, daß alle bei Ihnen gespeicherten Kundendaten abgegriffen wurden.

Diese Firma bietet unter anderem die Software Fahren Lernen MAX an, die Fahrschulen an ihre Fahrschüler vermieten.

Sie bemühen sich darin sehr zu betonen, daß alles sicher ist - obwohl sie doch gerade erst alle Daten der Fahrschüler wegkopiert bekommen haben. Die Firma schweigt sich über die genauen Daten aus, aber ich vermute folgendes:

  • Kompletter Name wie er auf dem Ausweis steht
  • Adresse
  • Geburtsdatum
  • E-Mailadresse
  • Telefonnummer
  • Hash des Passworts
Absatz aus der E-Mail Meine Anmerkung
Betreff: Information zum Schutz Ihrer Daten Es geht um den Verlust, nicht um den Schutz. Aber schon dieser Betreff reicht aus, daß die meisten Leute diese E-Mail als unwichtig abtun und nicht lesen werden.
Guten Tag,
wir möchten Sie heute vorsorglich über einen IT-Sicherheitsvorfall informieren, der uns – den Verlag Heinrich Vogel | TECVIA GmbH als technischen Dienstleister Ihrer Fahrschule – betroffen hat. Es ist bereits passiert. Das ist nicht vorsorglich, sondern im Nachhinein.
Letzte Woche haben wir einen unbefugten Zugriff festgestellt und das Fahrschüler-Lernsystem umgehend kontrolliert heruntergefahren, um Ihre Daten zu schützen und unsere Sicherheitsinfrastruktur zu verstärken. Sie haben nicht direkt den Stecker gezogen (was vermutlich gar nicht möglich ist, weil der Server in einem Rechenzentrum steht), sondern den Runterfahrbefehl eingetippt. Das Adjektiv steht nur da um Kompetenz zu simulieren und vom Problem abzulenken.
Für das Schützen der Daten ist es bereits zu spät.
Im Rahmen der forensischen Prüfung durch externe IT-Sicherheitsexperten wurde festgestellt, dass in einem auf wenige Tage begrenzten Zeitraum auf bestimmte Datensätze zugegriffen wurde, die auch personenbezogene Informationen enthalten. Sie haben keine eigenen Sicherheitsexperten.

Der Download der Datenbank wird Sekunden, höchstens einige Minuten gedauert haben. Der Zeitraum sagt nichts über die Tragweite des Problems aus.
Wichtig für Sie: Es gibt keine Hinweise darauf, dass Passwörter kompromittiert wurden. Hier wird vom Hauptproblem abgelenkt: Alle persönlichen Daten sind jetzt in den Händen von Angreifern.
Unsere Systeme wurden vollständig überprüft, mit zusätzlichen Sicherheitsmaßnahmen verstärkt und laufen seit gestern wieder stabil. D.h. vorher waren sie nicht stabil. Der Angreifer scheint also einen Fehler gemacht zu haben, so daß das System nicht mehr stabil lief. Vermutlich war das überhaupt der Grund, warum Tecvia das Problem bemerkt hat.
Alle relevanten Behörden wurden selbstverständlich informiert. Schaut her, wir halten uns an Gesetze!
Wir empfehlen Ihnen dennoch, in den kommenden Wochen besonders aufmerksam zu sein, wenn Sie E-Mails oder Anrufe von unbekannten Absendern erhalten. Die persönlichen Daten von zehntausenden - wenn nicht sogar mehr - Personen sind jetzt für immer in unbefugte Hände gelangt. Es sind nicht nur Wochen, sondern die nächsten Jahrzehnte, in denen die eigenen Daten missbraucht werden werden.
Wir bedauern den Vorfall aufrichtig und danken Ihnen für Ihr Verständnis.
Der Schutz Ihrer persönlichen Daten hat für uns oberste Priorität. Jetzt ist das vielleicht so, aber bisher war das offenbar nicht der Fall. Ansonsten hätten Sie ihr System vorher korrekt abgesichert, oder sogar externe Experten mit einem Pentest beauftragt.
Die getroffenen Maßnahmen stärken das bereits hohe Sicherheitsniveau unserer Systeme zusätzlich. Wenn die Daten der Kunden wegkopiert wurden, war das Sicherheitsniveau nicht hoch. Es war total schlecht.
Für Rückfragen steht Ihnen unser Datenschutzteam unter datensicherheit@tecvia.com zur Verfügung.

Mit freundlichen Grüßen
Ihr Datenschutzteam des Verlags Heinrich Vogel | TECVIA GmbH

Published on 2025-11-04 in ,


GameStick games on the OUYA

Some of the 188 games available on the PlayJam GameStick were not available on the OUYA. Ever since building my replacement GameStick server I dreamt of making the GameStick games available on the OUYA.

Andiweli had the same idea and went through the tedious task of installing and testing each of the GameStick games on the OUYA. The result was a long compatibility list.

This list sat for a year until he came back and asked how we could bring them to the OUYA. The main problem is that each game needs a special tv.ouya.intent.category.GAME intent in its manifest file - otherwise it will not appear in the PLAY menu. Manually adding that to the games is possible by modifying the original game .apk, but that breaks the signature and requires us to host two versions - neither of which I was fond of.

Community content

At first I tinkered with community content, a feature introduced with the Chickcharney 1.2.1353 firmware update - the last major update ever released. That feature was never used by any games, but I did try out the pre-compiled cc-sample app shipped with the 2.1.0 development kit. It didn't allow me to add custom entries to the play menu, though.

CC Sample App Create an emblem Context menu Emblem information Emblem editing Community content in the PLAY menu Emblem in the community content menu Emblem details

Bundles

Then I remembered that I already solved this problem for SNES games in 2015 by building a small launcher application that only acts as proxy to start the actual game. The Chickcharney firmware also brought support for bundles, which lets you purchase multiple games at once, and all of them get downloaded automatically! This would make the perfect solution: Bundle the GameStick game with the launcher, and people can click "download" and get both.

Two hours after I communicated my plan, Andi demo'd the first launcher in a small video.

Then I only had to think hard about a way to store the launcher data and cross-link the launchers with the actual games, build a script to convert GameStick meta data files into OUYA meta data files, modify the server software to automatically combine those linked games into bundles, expand the API documentation with the new information I got from implementing bundles and adjust the OUYA-API-to-HTML-converter to handle bundles.

7 days later I had everything in place and the first bundle downloaded on my development OUYA.

Fast-forward 4 days and we've got 11 GameStick games easily installable on the OUYA!

GameStick games in the OUYA home row PlayJam GameStick category in the OUYA store Bundle details Bundle detail contents button Bundle content list Automatic download of game + launcher at once

Also on: Mastodon and Twitter.

Published on 2025-11-13 in ,


LernSax: E-Mail nicht verfügbar

Auf der zentralen sächsischen Schulplattform LernSax ist seit dem Wochenende die E-Mail-Funktionalität kaputt.

Ein Popup-Fenster erklärt

Einschränkungen im Werkzeug E-Mail

Leider tritt aktuell eine Störung auf, durch die es zu Anzeigefehlern und längeren Ladezeiten im Mailservice kommt. Ein Datenverlust ist nicht zu befürchten und andere Funktionen sind nicht betroffen.

Wir arbeiten zusammen mit unserem Hosting-Dienstleister an einer Störungsbeseitigung.

Dieser Hinweis ist aber offenbar etwas alt, denn beim Zugriff auf die E-Mail-Funktionen kommt nur noch

E-Mail ist im Moment nicht verfügbar.

Screenshot LernSax

31.693 Lehrer und 442.441 Schüler an 1.399 Schulen können keine E-Mails schicken oder mit Eltern Termine zum Elternsprechtag ausmachen (Daten vom Schuljahr 2024/2025).

Dieser Fehler wurde geliefert von DigiOnline GmbH - der Firma, die es bei Lernsax seit Jahren nicht schafft, daß man eingeloggt bleibt. Jeder Schüler muss sich bei erneutem Aufruf von www.lernsax.de neu einloggen - auch wenn er gerade erst vor 5 Minuten angemeldet war.

Update 2025-11-09

E-Mails in LernSax sind immer noch kaputt. Auf der LernSax-Statusseite steht, daß die Probleme sogar schon am 21.10.2025 anfingen:

21.10.2025: Einschränkungen im Mailservice

Derzeit kommt es in den Abendstunden für einzelne Konten zu Einschränkungen im Mailservice. Dadurch gibt es Fehldarstellungen, wie z. B. leeren Posteingängen oder leeren E-Mails. Es ist kein Datenverlust zu erwarten.

Zusammen mit unserem Hosting-Dienstleister arbeiten wir bereits mit Hochdruck an einer Lösung.

Weiterhin steht dort eine Meldung vom 05.11.:

05.11.2025: Update Einschränkungen im Mailservice

Leider tritt aktuell eine Störung auf, durch die es zu Anzeigefehlern und längeren Ladezeiten im Mailservice kommt. Das zuständige Rechenzentrum und der IT-Dienstleister arbeiten bereits intensiv an der Lösung. Dafür sind Anpassungen im Rechenzentrum notwendig, die zurzeit umgesetzt werden.

Wir gehen davon aus, dass die Beeinträchtigung noch bis zum Ende der Woche bestehen bleibt.

Eingehende Mails werden in dieser Zeit weiterhin angenommen, können aber zurzeit nicht angezeigt werden. Die weiteren Funktionen von LernSax sind nicht betroffen. Alternativ können Sie den LernSax Messenger als Kommunikationsmittel oder zum Datentransfer nutzen.

Wir bitten die Unannehmlichkeiten zu entschuldigen.

Published on 2025-11-04 in


getmail+maildrop: Unable to open mailbox

I use getmail to download e-mails from mail mail server to my laptop, and maildrop to place them into the correct folders.

Today I got a bunch of mails, but two of them had errors:

cweiske@frm:~$ gm
getmail version 6.19.07
Copyright (C) 1998-2025 Charles Cazabon and others. Licensed under GPL-2.0.
SimpleIMAPSSLRetriever:cweiske@cweiske.de@mail.cweiske.de:993:
  [...]
  [INBOX] msg 80/87 (7284 bytes) not retrieved (seen)
Delivery error (command maildrop 533549 error (75, /usr/bin/maildrop: Unable to open mailbox.))
  [INBOX] msg 81/87 (6285 bytes) from <volkszaehler-users-bounces@demo.volkszaehler.org>, delivery error (command maildrop 533549 error (75, /usr/bin/maildrop: Unable to open mailbox.))
  [INBOX] msg 82/87 (9688 bytes) from <volkszaehler-users-bounces@demo.volkszaehler.org>, delivery error (command maildrop 533550 error (75, /usr/bin/maildrop: Unable to open mailbox.))
  [INBOX] msg 83/87 (9586 bytes) not retrieved (seen)
  [...]
  2 messages (15973 bytes) retrieved, 85 skipped
Summary:
Retrieved 2 messages (15973 bytes) from SimpleIMAPSSLRetriever:cweiske@cweiske.de@mail.cweiske.de:993

A blog post by Paul Gear gave me the idea to use strace to see what's happening:

$ strace -f getmail
[...]
[pid 535072] newfstatat(AT_FDCWD, "/home/cweiske/Mail/cweiske@cweiske.de//.Trash/tmp", 0x7ffdf0ca5f00, 0) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
[...]
[pid 535072] openat(AT_FDCWD, "/home/cweiske/Mail/cweiske@cweiske.de//.Trash/", O_WRONLY|O_CREAT, 0666) = -1 EISDIR (Ist ein Verzeichnis)

maildrop wanted to write into the .Trash/tmp directory which did not exist. I checked: My maildir had a .trash and a .Trash directory, the first filled, the second not.

My .mailfilter rule was wrong:

if ( /^Subject:.*\[SPAM\]/ )
  to $DEFAULT/.Trash/

After changing .Trash to .trash everything worked.

Related: Re: error when getmail calls maildrop

Published on 2025-11-09 in ,


openwrt-munin

After adding two OpenWrt based access points to my home network (1, 2), I wanted to see the number of connected WLAN devices in my Munin monitoring installation.

I already did that in 2022 for DD-WRT and now needed the same functionality for OpenWrt.

Fortunately OpenWrt's ubus API is nicely documented, and so I built a new Munin plugin openwrt-wifi-devices_ that uses curl and jq to obtain a session ID, fetch network interfaces and then fetch the connected clients for each network interface.

Today my munin-contrib patch was merged, and you can enjoy it, too.

Combined view of connected wifi devices on multiple access points

The screenshot shows the combined view of connected WLAN devices across multiple access points. (Its setup is described on my dd-wrt-munin blog post.) Raw data are provided by Munin plugins dd-wrt-wifi-devices_, fritzbox_wifi_devices.py of fritzbox-munin and my new openwrt-wifi-devices_.

Published on 2025-11-03 in