"apt-cdrom add" using an ISO image

Hi,

I'd like to loop-mount an ISO image and do an "apt-cdrom add" from it.
I looked around and couldn't find the option. Is it possible?

--
my place on the web:
floss-and-misc.blogspot.com

--

0

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

"apt-cdrom add" using an ISO image

On Thu, Sep 20, 2007 at 07:35:07AM +0200, Tshepang Lekhonkhobe wrote:
> Hi,
>
> I'd like to loop-mount an ISO image and do an "apt-cdrom add" from it.
> I looked around and couldn't find the option. Is it possible?

From the manpages I think this should to the trick (untested)

mount /my/image.iso /mountpoint -oloop
apt-cdrom -d=/mountpoint add

And /mountpoint must be listed in fstab.

Regards,
Andrei
--
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)

"apt-cdrom add" using an ISO image

On Thu, Sep 20, 2007 at 08:57:28AM +0300, Andrei Popescu wrote:
> On Thu, Sep 20, 2007 at 07:35:07AM +0200, Tshepang Lekhonkhobe wrote:
> > Hi,
> >
> > I'd like to loop-mount an ISO image and do an "apt-cdrom add" from it.
> > I looked around and couldn't find the option. Is it possible?
>
> From the manpages I think this should to the trick (untested)
>
> mount /my/image.iso /mountpoint -oloop
> apt-cdrom -d=/mountpoint add
>
> And /mountpoint must be listed in fstab.
>

For this, I would suggest creating a dedicated mount point and puting
the whole thing in fstab. This way, aptitude can have apt mount the CD
without any further intervention from you.

Doug.

--

"apt-cdrom add" using an ISO image

On 9/20/07, Douglas A. Tutty wrote:
> On Thu, Sep 20, 2007 at 08:57:28AM +0300, Andrei Popescu wrote:
> > On Thu, Sep 20, 2007 at 07:35:07AM +0200, Tshepang Lekhonkhobe wrote:
> > > Hi,
> > >
> > > I'd like to loop-mount an ISO image and do an "apt-cdrom add" from it.
> > > I looked around and couldn't find the option. Is it possible?
> >
> > From the manpages I think this should to the trick (untested)
> >
> > mount /my/image.iso /mountpoint -oloop
> > apt-cdrom -d=/mountpoint add
> >
> > And /mountpoint must be listed in fstab.
> >
>
> For this, I would suggest creating a dedicated mount point and puting
> the whole thing in fstab. This way, aptitude can have apt mount the CD
> without any further intervention from you.

Amazing that the options were glaring at me on the man pages. Thanks...

--
my place on the web:
floss-and-misc.blogspot.com

--

"apt-cdrom add" using an ISO image

On 9/20/07, Douglas A. Tutty wrote:
> On Thu, Sep 20, 2007 at 08:57:28AM +0300, Andrei Popescu wrote:
> > On Thu, Sep 20, 2007 at 07:35:07AM +0200, Tshepang Lekhonkhobe wrote:
> > > Hi,
> > >
> > > I'd like to loop-mount an ISO image and do an "apt-cdrom add" from it.
> > > I looked around and couldn't find the option. Is it possible?
> >
> > From the manpages I think this should to the trick (untested)
> >
> > mount /my/image.iso /mountpoint -oloop
> > apt-cdrom -d=/mountpoint add
> >
> > And /mountpoint must be listed in fstab.
> >
>
> For this, I would suggest creating a dedicated mount point and puting
> the whole thing in fstab. This way, aptitude can have apt mount the CD
> without any further intervention from you.

The relevant fstab line looks like this:

#
/home/wena/aptoncd.iso /home/wena/soka iso9660 user,loop 0 0

With this I'm able to add the contents to sources.list with:

apt-cdrom -m -d=/home/wena/soka add

But then later apt keeps asking me to insert the disk inside as if it
does not notice that the image is already mounted. How can I let it
install from a mounted image? This is what the relevant line in
sources.list file looks like:

deb cdrom:[APTonCD for - i386 (2007-10-17 13:19) DVD1]/ /

--
my place on the web:
floss-and-misc.blogspot.com

--

"apt-cdrom add" using an ISO image

On 10/19/07, Tshepang Lekhonkhobe wrote:
> On 9/20/07, Douglas A. Tutty wrote:
> > On Thu, Sep 20, 2007 at 08:57:28AM +0300, Andrei Popescu wrote:
> > > On Thu, Sep 20, 2007 at 07:35:07AM +0200, Tshepang Lekhonkhobe wrote:
> > > > Hi,
> > > >
> > > > I'd like to loop-mount an ISO image and do an "apt-cdrom add" from it.
> > > > I looked around and couldn't find the option. Is it possible?
> > >
> > > From the manpages I think this should to the trick (untested)
> > >
> > > mount /my/image.iso /mountpoint -oloop
> > > apt-cdrom -d=/mountpoint add
> > >
> > > And /mountpoint must be listed in fstab.
> > >
> >
> > For this, I would suggest creating a dedicated mount point and puting
> > the whole thing in fstab. This way, aptitude can have apt mount the CD
> > without any further intervention from you.
>
>
> The relevant fstab line looks like this:
>
> #
> /home/wena/aptoncd.iso /home/wena/soka iso9660 user,loop 0 0
>
> With this I'm able to add the contents to sources.list with:
>
> apt-cdrom -m -d=/home/wena/soka add
>
> But then later apt keeps asking me to insert the disk inside as if it
> does not notice that the image is already mounted. How can I let it
> install from a mounted image? This is what the relevant line in
> sources.list file looks like:
>
> deb cdrom:[APTonCD for - i386 (2007-10-17 13:19) DVD1]/ /

searching through the archives I got this to work by putting ff in my apt.conf:

Acquire::cdrom::mount "/home/wena/soka";
APT::CDROM::NoMount;

--
my place on the web:
floss-and-misc.blogspot.com

--

"apt-cdrom add" using an ISO image

And if I have two disks?
I tried so:

Acquire::cdrom::mount "path1";
Acquire::cdrom::mount "path2";

and so:

Acquire::cdrom::mount "path1, path2";

and even so:

Acquire::cdrom::mount "path[12]";

but it isn't correct.

What is right solution?

Re: "apt-cdrom add" using an ISO image"

Hi,

I had a similar problem - I had downloaded the DVDs and wanted to set up a VMware machine that didn't rely on the network for aptitude package installations. First, I created 3 dvd drives, one for each dvd. Then I spent a fair amount of time working with apt-cdrom. I was able to get it to recognize 2/3 of the dvds, but couldn't get all three online at the same time.

Eventually I figured out that if I added the mounted dvds directly to the sources.list using the 'file' type, I was able to use them as a local repository.

To do this, I created three directories (mkdir /deb1 /deb2 /deb3).

Add these three lines to /etc/fstab
/dev/hdc /deb1 udf,iso9660 user 0 0
/dev/hda /deb2 udf,iso9660 user 0 0
/dev/hdb /deb3 udf,iso9660 user 0 0

where X in /dev/hdX corresponds to the drive device created by VMware for the dvd isos.

Finally, I added these three lines to /etc/apt/sources.list
deb file:/deb1/ etch contrib main
deb file:/deb2/ etch contrib main
deb file:/deb3/ etch contrib main

That solved my problem, and I hope it solves yours.

Ad.

Syndicate content