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

Re: how to setup a small local Debian mirror to install a VM without an internet access



On Thu, 3 Oct 2019 at 02:23, Fred Boiteux <fbpros@free.fr> wrote:

> I'm trying to install automatically (using preseed) a Debian Buster 10.1
> system on a VM hosted on a system without internet access, using a netboot.

> Thanks to Steve McIntyre explanations (see #940801), I know how to
> update the netboot's initrd to include the virtio_blk driver, and the
> debian installer is now well detecting the VM's disk, and after
> partitionning it, it tries to download some Debian packages to install a
> minimal system on this new disk. For this purpose, i've setup a local
> Debian mirror copying the files on DVD-1 debian installer, but the
> debian-installer refuse to use it, because it's not GPG-signed, and so
> fails to install any package  :

Hi Fred,

I am unsure from your message exactly how much network access you
may or may not have for your required VM install operations, so the
below suggestion might be useless for you, but I will send it anyway
on the chance it helps you.

On my main PC (just a desktop with some TB HDD) on my LAN I run
an 'approx" server[1]. In every /etc/apt/sources.list (on that machine and
every other machine) there are only references to that server (nothing
outside the LAN, no deb.debian.org or security.debian.org), so every
Debian package that I install on any machine is then cached by the
approx server and after that can be served to any other machine.

The approx server config file is the only place where deb.debian.org
and security.debian.org is written. It can work with other repos, for example
I configured mine to also cache raspberrypi.org. It does not download
the entire repo, it just caches what is used and downloads the misses.

For me it's the lazy way to have local mirrors without doing any
admin work myself.

When I create a VM, I just specify the approx server, and
the VM installs without internet access, only localhost or LAN access.

The link below mentions other similar packages but I have not tried them.

[1] https://packages.debian.org/buster/approx


Reply to: