0

Here's my sources.list

# deb cdrom:[Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 CD Binary-1 20130$

# deb cdrom:[Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 CD Binary-1 20130$

deb http://ftp.us.debian.org/debian/ wheezy main
deb-src http://ftp.us.debian.org/debian/ wheezy main

deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main

# wheezy-updates, previously known as 'volatile'
deb http://ftp.us.debian.org/debian/ wheezy-updates main
deb-src http://ftp.us.debian.org/debian/ wheezy-updates main

If I didn't comment out cdrom, I'd be seeing something like

Media change: please insert the disc labeled
 'Debian GNU/Linux 7.3.0 _Wheezy_ - Official i386 DVD Binary-1 20131215-03:40'
in the drive '/media/cdrom/' and press enter

Out of curiosity, I did that. I went to VNC and mounted the CD to my VPS but it didn't solve the problem. So the only way to solve it is to comment cdrom.

So why isn't cdrom commented out by default right after the installation? What you need it for? If cdrom was important, then you couldn't just comment it out, right?

Michael Mrozek
  • 93,103
  • 40
  • 240
  • 233
Lynob
  • 4,204
  • 1
    I use Centos and Ubuntu, but only encountered this issue on Debian so I only tagged the question Debian. I don't know about other distros – Lynob Feb 09 '14 at 01:21
  • 1
    My guess is, it's included by default to facilitate access to the repos. Some people have flaky Internet access and may prefer to order the whole of Debian on DVDs and rely solely on them. – Joseph R. Feb 09 '14 at 01:24
  • @JosephR. but they won't be able to run sudo apt-get update they will be seeing that error no matter what - can you run a system without ever updating apt? – Lynob Feb 09 '14 at 01:27
  • I don't know about that... Have you managed to ascertain that this error is not due to your particular VPS setup? – Joseph R. Feb 09 '14 at 01:28
  • @JosephR. yes, here's another guy who have just installed debian http://superuser.com/questions/714057/apt-get-requests-installation-media-after-installing-debian-7/714064#714064 – Lynob Feb 09 '14 at 01:30
  • Logically... because it was installed from CD. I've never seen a network install list the CDROM. – Ricky Feb 09 '14 at 01:31
  • @Fischer Doesn't seem to me like this guy actually tried inserting the Debian DVD into his drive (or even mounting the ISO image on loopback). – Joseph R. Feb 09 '14 at 01:39
  • @JosephR. probably you're right but I tried out of curiosity and didn't solve it – Lynob Feb 09 '14 at 01:41
  • @RickyBeam I have a minimal CD, I could try a network install in 2 days or so and report back – Lynob Feb 09 '14 at 01:42

2 Answers2

1

I imagine it's because they want to lighten the load on there servers, since you've probably already got a local copy of it on your installation media, why waste the bandwidth?

  • you mean install packages from CD? probably yes if you do this http://unix.stackexchange.com/questions/112346/is-it-possible-to-install-a-linux-desktop-environment-from-a-live-cd but you'd never be able to do it using apt-get – Lynob Feb 09 '14 at 01:44
0

I believe the deb cdrom:... lines are needed for conducting sudo apt-get dist-upgrade after doing sudo apt-get update with the deb cdrom:... line added to the /etc/apt/sources.listfile. For example if one wants to upgrade from Ubuntu Xenial (16.04 LTS) to Ubuntu Zesty (17.04), one has to include a valid Ubuntu Zesty deb cdrom:... line in the /etc/apt/sources.list file and remove other deb cdrom:... lines that pertain to 'cdrom's of other/previous versions.

Otherwise, sudo apt-get dist-upgrade would just upgrade the already installed packages and do nothing to upgrade the distro. i.e. as long as the Zesty deb cdrom:... line is absent from the /etc/apt/sources.list file, sudo apt-get dist-upgrade will have the same effect as sudo apt-get upgrade.

endrias
  • 113