So the lockdown offers time to try out things I have put on the back burner for a while. This little project was to build as easily as possible a diminutive Linux install that can be used for many use cases, like single board computers, virtual machines and my older hardware that I use for various tasks. Also offering complete control over what you do and don't install.
I have tried all sorts of Linux distributions, but I think I have found the ideal solution with this one.
Starting with the
Ubuntu mini iso this makes the starting point very easy. You can install as much or as little as you like as you go through the installation process. Burn the iso file onto a USB drive or use it directly for your virtual machines. I basically didn't install anything that I didn't need to - especially towards the end when it ask's about GUI desktops - select nothing.
One thing to look out for is when partitioning the disk, whether virtual, SD or SDD don't set up a swapfile - it allocates 500MB on a device with 4GB of ram - which is pretty common these days.
Once all is installed you are presented with a standard command line when you reboot - which can be enough for a lot of people if you are going to run this as a server for some purpose. That takes up around 1.5GB disk space. This could be pruned further if needed, but even with a 16GB SD card, that's not too shabby. Especially compared to a full Gnome Ubuntu install which will eat around 6.5GB.
Now to get a simple working desktop on top of that I recommend using openbox - the following command installs all you need to get going, and give you the desktop above - minus the wallpapers - more of that in a mo.
sudo apt install openbox obconf obmenu vim xterm lightdm lightdm-gtk-greeter tint2 nitrogen ncdu xfce4-terminal arandr
The above is one command on one line.
Reboot your machine and you will be greeted with a login screen - login with the user you set up and you will be presented with a blank screen and a cursor - that is Openbox's starting place - immediately right-click the mouse and select the terminal.
Then carry out the following:
- Launch tint2 to give you a panel
- Launch arandr to set your video resolution - and save it to a file name to be used later.
- Copy any wallpaper from any machine or website using ssh to your users home directory
- Launch nitrogen to set that wallpaper you just saved. You can install more later.
- Make these changes permanent.
To make option 5 happen:
Create a folder in
/home/your username/.config called
openbox.
In that directory create a file called
autostart.
Add these lines to that file
nitrogen --restore &
tint2 &
/home/your username/.screenlayout/name-you-saved-it-as &
Once you have done this - you are good to go. Logout and back in, and you will have similar to the above image.
Now with the Ubuntu eco-system, you can install anything you like. This can be a Bastion, NFS, Samba, DNS server - whatever.
If you want to make it into a full-function desktop, add Firefox, VLC, Spotify, etc, etc.
However, the base from which you now start is 2.4GB of disk space used, which is the key to this.
You now have complete control over whatever you want to install and make this device into something you have designed and like.
It also minimises your security attack vector - as you have a lot less installed, less to update and less to keep an eye on. This is a massive plus for the whole process.
Updated: 14/4/2020