Source: debian-installer-utils
Version: 1.147
Severity: normal

I'm hacking together an installer for an rpi4 locally, copying all the
files onto a FAT-formatted USB drive. I also want to do some minor
config in a preseed late_command, so I've modified the initrd to add a
preseed file.

Unfortunately, once I added the preseed file d-i fails in
cdrom-detect. Digging further, I've found that this is because the USB
drive is already mounted on /media. This is caused by the "fetch-url"
command in preseed/preseed_fetch. In fetch-url-methods/file, we call
mountmedia to allow for preseed via USB from netboot - see commit
916a613577c5cd747d15b3d20f16b9518d7d54ea in 2013!!

This mountmedia is not needed in my case, and is what's breaking
things. As a workaround, I've added a preseed early_command for now to
*unmount* /media and all is well. But this code needs changing to not
run mountmedia unconditionally!

We already had a report from Bogdan Veringioiu about this problem back
in 2018... :-( [1]

[1] https://lists.debian.org/debian-boot/2018/04/msg00057.html

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

Kernel: Linux 5.10.0-23-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Reply via email to