apt-cdrom fails due to inconsistent choice of mount points

Bug #602945 reported by John Pearson
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: apt

I did a network (medialess) install of Ubuintu 10.04LTS on a new PC, then added a CDROM source using "apt-cdrom add".

It recongized my media and added appropriate lines to sources.list anmd so on, but installing packages from the CDROM at the console command line fails with "file not found" messages.

On this system (presumably, because it's a medialess install) there is no entry for the cdrom in /etc/fstab.

It looks like what happens is that apt-get, etc., mount the CDROM at /media/apt, but when lookng for packages it's searching under /cdrom, whgich does not exist.

Creating a symbolic link to /media/apt at /cdrom allows things to work, but should not be necessary. Apt-cdrom should use the same mountpoint for accessing files on the CDROM as it used to mount the medium.

Revision history for this message
Kwok Ho Yin (hykwok1) wrote :

I think this bug are also related to the following bugs:

https://bugs.launchpad.net/ubuntu/+source/apt/+bug/539219
https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/579110

I have read the source codes of APT, Synaptic, software-properties, software-properties-gtk and Python-apt and I think you have to mount the CD/DVD to /cdrom/ because of this line:

string CDROM = _config->FindDir("Acquire::cdrom::mount", "/cdrom/")

This code can be found in:

Synaptic package: rcdscanner.cc and apt package: apt-pkg/cdrom.cc

And the meaning of this line is: If the value of the key "Acquire::cdrom::mount" is empty, then "/cdrom/" will be used.

That's why sometimes you have to create the symbolic link for "/cdrom/".

Well, for a normal user, how to assign the mount point to the key "Acquire::cdrom::mount"?
Now, I have found two ways:

In the console, run:

1. sudo synaptic --add-cdrom {mount point}. For example, sudo synaptic --add-cdrom /media/APTonCD/

OR

2. sudo apt-cdrom add --auto-detect

At this moment, I don't know why the value of the key "Acquire::cdrom::mount" becomes empty.
Also, for me, I could not submit any patch because I am not familiar with Python language.

Therefore, I wish my report can help someone to solve this problem.

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

The path should be autodetect via udev. Could you please run:
$ sudo apt-get install -o Debug::Acquire::cdrom=true some-package-from-the-cd
and attach the output here?

Revision history for this message
John Pearson (johnp-gtagalenco) wrote : Re: [Bug 602945] Re: apt-cdrom fails due to inconsistent choice of mount points

Hi,

I'm now unable to reproduce this bug: on a fresh media-less 10.04
install apt-get can now install packages from my CDR, using '/cdrom' as
its mount point. Perhaps, something in 10.04.1 had a positive effect on
the issue.

So from my personal point of view, I think you can close this bug as
unreproducible.

Thanks,

John Pearson

On 31/07/10 18:01, Michael Vogt wrote:
> Thanks for your bugreport.
>
> The path should be autodetect via udev. Could you please run:
> $ sudo apt-get install -o Debug::Acquire::cdrom=true some-package-from-the-cd
> and attach the output here?
>
>

--
<email address hidden> | The greatest problem in communication is
Network Administrator | the illusion that it has been accomplished
+61 4 0739 1169 | - George Bernard Shaw: The Sanity of Art

Revision history for this message
Kwok Ho Yin (hykwok1) wrote :

Hi Michael Vogt,

Now, it is my report (Since the computer which I used for testing is not able to connect to the internet, not all output messages will be shown in the report)

1. Install Ubuntu 10.04.1 in a new harddisk.

2. Then insert a "APTonCD" DVD to the drive and then system will mount the CD automatically and "APTonCD colume detected" dialog box is shown. At this time, I chose "Start package manager" for the question "Would you like to open it with package manager?" in order to add it to the /etc/apt/sources.list.

3. Then I disabled other sources except the DVD to make sure only this line was enabled in the file /etc/apt/sources.list:
deb cdrom:[APTonCD for Ubuntu lucid - i386 (2010-07-25 20:27) DVD1]/ /

4. Then I reloaded the repositories and after that I restarted the computer. (I did not take the DVD out during restart process)

5. After reboot process, Ubuntu mounted the DVD automatically and I saw this line when I ran "mount" command:
/dev/sr0 on /media/APTonCD type iso9660 (.............)

6. Then I ran this command:
sudo apt-get install -o Debug::Acquire::cdrom=true build-essential

7. APT said some additional packages has to be installed. OK, I pressed "Y" and "Enter"

8. Then I saw some messages like this:
...................
...................
Looking for CDROM at /cdrom/
ID 2 bc97f65c075ecaee181f1e55cbe66d89-2
ID 2 bc97f65c075ecaee181f1e55cbe66d89-2
...................
...................
Looking for CDROM at /cdrom/
...................
...................
File not found
...................
...................

Revision history for this message
bim (mng-kingston) wrote :

I had no problems with 10.04, but 10.10 cannot handle the drive.

The disk utility for /dev/sr0 says
Location: Port 1 of PATA Host Adapter
Capacity: 2.0 KB
Connection: SCSI
SMART Status: Not Supported

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks Kwok Ho Yin! I repeat all the steps you described under ubuntu natty now and can not reproduce the problem here anymore. It would be nice to know the bug is still reproducable for you on 10.10 (maverick) and the 11.04 development images.

Thanks,
 Michael

Changed in apt (Ubuntu):
status: New → Incomplete
importance: Undecided → Medium
Revision history for this message
Michael Vogt (mvo) wrote :

Hey John Pearson. I tried reproducing the bug you describe under the current development version of 11.04 and can not reproduce it. I did not do a full media less install, but removed the /cdrom symlink and tried both with mounted and unmounted cdrom. Both times apt found it.

Revision history for this message
Michael Vogt (mvo) wrote :

I also removed the cdrom entry in /etc/fstab and it still was able to get the package from the cdrom (tried both mounted and unmounted case before running apt-get install).

Revision history for this message
xteejx (xteejx-deactivatedaccount) wrote :

We are closing this bug report because it lacks the development release testing required as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in apt (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Jim Shank (jshank-ubuntu) wrote :

I am a newbie to Linux...very new! If the following question belongs on another forum, I apologize. I am having problems trying to burn an .iso of "Ultimate Boot CD".

A Google search sent me to this forum as a result of the above post from User: "bim (mng-kingston)" dated 2010-11-24. Bim says:

"The disk utility for /dev/sr0 says
Location: Port 1 of PATA Host Adapter
Capacity: 2.0 KB
Connection: SCSI
SMART Status: Not Supported"

I have a dual-boot laptop (Windows 7 and Ubuntu 11.04). I have had problems before with Windows not recognizing the cd. It is happening again today, so I thought I would try it in Linux. When I ran Disk Utility, I got the exact same information listed by Bim, including the disk's capacity as 2 KB. Is this a standard response? The capacity of a cd is about 700 MB.

Nevertheless, I decided to go ahead and try to burn the .iso using Brasero. After doing so, I told Brasero to check the disk integrity and it found no problem. What is my next step?

Piotr Darzyn (darzynp)
Changed in apt (Ubuntu):
status: Invalid → New
status: New → Incomplete
status: Incomplete → Opinion
status: Opinion → Invalid
status: Invalid → Confirmed
status: Confirmed → In Progress
status: In Progress → Fix Committed
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers