The Ultimate Minimal Ubuntu Installation Guide (i3 or OpenBox) Part 1

ahmadnurhadirmw - Let’s install Ubuntu - minimal edition (using i3 Window Manager or OpenBox)

Disclaimer: a minimal version of Ubuntu is not for everyone. Ubuntu, the full distro, is the best place for a beginner to start. Minimal versions are stripped down and do not include many of the tools you might want as a beginner.

What you need:

  • A computer with a linux distro on it, or a live distro on a USB stick
  • An 8 GB partition, at least (the bigger the better; 8 GB will not be enough to do much). 
  • I don’t recommend overwriting your whole computer, and I recommend having another distro or Windows available for troubleshooting.
  • Disk Image Mounter (available from gnome-disk-utility) or a similar program and an archive mounter/extractor (these are found on full versions of Ubuntu already)
  • A wired internet connection (yes, a plug into your computer)
  • A USB stick / flash drive / thumb drive

Sections:

  • Getting the mini.iso file
  • Installing your minimal Ubuntu
  • Partitioning
  • First Boot
  • Get a working distro
  • Second boot, the fun begins
  • Moving away from minimal - Theming

Getting the mini.iso file

The very most minimal build of Ubuntu is from the mini.iso file, which is around 60 megabytes (give or take). The 17.04 version is available at:
http://archive.ubuntu.com/ubuntu/dists/zesty/main/installer-amd64/current/images/netboot/

This ISO is really just a text based front end. You will need an internet connection that plugs into your computer for the install, just a heads up. The mini.iso downloads and builds Ubuntu onto whatever partition you tell it to, and then installs grub.

Now you need to get the mini.iso you have downloaded onto a USB for installation. How do you do this? Well from a full Linux machine, or even a live version of Ubuntu, you need to do the following:
If you have a modern machine, say, within the last 5 years, you probably have UEFI. The mini.iso does not yet support UEFI out of the box, but it REALLY does.
  1. Open the mini.iso with Archive Mounter or Disk Image Mounter and extract the files to a folder. I used a folder named mini on my desktop.
  2. These files will be locked (aka you don’t have permission to mess with them). Open a terminal and open your file manager using
sudo -H thunar
On Xubuntu the file manager is thunar, so make sure you don't write thunar if you don't use thunar (I usually use nautilus, this is just a live Xubuntu environment). (Ubuntu's Unity and Gnome use nautilus, on Cinnamon it is nemo, and there are others.) Right click on the original folder you made (remember, I made mini on my desktop) and go to properties. The third tab is permissions. Set all the permissions to read and write for your user. Also, set them recursively (all the way down through the folders).
The Ultimate Minimal Ubuntu Installation Guide (i3 or OpenBox)
i3 or OpenBox
Navigate to this folder. There is a boot folder and then a grub folder (inside boot) of the extracted ISO; there you should find a file named efi.img.
  • Open it with Disk Image Mounter (or another IMG mounting program). Navigate to this mounted drive (or folder).
a minimal version of Ubuntu is not for everyone. Ubuntu, the full distro, is the best place for a beginner to start. The Ultimate Minimal Ubuntu Installation Guide (i3 or OpenBox)
i3 or OpenBox
Navigate to the newly mounted drive, probably in the left pane.

Here you will find a folder called efi. This folder (and its contents) is what you need. All you have to do is copy the efi folder from here to the root of the original extracted ISO (at the same level as the boot folder from ISO). (then unmount this mounted IMG file)

Now you have at least two folders in your root extracted folder, boot and efi, as well as a bunch of other files.
a minimal version of Ubuntu is not for everyone. Ubuntu, the full distro, is the best place for a beginner to start. The Ultimate Minimal Ubuntu Installation Guide (i3 or OpenBox)
i3 or OpenBox
Just copy all these files to a FAT32 formatted USB drive. OR
You can burn all these files to an ISO with Brasero and sudo dd that ISO to your USB. But 6a is easier.

Reboot and boot from this newly created USB, like when you originally installed Ubuntu. Also, make sure you plug in that ethernet cable now.

Installing your minimal Ubuntu

Put the USB into the computer and boot just like when you would normally install Ubuntu. Hopefully you will find the minimal ISO boots and you can start the installation. Answer the questions, they're pretty easy and straightforward.

Choose your languages, keyboard, and location. Make your hostname whatever you want. I like mui for minimal Ubuntu install, but ubuntu is perfectly fine.

Probably don’t change the mirror, it will fill it in based on the locations you selected.

First Boot

Upon your first boot into Ubuntu, you will probably not have a working setup (it works, but looks like it does not). So, to prevent this initial scare, during your grub screen press “e” on the first option (which should be Ubuntu).

On the linux line, one of the longer one lines that take more than one line, past half way down, you will see “$vt_handoff”. Ensure you remove this portion of the line and press F10 to boot into your new build. You will be presented with tty1 and you may see some errors, but probably without any real issues.

Get a working distro
Lets fix that grub so you don’t have to press “e” every time you restart your machine.
sudo apt install nano
nano is my preferred command line interface (CLI) text editor. Feel free to use any other if you like. If you're using a GUI already, or if you're editing this partition from a working machine, SSH, or some other GUI, you can feel free to use gedit, geany, mousepad, or any other GUI text editor. Unfortunately, that isn't going to work well without a working GUI environment (namely X).
sudo nano /etc/default/grub
On the “GRUB_CMDLINE_LINUX_DEFAULT” entry remove “quiet” and “splash”. Mine is just left with =””.

In the command line interface nano, Ctrl+O saves and Ctrl+X closes and will take you back to the CLI.

Now update your grub with
sudo update-grub && sudo update-grub2
Voila. You shouldn’t have that issue anymore.

Now what you want is a nice, small, working distro. You have that, technically, but you need to get a more usable interface going. You need a display manager, at least a window manager (or a full desktop environment, networking packages, some common drivers, probably a compositor, and a display server.

For your display manager I recommend lightdm. This is a very friendly, lightweight display manager. With that I also recommend the gtk greeter and the settings package. I will list the commands after all my recommendations.

For your window manager I recommend i3 (with preference for i3-gaps). OpenBox is also a good option for a lightweight, minimalist window manager. If you prefer your windows to move around and adjust size with the mouse, probably go with OpenBox. If you are looking to move to a more exciting, tiling, window manager, you should check out i3.

For networking I prefer wicd. Usually I would go with Network Manager, but it has been giving me hard time lately. Though, Network Manager does have a nice CLI end called nmtui. wicd is lighter though.

ubuntu-drivers-common will detect and install additional Ubuntu driver packages for you. (gpu-manager is a good example)

mesa-utils and mesa-utils-extra have miscellaneous Mesa GL utilities, useful for more advanced processes using GPUs (i.e. GLX extension on xserver-xorg and glxinfo)

compton is a lightweight compositor for X11, based on xcompmgr.

For a file manager I prefer nautilus. But a lighter choice may be thunar. For a terminal emulator, I prefer gnome-terminal. Again, there are lighter choices.

And finally, xorg is the X.Org X Window System (pretty standard right now) and xserver-xorg is the server side of it.

Lets Install:

i3 minimal, like i prefer:

sudo apt install lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings i3 wicd ubuntu-drivers-common mesa-utils mesa-utils-extra compton xorg xserver-xorg nautilus gnome-terminal

OpenBox minimal:

sudo apt install lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings openbox obconf obmenu wicd ubuntu-drivers-common mesa-utils mesa-utils-extra compton xorg xserver-xorg nautilus gnome-terminal
From my personal experience, you want to install the recommendations.

Some notes: if you have an nvidia GPU, also:
sudo apt install nvidia-375
If you have an Intel processor, which you probably do, I recommend using Intel’s proprietary microcode, which is not open source.
sudo apt install intel-microcode
If you are using a desktop and are going to keep the ethernet cord plugged in, SKIP this section. If you want to use a wifi dongle or wifi in general, I like to disable the ethernet port (I really only use a laptop and can reenable it if need be.
sudo nano /etc/network/interfaces
To disable the ethernet port (somewhat superficially) put a # (the hash) symbol next to each line here, except the source line.

Now reboot with:
sudo poweroff --reboot
And bask in your glory.

Post a Comment

0 Comments