0

Relativity new to Raspberry Pi and Linux in general, but essentially I'm trying to create an update repository for my Raspberry Pis via a separate Linux server, how would I go about doing this? On the Raspberry Pi website I've only seen so far that it allows me to download the entirety of Raspbian when I just need the update files in order to push updates out to my other Pis. Hope this questions makes sense and thanks in advance for the assist!

closed as too broad by goldilocks Jun 25 at 21:31

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Welcome. Unfortunately right now your question has too many parts to be realistically dealt with in a single answer, which our format requires (please take the tour to understand better how the site works). You need to break this down a bit by first concentrating on how OS updates are done normally, which is distinct from the issue of how to upload them to ???. – goldilocks Jun 25 at 21:31
  • "On the Raspberry Pi website I've only seen so far that it allows me to download the entirety of Raspbian when I just need the update files in order to push updates out to my other Pis." -> Is a bit confusing. If you want to install the OS on multiple pis, you still only need to download an image once. WRT updates, they are done via the distro package manager (apt), which does exactly what you are asking for (it only downloads what is required to update). – goldilocks Jun 25 at 21:35
1

On the assumption that you're trying to save bandwidth, whilst updating several Pis, then apt-cacher-ng may be what you're looking for. It's quite simple to set up:

On your server (this could actually be one of the Pis) install it with:

sudo apt-get install apt-cacher-ng

Then on the clients run the following as root:

echo 'Acquire::http { proxy "http://ServerIP:3142"; };' >> /etc/apt/apt.conf.d/02proxy

Be sure to change ServerIP to the correct IP.

Now if you install something with apt on one of the clients the package and dependencies will be cached on the server, so when you install the same package on client 2 it will download from the server instead of the online repo.

1

Raspbian is a derivate from Debian and it also uses Debians infrastructure. As far as I understand you want to setup your own package repository like that one used by Raspbian and Debian. First of all: the used repositories are configured in /etc/apt/sources.list and in files in directory /etc/apt/sources.list.d/. On Raspbian there are two files by default:

rpi ~$ cat /etc/apt/sources.list
deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi

rpi ~$ cat /etc/apt/sources.list.d/raspi.list
deb http://archive.raspberrypi.org/debian/ stretch main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ stretch main ui

You can browse the repositories with http://raspbian.raspberrypi.org/raspbian/ and with http://archive.raspberrypi.org/debian/

The former repository is mainly the Debian repository http://ftp.de.debian.org/debian/ just compiled for armhf. The latter repository is from the Raspberry Pi Foundation and contains specific software to run the Raspberry Pi hardware, e.g. the kernel, firmware and drivers. This could be an example for your setup.

I do not have made a Debian repository before so I can give only some pointers. Here I have fond an entry for a Debian Repository Setup. You also can google for "how to make a debian repository".

Not the answer you're looking for? Browse other questions tagged or ask your own question.