LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-17-2020, 01:52 PM   #1
Trent29
Member
 
Registered: Dec 2018
Posts: 33

Rep: Reputation: Disabled
Question apt-get update not working on newly installed Debian 10


Just installed Debian 10 yesterday using ubootin and the Debian 10 .iso-1 file. I don't have a DVD or other optical drive on my laptop, so I installed it using the "USB Installation Method" from this Wikihow link https://www.wikihow.com/Install-Debian

Now whenever I as root user try to use apt-get update or apt-get install <name of program> I get a message like this:

root@Owner:/home/user# sudo apt update
Ign:1 cdrom://[Debian GNU/Linux 10.4.0 _Buster_ - Official amd64 DVD Binary-1 20200509-10:26] buster InRelease
Err:2 cdrom://[Debian GNU/Linux 10.4.0 _Buster_ - Official amd64 DVD Binary-1 20200509-10:26] buster Release
Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Hit:3 http://deb.debian.org/debian buster InRelease
Reading package lists... Done
E: The repository 'cdrom://[Debian GNU/Linux 10.4.0 _Buster_ - Official amd64 DVD Binary-1 20200509-10:26] buster 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.

Anyone know what went wrong with the installation or how to fix this?
 
Old 05-17-2020, 02:11 PM   #2
shruggy
Member
 
Registered: Mar 2020
Posts: 910

Rep: Reputation: Disabled
Code:
sed -i '/\<cdrom:/s/^/#/' /etc/apt/sources.list

Last edited by shruggy; 05-17-2020 at 02:14 PM.
 
1 members found this post helpful.
Old 05-18-2020, 04:49 PM   #3
quickbreakfast
Member
 
Registered: Oct 2015
Posts: 118

Rep: Reputation: Disabled
Quote:
Originally Posted by Trent29 View Post
Just installed Debian 10 yesterday using ubootin and the Debian 10 .iso-1 file.

Now whenever I as root user try to use apt-get update or apt-get install <name of program> I get a message like this:

E: The repository 'cdrom://[Debian GNU/Linux 10.4.0 _Buster_ - Official amd64 DVD Binary-1 20200509-10:26] buster Release' does not have a Release file.


Anyone know what went wrong with the installation or how to fix this?
Though not a Debian user, I would not mind betting that you have not connected to a Debian mirror outside of the install device. So apt get is searching the install medium for the program and when not found gives you the message.

To fix this, as root, uncomment a SINGLE mirror in the relevant file.

https://linuxconfig.org/how-to-find-...t-sources-list will find you the quickest mirror for you.
 
1 members found this post helpful.
Old 05-18-2020, 06:40 PM   #4
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,672

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by Trent29 View Post
Just installed Debian 10 yesterday using ubootin and the Debian 10 .iso-1 file. I don't have a DVD or other optical drive on my laptop, so I installed it using the "USB Installation Method" from this Wikihow link https://www.wikihow.com/Install-Debian

Now whenever I as root user try to use apt-get update or apt-get install <name of program> I get a message like this:

root@Owner:/home/user# sudo apt update
Ign:1 cdrom://[Debian GNU/Linux 10.4.0 _Buster_ - Official amd64 DVD Binary-1 20200509-10:26] buster InRelease
Err:2 cdrom://[Debian GNU/Linux 10.4.0 _Buster_ - Official amd64 DVD Binary-1 20200509-10:26] buster Release
Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Hit:3 http://deb.debian.org/debian buster InRelease
Reading package lists... Done
E: The repository 'cdrom://[Debian GNU/Linux 10.4.0 _Buster_ - Official amd64 DVD Binary-1 20200509-10:26] buster 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.

Anyone know what went wrong with the installation or how to fix this?
These have the contrib and non-free added to the lines, you can remove them if offended by their presence. As another has mentioned you are only setup for the install medium in your sources.list from the looks of the error message. Try this in your sources.list you can change the .de in the lines to your country code to see if they have mirrros that are faster than the german ones.

Code:
root@haswell:/home/seeder1# cat /etc/apt/sources.list
# 

# deb cdrom:[Debian GNU/Linux 10.2.0 _Buster_ - Official amd64 NETINST 20191116-09:56]/ buster main

#deb cdrom:[Debian GNU/Linux 10.2.0 _Buster_ - Official amd64 NETINST 20191116-09:56]/ buster main

deb http://ftp.de.debian.org/debian/ buster main contrib non-free
deb-src http://ftp.de.debian.org/debian/ buster main contrib non-free

deb http://security.debian.org/debian-security buster/updates main contrib non-free
deb-src http://security.debian.org/debian-security buster/updates main contrib non-free

# buster-updates, previously known as 'volatile'
deb http://ftp.de.debian.org/debian/ buster-updates main contrib non-free
deb-src http://ftp.de.debian.org/debian/ buster-updates main contrib non-free

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.
 
1 members found this post helpful.
Old 05-19-2020, 02:03 PM   #5
Trent29
Member
 
Registered: Dec 2018
Posts: 33

Original Poster
Rep: Reputation: Disabled
Thumbs up

Thanks for the great replies! I'll give them a try. And yes you are correct, I have not connected to a Debian mirror outside of the install device. Just to be clear, I open a terminal in the sources.list folder and run the commands you've provided? Where would I find the sources.list folder?

And I'm not sure how to "uncomment a mirror". Is there a command you could provide to run inside a particular folder? Thanks.
 
Old 05-19-2020, 02:14 PM   #6
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware, OpenBSD
Posts: 4,339
Blog Entries: 11

Rep: Reputation: 2457Reputation: 2457Reputation: 2457Reputation: 2457Reputation: 2457Reputation: 2457Reputation: 2457Reputation: 2457Reputation: 2457Reputation: 2457Reputation: 2457
Quote:
Originally Posted by Trent29 View Post
Where would I find the sources.list folder?

And I'm not sure how to "uncomment a mirror". Is there a command you could provide to run inside a particular folder? Thanks.
It's somewhere inside /etc/apt. All system configuration files are stored under /etc.

The comment sign in any configuration file is a # at the beginning of a line. If you want the line to be used and not ignored as a comment, just edit out the # sign. You will need to be root to do this.

My advice when editing any config file for the first time is to make a backup copy of it with the .orig suffix. That way you can always get it back again if you make a mess of the edit.
 
1 members found this post helpful.
Old 05-19-2020, 03:13 PM   #7
quickbreakfast
Member
 
Registered: Oct 2015
Posts: 118

Rep: Reputation: Disabled
Quote:
Originally Posted by Trent29 View Post
And I'm not sure how to "uncomment a mirror". Is there a command you could provide to run inside a particular folder? Thanks.
Technically no, there is not a command to run.

What you need to do is open the /etc/apt/sources.list file, as root type

Code:
 nano /etc/apt/sources.list
Find the mirror you want to use, press the delete key to remove the "#" sign at the beginning of the address of the mirror you want to use.

Save the amendment as you exit.

I suggest you update and upgrade your system before you install anything new.
 
1 members found this post helpful.
Old 05-19-2020, 03:25 PM   #8
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,951

Rep: Reputation: 3129Reputation: 3129Reputation: 3129Reputation: 3129Reputation: 3129Reputation: 3129Reputation: 3129Reputation: 3129Reputation: 3129Reputation: 3129Reputation: 3129
Doesn't the Software Manager also have a tab for sources?? Seems you can just uncheck that optical and be sure to include the online repos.
 
2 members found this post helpful.
Old 05-19-2020, 05:08 PM   #9
Roken
Member
 
Registered: Oct 2011
Location: Warrington, UK
Distribution: Arch local, Debian on VPS, several RPIs.
Posts: 288
Blog Entries: 1

Rep: Reputation: 53
Quote:
Originally Posted by jefro View Post
Doesn't the Software Manager also have a tab for sources?? Seems you can just uncheck that optical and be sure to include the online repos.

Assuming that he/she has a desktop installed, which we don't know. A quick edit of sources.list is by far the easiest option all around.
 
2 members found this post helpful.
Old 05-20-2020, 11:39 AM   #10
Trent29
Member
 
Registered: Dec 2018
Posts: 33

Original Poster
Rep: Reputation: Disabled
Wink

Thanks so much for the great responses everyone. Yes it is a desktop. And now, after reading your explanations, I remember that I have uncommented a command or two in the past. But I'll check out Software Manager too.
 
Old 05-23-2020, 03:37 PM   #11
Trent29
Member
 
Registered: Dec 2018
Posts: 33

Original Poster
Rep: Reputation: Disabled
Decided to Try Reinstall of Debian 10 First

There were other issues other than apt-get install not working, like not recognizing sudo commands.

So I looked in the Debian Installation Guide and it said specifically NOT to use unetbootin as the installer, because it changes the .iso file. Unfortunately, that's what I had used. So I decided to try reinstalling Debian 10 on the computer HDD.

So I copied the Debian 10 DVD .iso- 1 file onto a 32 GB USB drive that I formatted NTFS (the 4GB .iso file wouldn't copy onto a FAT32 formatted USB) Per the instructions, the Debian 10 .iso- 1 file was the only file on the entire drive. The instructions said to change the BIOS to boot from USB, which I did and which I know I had done correctly because it had booted successfully from unetbootin. The instructions said the .iso file should be all you need to install Debian. When I tried to boot from the USB, all I got was a blank screen with a blinking cursor. What did I do wrong? Why didn't this work? I thought I followed the instructions to the letter.
 
Old 05-23-2020, 03:51 PM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 20,058

Rep: Reputation: 3364Reputation: 3364Reputation: 3364Reputation: 3364Reputation: 3364Reputation: 3364Reputation: 3364Reputation: 3364Reputation: 3364Reputation: 3364Reputation: 3364
If creating the USB drive from windows you need win32diskimager. Just copying the ISO file to drive will not create a bootable device.

If creating the USB drive from linux you can use the dd or cp command as show on the debian website.
 
1 members found this post helpful.
Old 05-23-2020, 11:05 PM   #13
Roken
Member
 
Registered: Oct 2011
Location: Warrington, UK
Distribution: Arch local, Debian on VPS, several RPIs.
Posts: 288
Blog Entries: 1

Rep: Reputation: 53
Quote:
Originally Posted by Trent29 View Post
So I copied the Debian 10 DVD .iso- 1 file onto a 32 GB USB drive that I formatted NTFS (the 4GB .iso file wouldn't copy onto a FAT32 formatted USB) .........Why didn't this work?

Because this is completely wrong. the .iso is a disk image and is meant to be burned to a dvd or usb thumb drive. You can use either your favourite dvd burning software to put it on a dvd, or balenaEtcher to burn it to a thumb drive.


Then you boot from that installation media (either the dvd or the usb as appropriate).
 
1 members found this post helpful.
Old 05-24-2020, 03:04 AM   #14
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware, OpenBSD
Posts: 4,339
Blog Entries: 11

Rep: Reputation: 2457Reputation: 2457Reputation: 2457Reputation: 2457Reputation: 2457Reputation: 2457Reputation: 2457Reputation: 2457Reputation: 2457Reputation: 2457Reputation: 2457
Quote:
Originally Posted by Trent29 View Post
The instructions said the .iso file should be all you need to install Debian. When I tried to boot from the USB, all I got was a blank screen with a blinking cursor. What did I do wrong? Why didn't this work? I thought I followed the instructions to the letter.
There's copying and copying! If you use an ordinary file copy instruction in either Windows or Linux, the iso file gets copied over just like any other file. That isn't bootable. Your firmware looks for boot code in specific places and not inside files. If you have a BIOS (or a UEFI working in legacy mode), it looks in the first sector of the drive. A native UEFI looks for an EFI system partition and for a named .efi file within it. Neither will look inside a .iso file.

When you copy an iso image to a raw drive, the legacy bootloader in the first sector of the image goes into the first sector of the drive and an ESP with suitable boot files on it gets copied over too. You can do such a raw copy in LInux by using dd, as mentioned by michaelk; in Windows you must use special software.

Last edited by hazel; 05-24-2020 at 03:15 AM.
 
1 members found this post helpful.
Old 05-24-2020, 12:54 PM   #15
Trent29
Member
 
Registered: Dec 2018
Posts: 33

Original Poster
Rep: Reputation: Disabled
Thumbs up

Thanks so much to all 3 of you for the great detailed explanations! Much appreciated.

That's the way I initially thought it was supposed to work. But consider my failures. I tried first with unetbootin, had all of the above mentioned problems, then found out from the official Debian Install Guide that unetbootin is specifically not to be used because it changes the .iso. Then I tried Universal USB Installer - failed, so I tried to follow directly the install guide with pure .iso.

I'll try balenaEtcher. Any suggested alternative installers if balenaEtcher fails?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] sudo apt update and sudo apt-get update giving error cryptonic472 Linux - Software 7 08-24-2019 08:16 AM
Howabout apt-get update ; apt-get upgrade -f -y --force-yes in the crontab every week frenchn00b Debian 1 04-05-2008 07:47 AM
Apt-get update and apt-get upgrade rapattack Debian 32 01-28-2008 09:04 AM
apt-get install not working / apt-get update is ok remy215 Debian 2 10-01-2005 07:02 PM
Does 'apt-get update' update the database used by 'apt-cache'? davidas Debian 5 04-20-2004 01:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration