Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Say I have this line in "/etc/fstab":

/iso/apt.iso /mnt/apt iso9660 loop 0 0

And I run these commands as root:

mount --all
apt-cdrom add --no-mount --cdrom /mnt/apt

I expected the disk to be added as APT source, but nothing happens. What's missing?

UPDATE:

I followed this advice and now I'm getting this:

Using CD-ROM mount point /media/cdrom/
Identifying.. [61c5dd7c11a32dc999e655c235cd698e-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/cdrom/'
E: Unable to locate any package files, perhaps this is not a Debian Disc or the wrong architecture?

This happens with or without "/etc/apt/apt.conf" changes.

share|improve this question
    
Did you run mount /mnt/apt before apt-cdrom -m -d=/mnt/apt add? –  forcefsck Mar 16 '11 at 19:13
    
@forcefsck: I used mount --all before the apt-cdrom cmd. –  Tshepang Mar 17 '11 at 10:12
add comment

1 Answer

here's what worked for me:

first, the line in /etc/fstab should look like this:

/iso/apt.iso /mnt/apt iso9660 user,loop 0 0

then, with the mount-point mounted, run apt-cdrom like this:

apt-cdrom -m -d=/mnt/apt add

if apt still asks you to insert the disk, add these lines to apt.conf

Acquire::cdrom::mount "/mnt/apt";
APT::CDROM::NoMount;

I think you should find this will work for you too :)

share|improve this answer
    
Please see updated question. –  Tshepang Mar 8 '11 at 18:52
    
@Thsepang: is /media/cdrom the physical CD drive? Is a CD/DVD with the expected folder structure in the drive? –  0xC0000022L Mar 11 '11 at 13:49
    
@STATUS_ACCESS_DENIED: If you read the question more carefully, you will realise that it's an ISO file. As for second question, yeah it's a valid APT ISO. –  Tshepang Mar 15 '11 at 9:52
    
@STATUS_ACCESS_DENIED: check this out stackapps.com/q/2051/5198 –  Tshepang Mar 15 '11 at 10:00
    
@Tshepang: I realize that, but that mount point is usually used for the physical drive. –  0xC0000022L Mar 15 '11 at 12:16
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.