#1036171 debian-installer: /etc/apt/sources.list isn't populated if mirror can't be reached during installation

Package:
debian-installer
Source:
debian-installer
Description:
Debian Installer documentation
Submitter:
Andrew Savchenko
Date:
2023-06-23 16:03:03 UTC
Severity:
normal
Tags:
#1036171#5
Date:
2023-05-16 13:35:04 UTC
From:
To:
# PROBLEM DESCRIPTION

User is unable to perform `apt update` right after installation.


# STEPS TO REPRODUCE

1. Start Bookworm installation and connect to a network where device is
issued non-routed IP by the DHCP server.

2. Installer will get stuck trying to fetch up-to-date packages from the
mirror.

3. Press "Cancel" and proceed with the installation as usual.

Upon boot you will find that /etc/apt/sources.list contains only the
following line:

```
deb cdrom:[Debian GNU/Linux bookworm-DI-rc2 _Bookworm_ - Official RC amd64 DVD Binary-1 with firmware 20230428-12:34]/ bookworm main non-free-firmware
```


# EXPECTED BEHAVIOUR

source.list contains the default remote mirror:

```
deb https://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
```

#1036171#12
Date:
2023-06-23 15:51:02 UTC
From:
To:
I can confirm this.
Using different install options of Debian installer produce different
sources.list. With default options selected of without internet
connection user receives system that can't be updated and where many
packages can't be installed without sources.list modifications

# STEPS TO REPRODUCE
1. Boot into official debian-12.0.0-amd64-DVD-1.iso
2. Select Graphical install
3. Proceed until step "Configure package manager" and question "Scan
extra installation media?"
4. Leave default option ("No")
5. Finish installation, boot into system
6. check /etc/apt/sources.list

# TEST RESULTS:

1. With "Scan extra installation media?" = "No" I've got sources.list
with such content:
```
deb cdrom:[Debian GNU/Linux 12.0.0 _Bookworm_ - Official amd64 DVD
Binary-1 with firmware 20230610-10:23]/ bookworm main non-free-firmware
```

2. With "Scan extra installation media?" = "Yes" I've got sources.list
with such content:

```
deb cdrom:[Debian GNU/Linux 12.0.0 _Bookworm_ - Official amd64 DVD
Binary-1 with firmware 20230610-10:23]/ bookworm main non-free-firmware

deb http://deb.debian.org/debian/ bookworm main non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm main non-free-firmware

deb http://security.debian.org/debian-security bookworm-security main
non-free-firmware
deb-src http://security.debian.org/debian-security bookworm-security
main non-free-firmware

# bookworm-updates, to get updates before a point release is made;
# see
https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
deb http://deb.debian.org/debian/ bookworm-updates main non-free-
firmware
deb-src http://deb.debian.org/debian/ bookworm-updates main non-free-
firmware
```

3. With Calamares installer from live media ("debian-live-12.0.0-amd64-
gnome.iso") I've got sources.list with such content:

```
# See https://wiki.debian.org/SourcesList for more information.
deb http://deb.debian.org/debian bookworm main non-free-firmware
deb-src http://deb.debian.org/debian bookworm main non-free-firmware

deb http://deb.debian.org/debian bookworm-updates main non-free-
firmware
deb-src http://deb.debian.org/debian bookworm-updates main non-free-
firmware

deb http://security.debian.org/debian-security/ bookworm-security main
non-free-firmware
deb-src http://security.debian.org/debian-security/ bookworm-security
main non-free-firmware

# Backports allow you to install newer versions of software made
available for this release
deb http://deb.debian.org/debian bookworm-backports main non-free-
firmware
deb-src http://deb.debian.org/debian bookworm-backports main non-free-
firmware
```

#1036171#17
Date:
2023-06-23 16:00:44 UTC
From:
To:
firmware
sources.list
firmware
https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
amd64-

^ There's mistake in the description.
Choice that affects resulting sources.list is on the step
"Configure the package manager" > "Use a network mirror?"