Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

apt-cdrom: How do I use the flash drive as a CD-ROM to install software in Debian 12?

1,086 views
Skip to first unread message

Totoro

unread,
Jun 15, 2023, 5:40:05 PM6/15/23
to
Hi

I "burned" the file called debian-12.0.0-amd64-DVD-1.iso to a USB flash drive and installed Debian 12 with it without an internet connection. I chose the bare minimal install, without any desktop environment.

Upon successful installation, my desktop computer rebooted to a console, tty1

I re-inserted the USB drive and based on the guide titled Use ISO image as CD-ROM repository in Ubuntu (url: https://techpiezo.com/linux/use-iso-image-as-cd-rom-repository-in-ubuntu/), I did the following:

1. sudo mkdir -p /mnt/mount-iso
2. sudo mount -o loop /dev/sda1 /mnt/mount-iso
3. sudo apt-cdrom -m -d=/mnt/mount-iso add
4. sudo apt update

After entering

sudo apt update

The following messages appeared on the console:

Ign:1 cdrom://[Debian GNU/Linux 12.0.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20230610-10:23"] bookworm InRelease
Err:2 cdrom://[Debian GNU/Linux 12.0.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20230610-10:23"] bookworm Release
Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs.
Reading package lists.....Done

E: The repository 'cdrom://[Debian GNU/Linux 12.0.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20230610-10:23"] bookworm Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I have read the manpages of both 'apt-cdrom' and 'apt-secure' and they only contain lists and descriptions of options and parameters. They do not contain examples on how to use the options.

My objective is to mount the flash drive as a CD-ROM and use it to install additional software.

Karl

Sent with Proton Mail secure email.

David Wright

unread,
Jun 16, 2023, 3:50:06 AM6/16/23
to
On Thu 15 Jun 2023 at 21:32:41 (+0000), Totoro wrote:

> After entering
>
> sudo apt update
>
> The following messages appeared on the console:
>
> Ign:1 cdrom://[Debian GNU/Linux 12.0.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20230610-10:23"] bookworm InRelease
> Err:2 cdrom://[Debian GNU/Linux 12.0.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20230610-10:23"] bookworm Release
> Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs.
> Reading package lists.....Done
>
> E: The repository 'cdrom://[Debian GNU/Linux 12.0.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20230610-10:23"] bookworm Release' does not have a Release file.
> N: Updating from such a repository can't be done securely, and is therefore disabled by default.
> N: See apt-secure(8) manpage for repository creation and user configuration details.
>
> I have read the manpages of both 'apt-cdrom' and 'apt-secure' and they only contain lists and descriptions of options and parameters. They do not contain examples on how to use the options.
>
> My objective is to mount the flash drive as a CD-ROM and use it to install additional software.

It looks as though you haven't added an entry in /etc/apt/sources.list
(or a file in its directory) for reading from the mounted stick.
Something like:

deb file:/mnt/mount-iso bookworm main non-free contrib non-free-firmware

See man sources.list

Cheers,
David.
0 new messages