How to get the required packages on a Windows PC to a USB stick and from there installed to an offline MX Linux system?
MX Linux is derived from Debian and antiX.
How to get the required packages on a Windows PC to a USB stick and from there installed to an offline MX Linux system?
MX Linux is derived from Debian and antiX.
Honestly, this is a lot of effort, and you normally don't do that. There's simply better ways with dealing with offline systems:
Instead, you normally set up a system with all the packages you want, then take an image of the "clean" system, then you disconnect it from the internet, and only then decrypt your encrypted data partition or connect the hard drive with the sensible information, if you're building air-gapped systems for security purposes.
The next time you want to install something, you take the image of the clean system, install what you want, save an image, and then you again decrypt/connect your secret storage.
Since MX is based on debian, all the things you can do with debian apply.
apt-offline
is a tool to supply offline machines with security updates. Roughly, it works like:
(offline)> sudo apt-offline set --install-packages PACKAGE_NAME --update apt-offline.sig
followed by, on the online machine, after carrying over apt-offline.sig
(online) supo apt-offline get --bundle bundle.zip apt-offline.sig
after carrying back the bundle.zip
to the offline machine:
(offline) sudo apt-offline install bundle.zip
This doesn't solve the problem on how to install apt-offline
itself, nor can one be sure that a small young distro like yours has constant testing for whether this works. So, chances are, you need to do things manually:
There's no super easy way here, because your offline system can't even determine which packages it will need – they will have changed on the online repository, and with them, the mutual dependencies.
So, the only way I see is:
on the offline machine, export a list of installed packages:
sudo dpkg --list | cut '-d ' -f2 > list_of_packages.txt
Put that list on your USB stick, carry it to your online machine.
On the windows machine, set up a VM with MX Linux exactly in your version. This is very easy with VirtualBox, and alternatively I'd presume even WSL(2), which windows10 ships with, could run a container with MX Linux inside.
In that virtual machine, install exactly the same packages you have on that offline machine:
sudo xargs apt install -y < list_of_packages.txt
now download the packages you want to install (say, libreoffice
) in the VM:
sudo apt install --download-only -y libreoffice
now copy over the downloaded packages, i.e. the complete folder contents of /var/cache/apt/archives
to your stick.
Run sudo apt install -y libreoffice
on the online computer (which already has downloaded all the files
On the offline computer,
cd /path/to/your/stick/folder/containing/the/files sudo dpkg -i *.deb
Done. Next time, you can start at step 5., because the offline computer now should have exactly the same files as the online one.