Page 1 of 2

How can I install MX-Linux entirely from a terminal?

Posted: Fri Apr 21, 2023 4:26 am
by mysterybash
Hello, is it possible to install MX Linux entirely from manually running commands in a terminal? If so, what are the commands I should use and what other commands can I use?
If it helps to understand why I want to install MX Linux in such an unorthodox manner, I'm attempting to make an entirely CLI-based installer for a custom GUI-less ISO. Any feedback is welcome.

Re: How can I install MX-Linux entirely from a terminal?  [Solved]

Posted: Fri Apr 21, 2023 7:24 am
by Adrian
Use "cli-installer" if not available make sure you have cli-installer-mx package installed.

Re: How can I install MX-Linux entirely from a terminal?

Posted: Fri Apr 21, 2023 7:54 am
by Solon
Others have noted that using CLI for your ISO is possible, however (and I may be wrong), but I get the impression that you wish to run MX Linux using CLI exclusively. If that is your intention, to stay with CLI and never use a GUI, you need to remember that MX LInux descends from antiX and MEPIS and has retained using: SysVinit, and has not moved to the newer: systemd - for Debian.

Put simply, if you could strip out the GUI from MX Linux, you would still have an OS that needs SysVinit programs to load and run. And more than that, "approved" programs. So how do you do that in CLI without some version of the MX Package Installer (MXPI)? If all you have is CLI, you have no way of knowing what exactly you are downloading without the MXPI.

If you intend to eschew GUI's altogether, I wonder if you wouldn't be better off using a simplified (non GUI) version of, good 'old: Debian, itself? That way, anything you wanted could be brought into your non-GUI Debian using CLI from the Internet.

Re: How can I install MX-Linux entirely from a terminal?

Posted: Fri Apr 21, 2023 8:04 am
by Adrian
BTW, if you want to start with a custom CLI ISO take a look at my respin: https://sourceforge.net/projects/mx-lin ... ns/MX-CLI/

Re: How can I install MX-Linux entirely from a terminal?

Posted: Fri Apr 21, 2023 8:45 am
by Jerry3904
@Solon Agreed. Why even use MX at all, since its declared preference is for GUIs and it continually creates helpful ones ("Tools" and related apps) to avoid unnecessary terminal usage for common tasks.

Re: How can I install MX-Linux entirely from a terminal?

Posted: Fri Apr 21, 2023 9:23 am
by asqwerth
While I agree with Jerry and Solon on the GUI-focus of MX, I don't think it automatically means there is no point in the OP using MX. There is the small possibility that the OP wants the benefit of still using Debian with sysvinit but with the systemd-shim? He can't do that with antiX because that is fully non-systemd. With the snapshot tool (CLI version), he can configure his system however he likes and then take a snapshot.


Also, I don't think that systemd is going to obstruct the usage of a headless MX. The Debian and MX repos in use will still be the same whether CLI or not.

Re: How can I install MX-Linux entirely from a terminal?

Posted: Fri Apr 21, 2023 12:49 pm
by Adrian
I even use "MX" on our rsync server. I had to migrate Debian Stretch to anther service and the easiest way without an installation from scratch was to run iso-snapshot-cli and create an ISO and reinstall from that.

Re: How can I install MX-Linux entirely from a terminal?

Posted: Fri Apr 21, 2023 2:19 pm
by Stevo
Once installed, can't you still boot even MXCLI with systemd like in normal MX? (MXCLI seems more like a date in Roman numerals; the C doesn't make sense, but MXLI is 1041)

Re: How can I install MX-Linux entirely from a terminal?

Posted: Fri Apr 21, 2023 2:30 pm
by Adrian
MXCLI seems more like a date in Roman numerals; the C doesn't make sense, but MXLI is 1041
It's 1010-151 because there's a dash... or maybe 859 :grin:

Re: How can I install MX-Linux entirely from a terminal?

Posted: Fri Apr 21, 2023 4:17 pm
by DukeComposed
Adrian wrote: Fri Apr 21, 2023 7:24 am Use "cli-installer" if not available make sure you have cli-installer-mx package installed.
Until I learned about cli-installer today, I always installed MX Linux from a series of shell scripts I've written. The basic idea is (a) partition and format the disk as desired, (b) mount the partition(s) under /mnt and unsquash the live system on the ISO into /mnt, and (c) install the bootloader.

Assuming you're comfortable with fdisk/parted/mkfs, the important bit to do the unsquashing is:

Code: Select all

unsquashfs -f -d /mnt/ /live/boot-dev/antiX/linuxfs
or, alternatively:

Code: Select all

mkdir /squashfs
mount -o ro -t squashfs /live/boot-dev/antiX/linuxfs /squashfs
rsync -av --progress /squashfs/ /mnt/
umount /squashfs
From there you'd have to set some mountpoints ("mount -B X /mnt/X" for each of /dev, /dev/pts, /proc, and /sys) chroot into /mnt and perform any system setup actions: set the root password, remove the demo user and create non-privileged user accounts, et cetera.

cli-installer seems like it would be much easier. I wonder if cli-installer can be scripted to be completely unattended.