Package: dosfstools
Version: 4.2-1.2
Severity: minor
Tags: upstream
X-Debbugs-Cc: [email protected]

Dear Maintainer,

dosfsck trashes really old FAT that doesn't have a volume label in the boot 
sector.
This renders previously bootable filesystems unbootable.

Example case:

https://github.com/joshudson/dossuperfloppy/raw/refs/heads/master/scantests/basefat16.img.bz2

The FAT boot sector is at sector 7. Hexdump:

00000000  eb 28 90 49 42 4d 20 20  32 2e 30 00 02 08 01 00  |ë(.IBM  2.0.....|
00000010  02 00 02 f9 7f f8 10 00  20 00 04 00 07 00 00 00  |...ù.ø.. .......|
00000020  00 00 00 00 80 00 28 11  11 11 11 00 00 00 00 00  |......(.........|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 80 55 aa  |..............Uª|
00000200

In this boot sector, offset 0x26 is not 0x29; therefore there is no volume 
label,
and the boot sector code starts at offset 0x2B. (As this is actually a mock-up
test case there isn't any actual boot code there, but a DOS 2.x or 3.0 boot
sector will be destroyed and the boot disk rendered unbootable.)

-- System Information:
Debian Release: 13.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.12.57+deb13-amd64 (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages dosfstools depends on:
ii  libc6  2.41-12

dosfstools recommends no packages.

dosfstools suggests no packages.

-- no debconf information

Reply via email to