Iv setup a local REPO where I have downloaded all the packages from Ubuntu.
root@vm-repo-server:~# ifconfig | grep inet
inet 10.0.0.4 netmask 255.255.255.0 broadcast 10.0.0.255
root@vm-repo-server:/var/www/html/ubuntu/mirror/azure.archive.ubuntu.com/ubuntu/dists/focal# ll
total 40472
drwxr-xr-x 6 root root 146 Jan 24 12:31 ./
drwxr-xr-x 8 root root 123 Jan 24 12:31 ../
-rw-r--r-- 1 root root 40902952 Apr 23 2020 Contents-amd64.gz
-rw-r--r-- 1 root root 264892 Apr 23 2020 InRelease
-rw-r--r-- 1 root root 263289 Apr 23 2020 Release
-rw-r--r-- 1 root root 1554 Apr 23 2020 Release.gpg
drwxr-xr-x 5 root root 51 Jan 24 12:31 main/
drwxr-xr-x 5 root root 51 Jan 24 12:31 multiverse/
drwxr-xr-x 4 root root 38 Jan 24 12:31 restricted/
drwxr-xr-x 5 root root 51 Jan 24 12:31 universe/
root@vm-repo-server:
602.5 GiB will be downloaded into archive.
Downloading 187125 archive files using 20 threads...
Begin time: Mon Jan 24 10:24:22 2022
[20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]. .. [3]... [2]... [1]... [0]...
End time: Mon Jan 24 12:31:12 2022
I have setup two clients one 18.04 and one 20.04. These clients will now download updates from the REPO server
The 18.04 source list /etc/apt/sources.list contains entries:
root@vm-ubuntu18:~# cat /etc/apt/sources.list | grep allow
deb [allow-insecure=yes] http://10.0.0.4/ubuntu/mirror/azure.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
deb [allow-insecure=yes] http://10.0.0.4/ubuntu/mirror/azure.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse
deb [allow-insecure=yes] http://10.0.0.4/ubuntu/mirror/azure.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb [allow-insecure=yes] http://10.0.0.4/ubuntu/mirror/security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse
root@vm-ubuntu18:~#
When running the apt update from the 18.04 server it works fine and connects to my REPO.
root@vm-ubuntu18:~# date && apt update
Mon Jan 24 16:13:40 UTC 2022
Hit:1 http://10.0.0.4/ubuntu/mirror/azure.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://10.0.0.4/ubuntu/mirror/azure.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://10.0.0.4/ubuntu/mirror/azure.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:4 http://10.0.0.4/ubuntu/mirror/security.ubuntu.com/ubuntu bionic-security InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
5 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@vm-ubuntu18:~#
When i try to update the 20.04 LTS from the same REPO i get the below error:
Err:4 http://10.0.0.4/ubuntu/mirror/azure.archive.ubuntu.com/ubuntu focal/main amd64 c-n-f Metadata
404 Not Found [IP: 10.0.0.4 80]
Ign:11 http://10.0.0.4/ubuntu/mirror/azure.archive.ubuntu.com/ubuntu focal/universe amd64 c-n-f Metadata
Ign:12 http://10.0.0.4/ubuntu/mirror/azure.archive.ubuntu.com/ubuntu focal/multiverse amd64 c-n-f Metadata
Ign:13 http://10.0.0.4/ubuntu/mirror/azure.archive.ubuntu.com/ubuntu focal/restricted amd64 c-n-f Metadata
Fetched 265 kB in 0s (867 kB/s)
Reading package lists... Done
E: Failed to fetch http://10.0.0.4/ubuntu/mirror/azure.archive.ubuntu.com/ubuntu/dists/focal/main/cnf/Commands-amd64 404 Not Found [IP: 10.0.0.4 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
root@vm-ubuntu20:~#
What should be in the 20.04 source list file to connect to my local REPO with IP 10.0.0.4 and download the packages without errors ?
Thanks