#1145449 Spurious "ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting." from non-LDM old Debian install media

#1145449#5
Date:
2026-08-25 10:04:06 UTC
From:
To:
Booting with "quiet", these were the only messages appearing on fbcon:

    ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting.
    ldm_validate_privheads(): Cannot find PRIVHEAD 1.

Here is a minimum recipe to reproduce this:

    bash5$ mmdebstrap forky /dev/null --quiet --include=linux-image-amd64,initramfs-tools,qemu-system-x86-64,wget,ca-certificates --customize-hook='chroot $1 wget -q http://archive.debian.org/debian/dists/sarge/main/installer-i386/current/images/hd-media/boot.img.gz && chroot $1 gunzip boot.img.gz && chroot $1 qemu-system-x86_64 -m 512M -nographic -kernel /vmlinuz -initrd /initrd.img -append "quiet console=ttyS0" -hda boot.img'
    WARNING: Image format was not specified for 'boot.img' and probing guessed raw.
             Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
             Specify the 'raw' format explicitly to remove the restrictions.
    ^[cSeaBIOS (version 1.17.0-debian-1.17.0-1)


    iPXE (https://ipxe.org) 00:03.0 CA00 PCI2.10 PnP PMM+1EFC7BD0+1EB87BD0 CA00



    Booting from ROM..^[c[   12.465502] ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting.
    [   12.468533] ldm_validate_privheads(): Cannot find PRIVHEAD 1.
    No root device specified. Boot arguments must include a root= parameter.
    (initramfs) uname -a
    uname -a
    Linux (none) 7.1.8+deb14.1-amd64 #1 SMP PREEMPT_DYNAMIC Debian 7.1.8-2 (2026-08-15) x86_64 x86_64
    (initramfs) blkid
    blkid
    [   89.141030] I/O error, dev fd0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
    /dev/sda: SEC_TYPE="msdos" LABEL_FATBOOT="Debian Inst" LABEL="Debian Inst" UUID="DEB0-0001" BLOCK_SIZE="512" TYPE="vfat"
    (initramfs)

I can reproduce this with
Debian 13 (linux-image-amd64 6.12.101-1) and
Debian 14 (linux-image-amd64 7.1.8-2).

I think the ancient boot.img is being mis-guessed as having LDM partitions.
http://archive.debian.org/debian/dists/sarge/main/installer-i386/current/images/hd-media/boot.img.gz
<waldi> twb: the test to determine if this might be LDM is pretty weak
Is it useful as a test case to tighten up the "is this LDM?" heuristic?
https://sources.debian.org/src/linux/7.1.10-1/block/partitions/ldm.c?hl=67#L67

If not, I guess just close this ticket, because
20yo debian install media are only interesting to historians. :-)