LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 03-06-2011, 09:41 AM   #1
mark_alfred
Senior Member
 
Registered: Jul 2003
Location: Toronto, Ontario, Canada
Distribution: Ubuntu Linux
Posts: 1,033

Rep: Reputation: 95
problems with apt-cdrom add command


Hello. I recently upgraded to Squeeze from Lenny. I had some problems along the way, though, so it's not a full upgrade. However, I am now running Squeeze.

I have dial-up, so I'm trying to use the eight Squeeze dvds. I was able to add them with "apt-cdrom add" in Lenny, but with Squeeze the dvd-drive was not being read (/dev/hdc became /dev/cdrom1, or /dev/sr0). In the release notes it said that it had to be mounted at /cdrom rather than /media/cdrom0 (see here). I have this (using /dev/sr0) in my /etc/fstab file. However, I get the following result:
Code:
debian:/home/mark# apt-cdrom add
Using CD-ROM mount point /media/apt/
Identifying.. [6ebbc4349ee9f03b1a75af22880835e2-2]
Scanning disc for index files..
Found 0 package indexes, 0 source indexes, 0 translation indexes and 0 signatures
W: Failed to mount '/dev/sr0' to '/media/apt/'
E: Unable to locate any package files, perhaps this is not a Debian Disc or the wrong architecture?
debian:/home/mark#
Note, I get this feedback even though there isn't a dvd in the drive (as if it's remembering a previous attempt, or something.) I saw an entry at debianhelp, suggesting that the mount point be specified. However, if I try "apt-cdrom -d=/cdrom add" or "apt-cdrom -d=/media/cdrom0 add", I get the same result.

I have gotten it to add the first dvd (of the eight) but not the rest. This was after numerous attempts, and I'm not exactly sure how this happened. However, it locked the dvd in the drive, requiring me to type "eject cdrom" to get it out (something which it does all the time). And "apt-cdrom add" won't work with the rest of the eight dvds.

It is in /etc/fstab:
Code:
debian:/home/mark# mount /cdrom
debian:/home/mark# ls -alF /cdrom
lrwxrwxrwx 1 root root 11 Jul 23  2006 /cdrom -> media/cdrom/
debian:/home/mark# umount /cdrom
debian:/home/mark#
But, regardless, "apt-cdrom add" is not working. Any idea how I can fix this?
 
Old 03-06-2011, 09:56 AM   #2
odiseo77
Member
 
Registered: Dec 2004
Location: London, UK
Distribution: Debian Sid, OpenSUSE 13.1
Posts: 953

Rep: Reputation: 276Reputation: 276Reputation: 276
Code:
W: Failed to mount '/dev/sr0' to '/media/apt/'
Looks like, for some reason, the system is trying to mount your cd/dvd drive in /media/apt instead of /media/cdrom0. Did you check that the mount point for the drive is properly set in /etc/fstab? The line for the cd/dvd drive should look something like this:

Code:
/dev/sr0       /media/cdrom0   udf,iso9660 user,noauto     0       0

Last edited by odiseo77; 03-06-2011 at 10:03 AM.
 
Old 03-06-2011, 10:53 AM   #3
mark_alfred
Senior Member
 
Registered: Jul 2003
Location: Toronto, Ontario, Canada
Distribution: Ubuntu Linux
Posts: 1,033

Original Poster
Rep: Reputation: 95
Hi. Thanks for your response. So, here's the /etc/fstab file:
Code:
#/dev/cdrom1    /media/cdrom0   udf,iso9660 user,noauto 0       0
#/dev/sr0       /cdrom          auto    defaults,noauto,ro      0       0
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto 0       0
#/dev/cdrom1    /cdrom  auto    defaults,noauto,ro      0       0
I believe I have tried every combination of these entries possible. Anyway, the line "/dev/sr0 /cdrom auto defaults,noauto,ro 0 0" comes from the release notes. However, when I try it without that line (and I've used both /dev/cdrom1 and /dev/sr0 for it), using the line you suggested (see code above), I get the following result:
Code:
debian:/home/mark# apt-cdrom add
Using CD-ROM mount point /cdrom/
Unmounting CD-ROM
Waiting for disc...
Please insert a Disc in the drive and press enter 
Mounting CD-ROM...
Identifying.. [ab83f92e407f9208490c1bcc61ef4844-2]
Scanning disc for index files..
Found 0 package indexes, 0 source indexes, 0 translation indexes and 0 signatures
E: Unable to locate any package files, perhaps this is not a Debian Disc or the wrong architecture?
debian:/home/mark# eject cdrom
debian:/home/mark#
Notice too that after doing this that the dvd will not come out of the drive unless I type the command "eject cdrom".
 
Old 03-08-2011, 02:19 PM   #4
jae
LQ Newbie
 
Registered: Mar 2011
Posts: 2

Rep: Reputation: 0
So, how did you solve it? It is marked "SOLVED"... or did someone mark it erroneously?
 
Old 03-08-2011, 04:06 PM   #5
mark_alfred
Senior Member
 
Registered: Jul 2003
Location: Toronto, Ontario, Canada
Distribution: Ubuntu Linux
Posts: 1,033

Original Poster
Rep: Reputation: 95
Yeah. I initially could not get "apt-cdrom add" to read the disc. However, after changing my sources.list to just http, and then finishing the dist-upgrade, I was able to get apt-cdrom to read the Debian DVD's files, and add the DVD to the sources. So, the issue I wrote about was solved. However, other issues have since come up, such as only being able to install one package from the DVD sources (see bug 606930).

I don't think Squeeze works well with using the Debian DVDs as a source. I think the only solution for using Debian DVDs as your sources with Squeeze is to file a bug report and wait (though perhaps they work from a fresh install -- mine was an upgrade from Lenny.)

I did discover though that simply having /etc/fstab read "/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0" for the cdrom, and not simultaneously having the line that the release notes for Squeeze suggested (that being "/dev/sr0 /cdrom/ auto defaults,noauto,ro 0 0") did solve the issue I initially posted about. So, that problem is solved.

Last edited by mark_alfred; 03-09-2011 at 08:26 PM.
 
Old 03-10-2011, 07:22 AM   #6
jae
LQ Newbie
 
Registered: Mar 2011
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by mark_alfred View Post
Yeah. I initially could not get "apt-cdrom add" to read the disc. However, after changing my sources.list to just http, ...
Good. I solved mine by adding

Acquire::cdrom::mount "/media/apt/";

to /etc/apt/apt.conf when I realized it did mount it to /media/apt, but had /media/cdrom (or cdrom0) for the Acquire:: option (and /media/apt as Dir::Media::MountPath. Not sure what went how and why here, but it did solve it. I *suspect* it used /media/apt as the mount point (as shown by the CD actually being mounted there) but used the /media/cdrom path to try to access it (as seen from the File not found messages)
 
  


Reply

Tags
apt-cdrom, debian, squeeze, upgrade


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] Difference between add-apt-repository and apt-add-repository Kenny_Strawn Ubuntu 3 12-22-2010 07:50 PM
apt-cdrom add not responding rumz70 Linux - Newbie 1 01-04-2008 05:47 PM
'apt-cdrom add' is not working Saketh Linux - Hardware 2 06-05-2005 01:01 AM
problems with cdrom and apt g-string 3 Linux - General 6 12-10-2004 04:54 AM
apt-get vs apt-cdrom Gurduloo Linux - General 4 02-27-2004 10:40 PM


All times are GMT -5. The time now is 08:27 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration