I wrote these instructions for the original MaaXBoard, but these will work for any of the MaaXBoards running the Debian Linux out of box image.
In Debian, the configuration file for APT (Advanced Packaging Tool) is located here: /etc/apt/sources.list
To view the configuration file, just type (do not type the root@maaxboard:~# portion, this just represents the prompt)
root@maaxboard:~# cat /etc/apt/sources.list
The file, in its default state, has four lines that are in active use, and four lines that are commented out with the # character. These four lines are:
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
Each line is specifying a server called tuna that belongs to Tsinghua University in China. This mirror of the Debian repository is very convenient to use if you are performing your development in China, as did the development team that worked on the MaaXBoard. However, for those of us located outside of China, we would be better served by using a mirror closer to where we are located.
The nice folks at linuxconfig.org
have compiled a list of mirrors sorted by country name: https://linuxconfig.org/debian-apt-get-buster-sources-list
There is also a more exhaustive list provided by Debian themselves https://www.debian.org/mirror/list
Because I am located in the United States, I see that I want to use ftp.us.debian.org
as my local mirror.
Note that we want to access these servers using HTTP, and not HTTPS or FTP
Please select the server name that is ideal for your location.Now that we know which mirror servers we want to use, it is time to edit the configuration file. I am going to use vi, but please feel free to use nano if that is your preferred editor.
root@maaxboard:~# vi /etc/apt/sources.list
I will comment out the existing four lines that point to the tuna server, using the # (pound or hash) symbol, and also add these four lines to specify my preferred mirror:
deb http://ftp.us.debian.org/debian/ buster main contrib non-free
deb-src http://ftp.us.debian.org/debian/ buster main contrib non-free
deb http://ftp.us.debian.org/debian/ buster-backports main contrib non-free
deb-src http://ftp.us.debian.org/debian/ buster-backports main contrib non-free
And just to check that the file is properly configured, I type
root@maaxboard:~# cat /etc/apt/sources.list
I have saved my version of sources.list as an attachment to this project so you can inspect it.
Now that everything looks good, it is time to update the apt index with the update command.
root@maaxboard:~# apt update
If everything is working properly, you should see something that may look like this:
Get:1 file:/var/lib/local-apt-repository ./ InRelease
Ign:1 file:/var/lib/local-apt-repository ./ InRelease
Get:2 file:/var/lib/local-apt-repository ./ Release [1,279 B]
Get:2 file:/var/lib/local-apt-repository ./ Release [1,279 B]
Get:3 file:/var/lib/local-apt-repository ./ Release.gpg
Ign:3 file:/var/lib/local-apt-repository ./ Release.gpg
Hit:4 http://ftp.us.debian.org/debian buster InRelease
Hit:5 http://ftp.us.debian.org/debian buster-backports InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
187 packages can be upgraded. Run 'apt list --upgradable' to see them.
We want to test that we can upgrade a package. We could upgrade all packages at once, but in the interest of time, let's just upgrade one package. To see which packages can be upgraded, just type (as instructed above):
root@maaxboard:~# apt list --upgradable
I picked the package called ppp but feel free to pick any package in the list. To upgrade just one package, use the apt install command.
root@maaxboard:~# apt install ppp
When you have the time to upgrade all the packages, the command will simply be
root@maaxboard:~# apt upgrade
Give the MaaXBoard some time to complete the apt upgrade. Once completed, the OS is completely up to date.
Comments