Do I need to make my Debian install CD recognizable by apt-cdrom?
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Do I need to make my Debian install CD recognizable by apt-cdrom?
Hey folks,
After running
Code:
# aptitude update
or
Code:
# apt-get update
I get this sort of message at the end of console logging on a regular basis:
Code:
Fetched 1,670 kB in 3s (452 kB/s)
W: Failed to fetch cdrom://[Debian GNU/Linux 7.7.0 _Wheezy_ - Official amd64 CD Binary-1 20141018-13:06]/dists/wheezy/main/binary-i386/Packages: Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
E: Some index files failed to download. They have been ignored, or old ones used instead.
E: Couldn't rebuild package cache
Should I be concerned about the CD-ROM message?
The 'index files failing to load' and 'can't rebuild package cache' messages were after changing /etc/apt/source.list to include wheezy backports for nvidia driver: https://wiki.debian.org/NvidiaGraphi...7_.22Wheezy.22
Should I be concerned about that?
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Rep:
I think you will find it easier to simply comment out the CDrom as a source in your /etc/sources.list.
The installer should have done that as one of the last steps of the installation process. You don't want that unless you have no internet connection and have downloaded all the default disks that contain more packages.
As root;
Code:
<favorite text editor> /etc/apt/sources.list
The line calling for the CD will be one of the first lines. It will not have a # at the beginning of the line. Put one in there. I remove the line completely because I have a custom sources.list that I use. Should probably keep one from my next install so I can show what it looks like for folks like you.
I can show what a # (comment) looks like;
Code:
deb http://ftp.us.debian.org/debian/ sid main contrib non-free
# deb-src http://ftp.us.debian.org/debian/ sid main contrib non-free
The second line is "commented out". Any line starting with a # is ignored by the system. As I don't need source code packages very often I comment out the lines that connect me to that particular repo.
Put the # in front of your line calling for the Cd, open a terminal and as root;
Code:
apt-get update
or aptitude in place of apt-get if you prefer. This will stop that non sense.
Or you could just leave the install disk in your CD/DVDrom all the time. That would stop that too.
I think you will find it easier to simply comment out the CDrom as a source in your /etc/sources.list.
The installer should have done that as one of the last steps of the installation process. You don't want that unless you have no internet connection and have downloaded all the default disks that contain more packages.
As root;
Code:
<favorite text editor> /etc/apt/sources.list
The line calling for the CD will be one of the first lines. It will not have a # at the beginning of the line. Put one in there. I remove the line completely because I have a custom sources.list that I use. Should probably keep one from my next install so I can show what it looks like for folks like you.
I can show what a # (comment) looks like;
Code:
deb http://ftp.us.debian.org/debian/ sid main contrib non-free
# deb-src http://ftp.us.debian.org/debian/ sid main contrib non-free
The second line is "commented out". Any line starting with a # is ignored by the system. As I don't need source code packages very often I comment out the lines that connect me to that particular repo.
Put the # in front of your line calling for the Cd, open a terminal and as root;
Code:
apt-get update
or aptitude in place of apt-get if you prefer. This will stop that non sense.
Or you could just leave the install disk in your CD/DVDrom all the time. That would stop that too.
This helped.
First - in sources.list, the first line was the CD, however there seemed to be a duplicate of this line below that wasn't commented out... I wonder if something I did caused the system to go in and add that line. Installing Nvidia driver (relax, I did it the Debian way) or something like that?
Second - my Debian install disk is always in my drive when I get this message, which is why it doesn't quite make sense. It seems to be able to pull from the CD when it needs to, though (I have installed from this disk twice, afterall), so it's odd to me I get this message while the disk is in.
Perhaps I hadn't setup apt to use the CD?
Anyway, I think this solves my issue. If it pops up again, I will be sure to come back and mention what might have caused it.
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Rep:
It should not happen again. What you describe with the two entries for the install media with one left uncommented is exactly what is way too common.
If you are running a remote system with no way to connect then getting all the listed install disks above number 1 gives you all the packages for adding to your system and all your package management tool, with that CD line enabled, will look for that disk.
Your problem is that you have a connection. You have run apt-get or aptitude update. This has updated the package list. That list has some versions that are newer than the ones on your install disk. Therefore dpkg knows that your current disk is not the correct disk.
The other way to get rid of the problem is to disable all the on line repos, run "dpkg --clear-avail" and reenable the CD. It will then be correct with your package list after you run an update command again.
That would however, get you a different error if you ran an istall or upgrade command. When these are given the available package list is compared to the installed packages. You have installed packages that are newer than the ones on the disk. It would complain about that. Picky system.
Just commenting that CD line out has worked very well for me. Not sure I ever had that problem with a Squeeze (Debian 6) install but Wheezy, Jessie and Sid have all done that very thing to me. Doesn't happen everytime. Have no idea why it pops up ocassionally. Have installed with netboot, netinstall, default install disk1 for Gnome and Xfce, and the Live CD for Wheezy with Xfce. The last I don't think I have installed on a hdd but just copied (dd) to the stick and set up for persistence. Don't think I ever had a problem with that. But all the others have thrown that same uncommented line for the install media at me at least once and I am confident that the Live media can do it too.
My only theory is that I may not be removing the install media from my box quick enough when the message to do so comes up. I believe that the final little chores, including commenting out the unneeded line for the CD, are done after that pops up. I know the install disk is not neede from that point on but I don't hurry to remove it either. My theory is that the installer, still on your ram of course, comments out that first line, looks at all available sources that it has been instructed to look for during the installation and sees that disk which it has used and therefore addes that second line, uncommented, at that point.
I really should check this by carefully removing the install media when prompted instead of just hitting ok and then procrastinating. The problem is that I am going to replace the entire sources.list with my own and, frankly don't care what it does at that point. Just doesn't bother me.
Other than the multimedia repo being added and the src lines commented out that is different in my sources.list is some more pertinent to my reason for the installation replacing the version of Debian at the top (commented out obviously) and some other comments at the bottom of the file on ways to get the gpg keys if they are missing. Doesn't change things it is just that I put that stuff in all my installs and so the one put on by the installer is just easier to replace than to edit.
As you state you have had the disk inserted since the install I suspect that is the reason for your having that line in there too. If so, next time you install and the prompt comes up to remove the bugger, remove it before hitting OK.
As long as I havebeen with debian it has always had 2 entries for the cdrom, 1 commented out. I believe that it does that because after booting cdrom, somewhere around configuring network & users it searches again for cd & reloads additional tools.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.