How to change mirrors while make iso

Hello,

I want to build vyos iso.
As I’am in Chinese mainland, network to deb.debian.org is poor.
So I want to change mirrors but it didn’t work well. Is there anyone can help me? thanks!

  1. I changed mirrors in configure:
./configure --debian-mirror http://ftp.cn.debian.org/debian/ --architecture amd64 --build-by "xxxx@163.com" --debian-security-mirror http://ftp.cn.debian.org/debian/  --pbuilder-debian-mirror http://ftp.cn.debian.org/debian/
Loading data/defaults.json
  1. I checked the build/build-config.json:
{
    "architecture": "amd64",
    "bootloaders": "syslinux,grub-efi",
    "build_by": "xxxx@163.com",
    "build_comment": "",
    "build_dir": "build",
    "build_type": "development",
    "custom_apt_entry": [
        "deb [arch=amd64] https://repo.saltproject.io/py3/debian/11/amd64/3004 bullseye main",
        "deb [arch=amd64] http://repo.powerdns.com/debian bullseye-rec-45 main",
        "deb [arch=amd64] https://repos.influxdata.com/debian bullseye stable"
    ],
    "custom_apt_key": null,
    "custom_package": [],
    "debian_mirror": "http://ftp.cn.debian.org/debian/",
    "debian_security_mirror": "http://ftp.cn.debian.org/debian/",
    "debug": false,
    "distribution": "bullseye",
    "kernel_flavor": "amd64-vyos",
    "kernel_version": "5.10.127",
    "pbuilder_config": "build/pbuilderrc",
    "pbuilder_debian_mirror": "http://ftp.cn.debian.org/debian/",
    "release_train": "sagitta",
    "version": null,
    "vyos_branch": "current",
    "vyos_mirror": "http://dev.packages.vyos.net/repositories/current"
}

  1. It speed up at first. However I noticed output like this:
Get:2 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Hit:1 http://mirrors.ustc.edu.cn/debian bullseye InRelease
Get:3 http://deb.debian.org/debian buster InRelease [122 kB]
Get:4 http://mirrors.ustc.edu.cn/debian bullseye-updates InRelease [39.4 kB]
Get:5 http://mirrors.ustc.edu.cn/debian bullseye-backports InRelease [44.2 kB]
Get:6 http://mirrors.ustc.edu.cn/debian bullseye/non-free Sources [80.6 kB]
Get:7 http://mirrors.ustc.edu.cn/debian bullseye/contrib Sources [43.0 kB]
Get:8 http://mirrors.ustc.edu.cn/debian bullseye/main Sources [8627 kB]
Get:9 https://repos.influxdata.com/debian bullseye InRelease [4739 B]
Get:10 http://security.debian.org/debian-security buster/updates/main amd64 Packages [329 kB]
Get:11 https://repo.saltproject.io/py3/debian/11/amd64/3004 bullseye InRelease [2850 B]
Get:12 http://dev.packages.vyos.net/repositories/current current InRelease [4189 B]
Get:13 https://repos.influxdata.com/debian bullseye/stable amd64 Packages [1259 B]
Get:14 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
Get:15 https://repo.saltproject.io/py3/debian/11/amd64/3004 bullseye/main amd64 Packages [2917 B]
Get:16 http://repo.powerdns.com/debian bullseye-rec-45 InRelease [1798 B]
Get:17 http://dev.packages.vyos.net/repositories/current current/main amd64 Packages [43.4 kB]
Get:18 http://repo.powerdns.com/debian bullseye-rec-45/main amd64 Packages [842 B]
Get:19 http://deb.debian.org/debian buster/main amd64 Packages [7911 kB]
Get:20 http://mirrors.ustc.edu.cn/debian bullseye/main Translation-en [6241 kB]
Get:21 http://mirrors.ustc.edu.cn/debian bullseye/contrib Translation-en [46.9 kB]
Get:22 http://mirrors.ustc.edu.cn/debian bullseye/non-free Translation-en [91.3 kB]
Get:23 http://mirrors.ustc.edu.cn/debian bullseye-updates/main Sources [1868 B]
Get:24 http://mirrors.ustc.edu.cn/debian bullseye-updates/main amd64 Packages [2592 B]
Get:25 http://mirrors.ustc.edu.cn/debian bullseye-updates/main Translation-en [2343 B]
Get:26 http://mirrors.ustc.edu.cn/debian bullseye-backports/main Sources [289 kB]
Get:27 http://mirrors.ustc.edu.cn/debian bullseye-backports/non-free Sources [3548 B]
Get:28 http://mirrors.ustc.edu.cn/debian bullseye-backports/contrib Sources [2556 B]
Get:29 http://mirrors.ustc.edu.cn/debian bullseye-backports/main amd64 Packages [304 kB]
Get:30 http://mirrors.ustc.edu.cn/debian bullseye-backports/main Translation-en [234 kB]
Get:31 http://mirrors.ustc.edu.cn/debian bullseye-backports/contrib amd64 Packages [4704 B]
Get:32 http://mirrors.ustc.edu.cn/debian bullseye-backports/contrib Translation-en [4196 B]
Get:33 http://mirrors.ustc.edu.cn/debian bullseye-backports/non-free amd64 Packages [11.0 kB]
Get:34 http://mirrors.ustc.edu.cn/debian bullseye-backports/non-free Translation-en [8252 B]
Get:35 http://security.debian.org/debian-security buster/updates/main Translation-en [178 kB]
Get:36 http://security.debian.org/debian-security buster/updates/non-free amd64 Packages [556 B]
Get:37 http://security.debian.org/debian-security buster/updates/non-free Translation-en [344 B]
Get:38 http://deb.debian.org/debian buster/main Translation-en [5969 kB]
Ign:38 http://deb.debian.org/debian buster/main Translation-en
Get:39 http://deb.debian.org/debian buster/non-free amd64 Packages [87.7 kB]
Get:40 http://deb.debian.org/debian buster/non-free Translation-en [88.8 kB]
Get:41 http://deb.debian.org/debian buster-updates/main amd64 Packages [8788 B]
Get:42 http://deb.debian.org/debian buster-updates/main Translation-en [6915 B]
Get:38 http://deb.debian.org/debian buster/main Translation-en [5969 kB]




Ign:38 http://deb.debian.org/debian buster/main Translation-en
Ign:38 http://deb.debian.org/debian buster/main Translation-en
Err:38 http://deb.debian.org/debian buster/main Translation-en
  Connection timed out [IP: 146.75.114.132 80]
Fetched 25.0 MB in 8min 52s (47.0 kB/s)
Reading package lists...
E: Failed to fetch http://deb.debian.org/debian/dists/buster/main/i18n/Translation-en  Connection timed out [IP: 146.75.114.132 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
E: An unexpected failure occurred, exiting...
P: Begin unmounting filesystems...
P: Saving caches...
Reading package lists...
Building dependency tree...
make: *** [Makefile:32: iso] Error 1

I have the problem done, just modify this file:

cat data/live-build-config/archives/buster.list.chroot

deb http://mirrors.ustc.edu.cn/debian/ buster main non-free
deb http://mirrors.ustc.edu.cn/debian/ buster-updates main non-free
deb http://mirrors.ustc.edu.cn/debian-security/ buster/updates main non-free

By the way, how to close the subject?

1 Like

Just in case, these configurations are not saved after a reboot.
You can use /config/scripts/vyos-postconfig-bootup.script
https://docs.vyos.io/en/equuleus/automation/command-scripting.html#

1 Like

Thanks!

What you said is a new knowledge point for me!