Debian laptop installation fails due to debootstrap error "Failed to determine the codename for the release" at "Install the base system"

This question is old but I just came across a working fix for this.

As it turns out, the issue was caused due to the USB drive being unmounted during the LVM setup process. It might've been a bad USB connector or USB drive.

There is a very easy fix for which you don't even have to reboot or re-do any of the setup again.

  1. Press esc to enter the menu of the installer.
  2. Select Enter a shell (or command prompt)
  3. Run fdisk -l to find out the name and partition of your USB install drive
  4. Run mount /dev/sdc1 /cdrom (replace sdc1 with your USB drive)
  5. Run exit, then go back to Install the base system from the menu

It will continue to install as normal. All credits and thanks go to this guy


On Debian 10 busybox there is no fdisk command, so you can list disk and their partitions using ls /dev/sd*. Once you find your USB partition go to step 4.