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

Message
Author
User avatar
mysterybash
Posts: 19
Joined: Thu Jan 05, 2023 4:13 pm

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

#1 Post 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.
Personal Machine: AMD Ryzen 9 7900 (12C/24T), GIGABYTE B650 D3HP, AMD Radeon RX 6650 XT, 32GB DDR5 @ 6000MHz
Testing/Work Machine: AMD Ryzen 3 3200G (4C/4T), GIGABYTE A520 DS3H, AMD Radeon RX 460, 12GB DDR4 @ 3200MHz

User avatar
Adrian
Developer
Posts: 9264
Joined: Wed Jul 12, 2006 1:42 am

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

#2 Post by Adrian »

Use "cli-installer" if not available make sure you have cli-installer-mx package installed.

User avatar
Solon
Posts: 70
Joined: Thu Mar 25, 2021 3:33 pm

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

#3 Post 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.
Last edited by Solon on Fri Apr 21, 2023 8:16 am, edited 3 times in total.

User avatar
Adrian
Developer
Posts: 9264
Joined: Wed Jul 12, 2006 1:42 am

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

#4 Post 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/

User avatar
Jerry3904
Administrator
Posts: 23604
Joined: Wed Jul 19, 2006 6:13 am

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

#5 Post 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.
Production: MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: MX-25 Fluxbox, ThinkPad X1 Carbon gen 9 with i7
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

User avatar
asqwerth
Developer
Posts: 8040
Joined: Sun May 27, 2007 5:37 am

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

#6 Post 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.
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

User avatar
Adrian
Developer
Posts: 9264
Joined: Wed Jul 12, 2006 1:42 am

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

#7 Post 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.

User avatar
Stevo
Developer
Posts: 14895
Joined: Fri Dec 15, 2006 7:07 pm

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

#8 Post 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)
MXPI = MX Package Installer
QSI = Quick System Info from menu
The MX Test repository is mostly backports; not the same as Debian testing

User avatar
Adrian
Developer
Posts: 9264
Joined: Wed Jul 12, 2006 1:42 am

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

#9 Post 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:

User avatar
DukeComposed
Posts: 1512
Joined: Thu Mar 16, 2023 1:57 pm

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

#10 Post 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.

Post Reply

Return to “Software / Configuration”