Package: debian-cdrom-detect (or apt, if the issue persists after installation)
Version: 3.0.0
Severity: minor
Tags: installation, apt, cdrom, mirrors, regression
Dear Debian Maintainers,
I am reporting a bug where the Debian installer incorrectly adds the CDROM
drive as a mirror in the APT sources list, even when the installation source is
not a CDROM. This can cause unnecessary errors and delays when updating the
system. This bug appears to affect all stable versions of Debian.
Description:
During a Debian installation from a USB drive (or possibly a network source),
the installer incorrectly detects and adds the CDROM device as a package source
to the `/etc/apt/sources.list` or `/etc/apt/sources.list.d/*` files. This
results in APT attempting to access the CDROM drive for package updates, even
though it is not needed or intended. This behavior leads to error messages
about missing CDROM media, and causes unnecessary delays in apt update/upgrade
processes, especially on systems without a CDROM drive. The problem stems from
the installation process not correctly determining the installation source.
Steps to reproduce:
1. Boot the Debian installer (e.g., from a USB drive).
2. Proceed through the installation process as normal. Choose a network mirror
if prompted.
3. After the installation is complete, boot into the newly installed system.
4. Open the `/etc/apt/sources.list` file (or check files in
`/etc/apt/sources.list.d/`).
5. Observe that a line similar to the following is present, referencing the
CDROM drive:
```
deb cdrom:[Debian <version> <codename> - Official <architecture> Binary
<date>]/ <codename> main
```
Expected results:
The installer should correctly identify the installation source (USB drive,
network mirror, etc.) and only add relevant mirrors to the APT sources list.
The CDROM device should only be added as a mirror if the installation was
specifically performed from a CDROM.
Actual results:
The installer incorrectly adds the CDROM device as a mirror in the APT sources
list, regardless of the actual installation source.
Configuration information:
* Debian version: All stable versions (including Bookworm)
* Installation source: USB drive (tested on VM)
* Architecture: amd64 (likely affects all architectures)
* Package versions:3.0.0
Additional info:
This issue can be easily resolved by manually commenting out or deleting the
CDROM entry in `/etc/apt/sources.list`. However, it would be better if the
installer correctly determined the installation source and avoided adding the
CDROM entry in the first place. This would improve the out-of-box experience
for new Debian users. The presence of the CDROM entry also slightly increases
the time for `apt update` as it tries (and fails) to probe the non-existent or
empty CDROM drive. This also is observed even when adding a mirror at
installation. It would be useful for the Debian Installer to reliably handle
installations where a mirror is provided so no CDROM is added.
This issue has been observed across multiple Debian stable releases on a
virtual machine with amd64 architecture. It is likely the bug affects all
architectures using the newest package versions.
Thank you for your time and attention to this matter.
Sincerely,
--
Scorpion Salute