apt-get use mounted .iso

If none of the more specific forums is the right place to ask

apt-get use mounted .iso

Postby max4ever » 2005-08-07 13:59

i have mounted my 2 dvd iso in /media/Debian1 and /media/Debian2
1)but i don't know how to make apt-get use these two without asking me to switch dvd
what should i write in /etc/apt/sources.list ? (man page are confusing )

here is what i currently have :
Code: Select all
max@coldbox:/etc/apt$ cat sources.list
#deb file:///cdrom/ sarge main

deb cdrom:[Debian GNU/Linux 3.1 r0a _Sarge_ - Official i386 Binary-2 (20050607)]/ unstable contrib main
deb cdrom:[Debian GNU/Linux 3.1 r0a _Sarge_ - Official i386 Binary-1 (20050607)]/ unstable contrib main


# deb http://security.debian.org/ stable/updates main contrib
max@coldbox:/etc/apt$


2) also could i somehow get rid of the /cdrom link to /media/cdrom ?

thank you :oops:
max4ever
 

Postby Harold » 2005-08-08 21:07

I believe (I hope!) that apt-cdrom will configure cdroms *and* dvds. Insert your dvds into the drives and try the following:

# apt-cdrom -d /media/Debian1 add
# apt-cdrom -d /media/Debian2 add

I am assuming that /media/Debian1 and /media/Debian2 are how your dvd drives are listed in /etc/fstab. If that is not the case, then use the /etc/fstab designations.

If I understand your second question, you want your cdrom drive identified *only* as /cdrom and *not* as /media/cdrom. Do # dpkg-reconfigure discover1 and tell discover1 *not* to manage the cdrom mount points. Then update the mount point in /etc/fstab.
Harold
 
Posts: 1501
Joined: 2005-01-07 00:15

Postby Guest » 2005-08-08 21:22

what i wanted to do is
1) make apt-get use my downloaded dvd .iso(=images) which i mount in /media/Debian1 and /media/Debian2 instead of asking me to put my real burned dvds in my real dvd player

here is my fstab
Code: Select all
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/hdb1       /               ext3    defaults,errors=remount-ro 0       1
/dev/hdb5       none            swap    sw              0       0
/dev/hdc        /media/cdrom0   auto    ro,user,noauto  0       0
/dev/hdd        /media/cdrom1   auto   ro,user,noauto  0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0
/dev/sda1   /media/Downloads   ntfs   auto,exec,nosuid,ro,user,umask=0022,gid=users,nls=utf8    0   0
/dev/sda2   /media/WinXP   ntfs   auto,exec,nosuid,ro,user,umask=0022,gid=users,nls=utf8   0   0
/dev/sda3   /media/P2P   ntfs   auto,exec,nosuid,ro,user,umask=0022,gid=users,nls=utf8   0   0
/media/Downloads/Dvd/Debian/jigdo/debian-31r0a-i386-binary-1.iso   /media/Debian1   auto   ro,user,loop,auto   0   0
/media/Downloads/Dvd/Debian/jigdo/debian-31r0a-i386-binary-2.iso   /media/Debian2   auto   ro,user,loop,auto   0   0


2) harold your answer to 2nd question didn't help
here is what error i get with synaptic when i try to install something
Code: Select all
W: Errore nello scaricamento di cdrom:[Debian GNU/Linux 3.1 r0a _Sarge_ - Official i386 Binary-1 (20050607)]/pool/main/j/java-common/java-common_0.22_all.deb
  Impossibile accedere al mount point /cdrom/ - stat (2 No such file or directory)
it's in italian but basically it says can't access /cdrom/
maybe becase the /etc/apt/sources.list hasn't changed :?:

thanks in advance
Guest
 

Postby Harold » 2005-08-08 22:07

The lines
/media/Downloads/Dvd/Debian/jigdo/debian-31r0a-i386-binary-1.iso /media/Debian1 auto ro,user,loop,auto 0 0 and
/media/Downloads/Dvd/Debian/jigdo/debian-31r0a-i386-binary-2.iso /media/Debian2 auto ro,user,loop,auto 0 0
need to be *removed* from /etc/fstab. The purpose of /etc/fstab is to identify your cdrom, dvd and floppy drives, *not* the cdroms, dvds and floppies that you insert into those drives.

@#$%^&*! Those dvd images are HUGE! I have no idea what could be on them, unless they contain images of all 14 Sarge CDs.

Are /dev/hdc and /dev/hdd dvd drives? I don't have a dvd drive, so I'm assuming that they *are* dvd drives and that it is normal for Linux to identify dvd drives in /etc/fstab as cdrom drives. If this is not correct, let me know.

max4ever> what i wanted to do is (1) make apt-get use my downloaded dvd .iso(=images) which i mount in /media/Debian1
max4ever> and /media/Debian2 instead of asking me to put my real burned dvds in my real dvd player.

Ok, I understand now. You do *not* want to put .iso files into /media/Debian1 and /media/Debian2. Instead, you want to put the directories contained in those .iso files into a common directory /media/Debian and designate this directory as a local apt source. Let me look into this.

max4ever> 2) harold your answer to 2nd question didn't help. here is what error i get with synaptic when i try to install something

Show me the contents of your /etc/apt/sources.list, please.
Harold
 
Posts: 1501
Joined: 2005-01-07 00:15

Postby Harold » 2005-08-09 00:08

I downloaded http://cdimage.debian.org/debian-cd/3.1 ... nary-1.iso into /usr/src.

I made two new directories on my hard drive:
# mkdir /iso_image/
# mkdir -p /media/debian/


I mounted the iso image, saved its contents, then unmounted it.
# mount -t iso9660 -o ro,loop /usr/src/debian-31r0a-i386-binary-1.iso /iso_image
# cp /iso_image/* -R /media/debian/
# umount /iso_image


I backed up /etc/apt/sources.list, rem'ed all existing lines and added the following line:
deb file:/media/debian/ stable main contrib

Finally, I opened dselect and updated the Debian package list.
dselect recognized /media/debian as a valid local Debian package repository. :-)
Harold
 
Posts: 1501
Joined: 2005-01-07 00:15

Postby max4ever » 2005-08-14 11:03

thank you all, i have found the fix bymyself
here is what i did

/etc/fstab
Code: Select all
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/hdb1       /               ext3    defaults,errors=remount-ro 0       1
/dev/hdb5       none            swap    sw              0       0
/dev/hdc        /media/DVD      auto    ro,user,noauto  0       0
/dev/hdd        /media/Cdrom    auto    ro,user,noauto  0       0
/dev/fd0        /media/floppy   auto    rw,user,noauto  0       0
/dev/sda1       /media/Downloads        ntfs    auto,exec,nosuid,ro,user,umask=0022,gid=users,nls=utf8   0       0
/dev/sda2       /media/WinXP    ntfs    auto,exec,nosuid,ro,user,umask=0022,gid=users,nls=utf8  0/dev/sda3       /media/P2P      ntfs    auto,exec,nosuid,ro,user,umask=0022,gid=users,nls=utf8  0/media/Downloads/Dvd/Debian/jigdo/debian-31r0a-i386-binary-1.iso        /media/Debian1  auto    ro,user,loop,auto        0       0
/media/Downloads/Dvd/Debian/jigdo/debian-31r0a-i386-binary-2.iso        /media/Debian2  auto    ro,user,loop,auto        0       0


and /etc/apt/sources.list
Code: Select all
#deb file:///cdrom/ sarge main

#deb cdrom:[Debian GNU/Linux 3.1 r0a _Sarge_ - Official i386 Binary-2 (20050607)]/ unstable contrib main
#deb cdrom:[Debian GNU/Linux 3.1 r0a _Sarge_ - Official i386 Binary-1 (20050607)]/ unstable contrib main
deb file:/media/Debian1 unstable contrib main
deb file:/media/Debian2 unstable contrib main

#online updates
deb http://security.debian.org/ sarge/updates main contrib non-free
deb http://debian.fastweb.it/debian stable main contrib non-free

#ati drivers
deb http://www.stanchina.net/~flavio/debian-fglrx-xfree86/ ./
deb http://www.stanchina.net/~flavio/debian-fglrx-modules/ ./


cheers
max4ever
 


Return to General Questions

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable