[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Installing Stretch/Testing with absolute minimal bandwith useage



On Thu 15 Jun 2017 at 13:34:56 (-0500), Richard Owlett wrote:
> [NOTE: I'm interleaving comments referring to Brian's post of
> 06/13/2017 11:48 AM and I'm still absorbing David's post of
> 06/15/2017 10:34 AM]
> 
> On 06/13/2017 04:13 PM, David Wright wrote:
> >On Tue 13 Jun 2017 at 12:28:41 (-0500), Richard Owlett wrote:
> >>On 06/13/2017 11:48 AM, Brian wrote:
> >>>On Tue 13 Jun 2017 at 09:20:43 -0500, Richard Owlett wrote:
> >>>
> >>>>I am running Stretch that was fully updated/upgraded less than
> >>>>a week ago. I have the flash drive used to do the original
> >>>>install of Stretch. I have not _intentionally_ purged any files
> >>>>from cache.
> >>>
> >>>The cache will contain those files the installer got for you when
> >>>you selected and installed software, plus anything else you obtained
> >>>after the first reboot. For the sake of example let us suppose you
> >>>installed the mate desktop and the standard utilities.
> >>
> >>That is my intention. I don't recall all of what I chose during the
> >>original install, but what I intend is guaranteed to be no more than
> >>the original.
> >>
> >>>
> >>>The cache will not contain files from the base system, but that
> >>>doesn't matter because they are in the installer image, as is GRUB.
> >>>The standard system utilities are also in the image; no bandwidth
> >>>penalty there.
> 
> There is an almost "gotcha" there. The cache does not have packages
> such as task-desktop whose function is to load packages containing
> executable code (e.g. lightdm).

If you don't recall all of what you chose, then I can't explain
any absences from the cache. But this is partly why I introduced
the method below, so that you can preserve cache contents at the
earliest opportunity.

> >>>>I wish to install Stretch on two additional machines. I am near
> >>>>my internet data cap and wish to make *ABSOLUTE MINIMAL* usage
> >>>>of available bandwidth.
> >
> >Then take one of those large USB sticks that you have, and copy
> >the contents of /var/cache/apt/archives/ (omit partial/ and lock)
> >onto it before you lose them.

Assuming you haven't done the step below, you would do the above
now, before you start doing things that might cause you to
accidently lose them. Let's call the process above "xyzzy".

> >In future, when you install from scratch, you can make this copy
> >before you finish the installation with the following:
> >
> >When the "Select and install software" step finishes, switch to VC2
> >for a shell. Insert the USB stick and mount it somewhere (like /mnt
> >or /instmnt).
> ># cp /target/var/cache/apt/archives/*deb /<your USB stick>/
> >Unmount the stick and remove after copying has finished.
> >Switch back to VC1 and continue.

Let's call the latter process "plugh".

> I take it that "/<your USB stick>/" does not refer to copy made
> satisfying "before you lose them".

If you are holding the stick at the end of process "xyzzy", then
you're free to insert it and add more packages to it with "plugh".
(All the packages have unique names.) The only penalty is that
when you eventually copy *from* the stick, the expanded collection
will take longer to copy and might even be too much to fit
(doubtful nowadays with disks as large as they are).

OTOH if you have never carried out process "xyzzy" (and that
includes others apart from your good self who might read this
thread by accident), you can *start* with process "plugh".

Have I made myself perfectly clear? It was meant to be a
simple workaround.

> >>>I've not completely thought this through but you definitely would
> >>>not want to use the select and install software option, apart from
> >>>leaving standard utiliites ticked. You also would not want a
> >>>network mirror but, unless you are going to use sneakernet, you
> >>>will want networking in order to be able to connect to your primary
> >>>machine.
> >>
> >>I generally favor sneakernet whenever possible. I neglected to
> >>mention that I do not currently have a LAN. The time may have come.
> >
> >Regardless, on the next installation, during the "Configure the
> >package manager" step where you are asked whether you want to use
> >a network mirror, switch to VC2 for a shell. Insert the USB stick and
> >mount it somewhere (like /mnt or /instmnt).
> ># cp /<your USB stick>/*deb /target/var/cache/apt/archives/
> >Unmount the stick and remove after copying has finished.
> >Switch back to VC1 and continue.
> >
> 
> I've been looking at the directory structure of netinst.iso. I'm
> considering adding the *.deb files from my backup of my current
> cache to .../Debian stretch-DI-rc3 i386 1/pool and appropriately
> modifying .../Debian stretch-DI-rc3 i386
> 1/dists/stretch/Packages.gz.
> 
> I'm extrapolating from comments made by Thomas Schmitt and others in
> and around
> <https://lists.debian.org/debian-user/2014/03/msg00075.html>.

What I've described is a workaround for restricting your
bandwidth usage. What you seem to be describing is expanding
the netinst ISO to make it more like a customised DVD1 ISO.
I can't see why anyone would follow you down this path
because they would first have to discover for themselves what
their own minimum package requirements were. It's much easier
to assume that a rational choice of packages for DVD1 has already
been made by the Debian team, and take the bandwidth hit.

> >>>>The purpose of this is to test the _installation process_ itself.

What insights have your test results shown?

> >>>>That eliminates anything resembling cloning. A secondary benefit
> >>>>will be learning more about how Debian does things.
> >
> >These two steps will get you started, and help preserve your precious
> >bandwidth while you get to learn about LANs, apt-cacher-ng and so on.

Cheers,
David.


Reply to: