Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #235129 > unrolled thread

Re: How to reference xxxdvd1.iso in sources.list

Started by<tomas@tuxteam.de>
First post2021-05-12 21:50 +0200
Last post2021-05-13 21:20 +0200
Articles 14 — 5 participants

Back to article view | Back to linux.debian.user

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: How to reference xxxdvd1.iso in sources.list <tomas@tuxteam.de> - 2021-05-12 21:50 +0200
    Re: How to reference xxxdvd1.iso in sources.list Richard Owlett <rowlett@cloud85.net> - 2021-05-13 11:40 +0200
      Re: How to reference xxxdvd1.iso in sources.list <tomas@tuxteam.de> - 2021-05-13 12:00 +0200
        Re: How to reference xxxdvd1.iso in sources.list "Thomas Schmitt" <scdbackup@gmx.net> - 2021-05-13 12:50 +0200
          Re: How to reference xxxdvd1.iso in sources.list Richard Owlett <rowlett@cloud85.net> - 2021-05-13 13:50 +0200
            Re: How to reference xxxdvd1.iso in sources.list <tomas@tuxteam.de> - 2021-05-13 15:40 +0200
              Re: How to reference xxxdvd1.iso in sources.list David Wright <deblis@lionunicorn.co.uk> - 2021-05-13 17:10 +0200
              Re: How to reference xxxdvd1.iso in sources.list Richard Owlett <rowlett@cloud85.net> - 2021-05-13 17:10 +0200
                Re: How to reference xxxdvd1.iso in sources.list <tomas@tuxteam.de> - 2021-05-13 17:20 +0200
              Re: How to reference xxxdvd1.iso in sources.list "Andrew M.A. Cater" <amacater@einval.com> - 2021-05-13 17:50 +0200
                Re: How to reference xxxdvd1.iso in sources.list <tomas@tuxteam.de> - 2021-05-13 19:00 +0200
                  Re: How to reference xxxdvd1.iso in sources.list "Andrew M.A. Cater" <amacater@einval.com> - 2021-05-13 19:40 +0200
                    Re: How to reference xxxdvd1.iso in sources.list "Thomas Schmitt" <scdbackup@gmx.net> - 2021-05-13 21:20 +0200
                    Re: How to reference xxxdvd1.iso in sources.list <tomas@tuxteam.de> - 2021-05-13 21:20 +0200

#235129 — Re: How to reference xxxdvd1.iso in sources.list

From<tomas@tuxteam.de>
Date2021-05-12 21:50 +0200
SubjectRe: How to reference xxxdvd1.iso in sources.list
Message-ID<Ce31L-1f9-1@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

On Wed, May 12, 2021 at 02:05:59PM -0500, Richard Owlett wrote:
> I've seen a reference to using the ISO file of DVDnn in a sources.list .
> I remember that it gets identified as being ISO9660 and labeled as
> trusted, But I can't find a detailed example. All I find are
> references to unpacking the iso to a directory which is then loop
> mounted. That's not what I'm looking for.

If I got you right, you want the 'cdrom' schema. See sources.list(5)
man page.

This wiki [1] suggests using apt-cdrom to do the magic for you

HTH, cheers

[1] https://wiki.debian.org/SourcesList#CD-ROM

 - t

[toc] | [next] | [standalone]


#235154

FromRichard Owlett <rowlett@cloud85.net>
Date2021-05-13 11:40 +0200
Message-ID<CefZ0-1pF-5@gated-at.bofh.it>
In reply to#235129
On 05/12/2021 02:44 PM, tomas@tuxteam.de wrote:
> On Wed, May 12, 2021 at 02:05:59PM -0500, Richard Owlett wrote:
>> I've seen a reference to using the ISO file of DVDnn in a sources.list .
>> I remember that it gets identified as being ISO9660 and labeled as
>> trusted, But I can't find a detailed example. All I find are
>> references to unpacking the iso to a directory which is then loop
>> mounted. That's not what I'm looking for.
> 
> If I got you right, you want the 'cdrom' schema. See sources.list(5)
> man page.
> 
> This wiki [1] suggests using apt-cdrom to do the magic for you
> 
> HTH, cheers
> 
> [1] https://wiki.debian.org/SourcesList#CD-ROM
> 
>   - t
> 

But I have an iso file on a disk drive -- be it internal HDD or a USB 
flash drive.

[toc] | [prev] | [next] | [standalone]


#235155

From<tomas@tuxteam.de>
Date2021-05-13 12:00 +0200
Message-ID<Cegim-1xa-13@gated-at.bofh.it>
In reply to#235154

[Multipart message — attachments visible in raw view] — view raw

On Thu, May 13, 2021 at 04:35:38AM -0500, Richard Owlett wrote:
> On 05/12/2021 02:44 PM, tomas@tuxteam.de wrote:

[...]

> >This wiki [1] suggests using apt-cdrom to do the magic for you

> >[1] https://wiki.debian.org/SourcesList#CD-ROM

[...]

> But I have an iso file on a disk drive -- be it internal HDD or a
> USB flash drive.

"If all else fails, read the instructions" ;-)

The wiki I pointed you to above has this to say (that section
is just a couple of lines, less than this mail is long!):

   "If you'd rather use your CD-ROM [...] you can put it in your
    /etc/apt/sources.list. To do so, you can use the apt-cdrom
    program like this:

    # apt-cdrom add

    with the Debian CD-ROM in the drive."

And now this is for you:

   "You can use -d for the directory of the CD-ROM mount point
    or add a non-CD mount point (i.e. a USB keydrive)."

If I were you, I'd try and see what

  "apt-cdrom -d /path/to/mounted/usb/stick/or/whatever"

does to my sources.list(.d)

Of course, you'll have to actually *mount* that ISO file to
achieve that. You don't expect apt to duplicate the inner
workings of every file system driver under the moon to be
able to extract files from any random file system image [1],
do you?

Cheers

[1] Grub already tries to do this, alas :-/

 - t

[toc] | [prev] | [next] | [standalone]


#235156

From"Thomas Schmitt" <scdbackup@gmx.net>
Date2021-05-13 12:50 +0200
Message-ID<Ceh4J-22l-3@gated-at.bofh.it>
In reply to#235155
Hi,

tomas wrote:
> > > [1] https://wiki.debian.org/SourcesList#CD-ROM

Richard Owlett wrote:
> > But I have an iso file on a disk drive -- be it internal HDD or a USB flash
> > drive.

tomas wrote:
> And now this is for you:
>   "You can use -d for the directory of the CD-ROM mount point
>    or add a non-CD mount point (i.e. a USB keydrive)."
> If I were you, I'd try [...]
>  "apt-cdrom -d /path/to/mounted/usb/stick/or/whatever"
> [...]
> Of course, you'll have to actually *mount* that ISO file to
> achieve that.

I wonder why the wiki does not mention "file:" URIs.
  $ man sources.list
says

  "file
   The file scheme allows an arbitrary directory in the file system to
   be considered an archive. This is useful for NFS mounts and local
   mirrors or archives."

Possible benefits of "cdrom:" could be that you do not have to give the
relative path from ISO root to the /pool directory and that you may get
an opportunity to plug and mount a new USB stick if the desired file is
not found in the mounted ISOs.

It would be helpful if somebody with sufficient experience would write
something about the choice between "file:" and "cdrom:" into the wiki.


Have a nice day :)

Thomas

[toc] | [prev] | [next] | [standalone]


#235158

FromRichard Owlett <rowlett@cloud85.net>
Date2021-05-13 13:50 +0200
Message-ID<Cei0O-2HE-9@gated-at.bofh.it>
In reply to#235156
On 05/13/2021 05:42 AM, Thomas Schmitt wrote:
> Hi,
> 
> tomas wrote:
>>>> [1] https://wiki.debian.org/SourcesList#CD-ROM
> 
> Richard Owlett wrote:
>>> But I have an iso file on a disk drive -- be it internal HDD or a USB flash
>>> drive.
> 
> tomas wrote:
>> And now this is for you:
>>    "You can use -d for the directory of the CD-ROM mount point
>>     or add a non-CD mount point (i.e. a USB keydrive)."
>> If I were you, I'd try [...]
>>   "apt-cdrom -d /path/to/mounted/usb/stick/or/whatever"
>> [...]
>> Of course, you'll have to actually *mount* that ISO file to
>> achieve that.
> 
> I wonder why the wiki does not mention "file:" URIs.
>    $ man sources.list
> says
> 
>    "file
>     The file scheme allows an arbitrary directory in the file system to
>     be considered an archive. This is useful for NFS mounts and local
>     mirrors or archives."
> 
> Possible benefits of "cdrom:" could be that you do not have to give the
> relative path from ISO root to the /pool directory and that you may get
> an opportunity to plug and mount a new USB stick if the desired file is
> not found in the mounted ISOs.
> 
> It would be helpful if somebody with sufficient experience would write
> something about the choice between "file:" and "cdrom:" into the wiki.
> 
> 
> Have a nice day :)
> 
> Thomas
> 
> 
> 

Somebody has written on the general topic but what I had seen was not in 
the debian.org hierarchy. What I had seen accommodated multiple ISO9660 
DVD images in a single directory without using loop mounting. Once found 
I'd like to see it reference in Section 4.3 of "Debian GNU/Linux 
Installation Guide".

[toc] | [prev] | [next] | [standalone]


#235159

From<tomas@tuxteam.de>
Date2021-05-13 15:40 +0200
Message-ID<CejJf-3KA-1@gated-at.bofh.it>
In reply to#235158

[Multipart message — attachments visible in raw view] — view raw

On Thu, May 13, 2021 at 06:42:57AM -0500, Richard Owlett wrote:

[...]

> Somebody has written on the general topic but what I had seen was
> not in the debian.org hierarchy. What I had seen accommodated
> multiple ISO9660 DVD images in a single directory without using loop
> mounting. Once found I'd like to see it reference in Section 4.3 of
> "Debian GNU/Linux Installation Guide".

Hm. There are ways to access iso9660 without mounting it
(libiso9660, for example), but I don't think apt follows
that path (glad to learn something new).

Is there any special reason you want to avoid mounting?

Cheers
 - t

[toc] | [prev] | [next] | [standalone]


#235160

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2021-05-13 17:10 +0200
Message-ID<Cel8l-4GT-1@gated-at.bofh.it>
In reply to#235159
On Thu 13 May 2021 at 10:03:37 (-0500), Richard Owlett wrote:
> On 05/13/2021 08:32 AM, tomas@tuxteam.de wrote:
> > On Thu, May 13, 2021 at 06:42:57AM -0500, Richard Owlett wrote:
> > 
> > [...]
> > 
> > > Somebody has written on the general topic but what I had seen was
> > > not in the debian.org hierarchy. What I had seen accommodated
> > > multiple ISO9660 DVD images in a single directory without using loop
> > > mounting. Once found I'd like to see it reference in Section 4.3 of
> > > "Debian GNU/Linux Installation Guide".
> > 
> > Hm. There are ways to access iso9660 without mounting it
> > (libiso9660, for example), but I don't think apt follows
> > that path (glad to learn something new).
> > 
> > Is there any special reason you want to avoid mounting?
> > 
> It's _loop_ mounting of _each_ ISO I wish to avoid.
> 
> What I had seen had the general for in fstab of
> 
>   /dev/hdb5	/mydvds	ISO9660		defaults	1	1
> 
> and each iso of a dvd had its own line in sources.list *IIRC*

As was pointed out in
https://lists.debian.org/debian-user/2020/11/msg00422.html
this comes up again and again, as in
https://lists.debian.org/debian-user/2019/05/msg01463.html
(Second anniversary celebrations imminent.)

That thread might make a good starting point. Disclaimer:
I don't know what the OP has seen that we're all supposed
to look for, and cite in the IG.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#235161

FromRichard Owlett <rowlett@cloud85.net>
Date2021-05-13 17:10 +0200
Message-ID<Cel8l-4GT-3@gated-at.bofh.it>
In reply to#235159
On 05/13/2021 08:32 AM, tomas@tuxteam.de wrote:
> On Thu, May 13, 2021 at 06:42:57AM -0500, Richard Owlett wrote:
> 
> [...]
> 
>> Somebody has written on the general topic but what I had seen was
>> not in the debian.org hierarchy. What I had seen accommodated
>> multiple ISO9660 DVD images in a single directory without using loop
>> mounting. Once found I'd like to see it reference in Section 4.3 of
>> "Debian GNU/Linux Installation Guide".
> 
> Hm. There are ways to access iso9660 without mounting it
> (libiso9660, for example), but I don't think apt follows
> that path (glad to learn something new).
> 
> Is there any special reason you want to avoid mounting?
> 
> Cheers
>   - t
> 

It's _loop_ mounting of _each_ ISO I wish to avoid.

What I had seen had the general for in fstab of

   /dev/hdb5	/mydvds	ISO9660		defaults	1	1

and each iso of a dvd had its own line in sources.list *IIRC*

[toc] | [prev] | [next] | [standalone]


#235163

From<tomas@tuxteam.de>
Date2021-05-13 17:20 +0200
Message-ID<Celi2-4K2-5@gated-at.bofh.it>
In reply to#235161

[Multipart message — attachments visible in raw view] — view raw

On Thu, May 13, 2021 at 10:03:37AM -0500, Richard Owlett wrote:

[...]

> It's _loop_ mounting of _each_ ISO I wish to avoid.

Again, glad to be proven wrong. But /if/ the iso file system image
is lying around as a file in a mounted file system, I don't see a
way around a loop device to actually mount it.

Different, of course from the case where it's on a medium (stick,
partition, you name it) which already appears as a device.

> What I had seen had the general for in fstab of
> 
>   /dev/hdb5	/mydvds	ISO9660		defaults	1	1
> 
> and each iso of a dvd had its own line in sources.list *IIRC*

This would work for a "real" CDROM, for a dedicated disk partition,
for an USB stick (or a partition therein).

For an image file, the missing link, AFAIK, is a loopback device,
which you seem to dislike (I don't know yet why).

Cheers
 - t

[toc] | [prev] | [next] | [standalone]


#235164

From"Andrew M.A. Cater" <amacater@einval.com>
Date2021-05-13 17:50 +0200
Message-ID<CelL4-4Tn-3@gated-at.bofh.it>
In reply to#235159
On Thu, May 13, 2021 at 03:32:31PM +0200, tomas@tuxteam.de wrote:
> On Thu, May 13, 2021 at 06:42:57AM -0500, Richard Owlett wrote:
> 
> [...]
> 
> > Somebody has written on the general topic but what I had seen was
> > not in the debian.org hierarchy. What I had seen accommodated
> > multiple ISO9660 DVD images in a single directory without using loop
> > mounting. Once found I'd like to see it reference in Section 4.3 of
> > "Debian GNU/Linux Installation Guide".
> 
> Hm. There are ways to access iso9660 without mounting it
> (libiso9660, for example), but I don't think apt follows
> that path (glad to learn something new).
> 
> Is there any special reason you want to avoid mounting?
> 
> Cheers
>  - t

If you _really_ want to have one .iso to mount - this is where the 16G .iso
or the BluRay sized disks help - one image that holds a larger chunk of the 
whole archive.

apt-cdrom will effectively read the index(es) off the .iso of what packages 
there are and will cache that. If you have multiple DVDs, it will prompt you to 
change them - so, actually, you could mount the DVD images in separate 
directories under /media as individual mount points and then run apt-cdrom 
to index them all with Tomas -d switch, as outlined above.

For me - I find that a netinst - and internet bandwidth - is all that I need
but I recognise that that's not everyone's cup of $BEVERAGE.

All best, as ever,

Andy C.

[toc] | [prev] | [next] | [standalone]


#235166

From<tomas@tuxteam.de>
Date2021-05-13 19:00 +0200
Message-ID<CemQO-5uz-5@gated-at.bofh.it>
In reply to#235164

[Multipart message — attachments visible in raw view] — view raw

On Thu, May 13, 2021 at 03:47:34PM +0000, Andrew M.A. Cater wrote:

Hi, Andrew

thanks for chiming in

> If you _really_ want to have one .iso to mount - this is where the 16G .iso
> or the BluRay sized disks help - one image that holds a larger chunk of the 
> whole archive.

Yes, one big .iso seems to be more comfortable than a whole bunch of
smaller ones.

> apt-cdrom will effectively read the index(es) off the .iso of what packages 
> there are and will cache that.

I understand that: this is the "iso sister" of apt(-get) update.

My question: it does operate on the (already mounted) .iso image, right?
Or does it do the (loopback and) mounting on its own?

>                                 If you have multiple DVDs, it will prompt you to 
> change them - so, actually, you could mount the DVD images in separate 
> directories under /media as individual mount points and then run apt-cdrom 
> to index them all with Tomas -d switch, as outlined above.

Yes, that makes sense. Perhaps dedicate one directory to each install
medium (/media/installers/buster/cd-23 or something).

> For me - I find that a netinst - and internet bandwidth - is all that I need
> but I recognise that that's not everyone's cup of $BEVERAGE.

ISTR that Richard's Internet connectivity isn't... stellar. Sitting behind
a >= 4Mbit spoils us, it seems :-)

Cheers
 - t

[toc] | [prev] | [next] | [standalone]


#235167

From"Andrew M.A. Cater" <amacater@einval.com>
Date2021-05-13 19:40 +0200
Message-ID<Centv-5Xx-1@gated-at.bofh.it>
In reply to#235166
On Thu, May 13, 2021 at 06:53:28PM +0200, tomas@tuxteam.de wrote:
> On Thu, May 13, 2021 at 03:47:34PM +0000, Andrew M.A. Cater wrote:
> 
> Hi, Andrew
> 
> thanks for chiming in
> 
> > If you _really_ want to have one .iso to mount - this is where the 16G .iso
> > or the BluRay sized disks help - one image that holds a larger chunk of the 
> > whole archive.
> 
> Yes, one big .iso seems to be more comfortable than a whole bunch of
> smaller ones.
> 
> > apt-cdrom will effectively read the index(es) off the .iso of what packages 
> > there are and will cache that.
> 
> I understand that: this is the "iso sister" of apt(-get) update.
> 
> My question: it does operate on the (already mounted) .iso image, right?
> Or does it do the (loopback and) mounting on its own?
> 
No, it relies on the image to be mounted. I last did this in anger with real
CDs / DVDs. A package install  would prompt for the DVD to be phsyically 
inserted into the disk drive [/mnt/cdrom probably at that stage - physical 
drives automounted] and then read the list of packages off them. 
If you were doing a large install  e.g. Gnome / KDE, you might have to 
physically change disks (sometimes more than once) so DVD1 -> DVD2 -> 
DVD1 -> DVD3, for example.

If the DVD drive autolocked, then you might need to run an eject command in 
there. 

In practice, queuing up a few mount/umount/eject commands and then runnng 
the apt-get install commands or whatever by using an up arrow command to 
repeat wasn't a problem. DVDs loop mounted would be less of a problem, as
outlined.

> >                                 If you have multiple DVDs, it will prompt you to 
> > change them - so, actually, you could mount the DVD images in separate 
> > directories under /media as individual mount points and then run apt-cdrom 
> > to index them all with Tomas -d switch, as outlined above.
> 
> Yes, that makes sense. Perhaps dedicate one directory to each install
> medium (/media/installers/buster/cd-23 or something).
> 
> > For me - I find that a netinst - and internet bandwidth - is all that I need
> > but I recognise that that's not everyone's cup of $BEVERAGE.
> 
> ISTR that Richard's Internet connectivity isn't... stellar. Sitting behind
> a >= 4Mbit spoils us, it seems :-)
> 
> Cheers
>  - t

All best, as ever,

Andy C.

[toc] | [prev] | [next] | [standalone]


#235171

From"Thomas Schmitt" <scdbackup@gmx.net>
Date2021-05-13 21:20 +0200
Message-ID<Cep2h-6WZ-1@gated-at.bofh.it>
In reply to#235167
Hi,

Andrew M.A. Cater wrote:
> In practice, queuing up a few mount/umount/eject commands and then runnng
> the apt-get install commands or whatever by using an up arrow command to
> repeat wasn't a problem.

How did you work around the tray loading bug ?

The Linux kernel lost the ability to wait for the CD-ROM drive to become
ready after a new medium was loaded. Symptom is e.g. that mount lets the
drive load the tray, but then immediately errors out by:
  mount: no medium found on /dev/sr0
The regression was probably introduced in 2008 to kernel 2.4 by commit
210ba1d1724f ("[SCSI] sr: update to follow tray status correctly"). Since
then the user has to do the waiting and let most software know when it is ok
to try reading from the drive.

A workaround is to use a burn program to load the tray. Such programs wait
independently of the kernel until the drive is ready before they begin to
further inquire its state. Like
  xorriso -outdev /dev/sr0 ; mount /dev/sr0 /mnt/cdrom


Have a nice day :)

Thomas

[toc] | [prev] | [next] | [standalone]


#235172

From<tomas@tuxteam.de>
Date2021-05-13 21:20 +0200
Message-ID<Cep2i-6WZ-9@gated-at.bofh.it>
In reply to#235167

[Multipart message — attachments visible in raw view] — view raw

On Thu, May 13, 2021 at 05:34:43PM +0000, Andrew M.A. Cater wrote:
> On Thu, May 13, 2021 at 06:53:28PM +0200, tomas@tuxteam.de wrote:

[...]

> > My question: it does operate on the (already mounted) .iso image, right?
> > Or does it do the (loopback and) mounting on its own?
> > 
> No, it relies on the image to be mounted [...]

I see. Thanks :)

> [...] so DVD1 -> DVD2 -> DVD1 -> DVD3, for example.

Ugh. User as computer extension :-/

Cheers
 - t

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web