♞ Coming up on 9TO5Linux ♞
GoboLinux Is a Linux Distro Unlike Any Other
In GoboLinux you don't need a package database because the filesystem is the database.
There are many Linux distros out there, but GoboLinux is a different kind of beast. It
is an alternative Linux distribution that redefines the entire filesystem hierarchy.
GoboLinux is a Linux distribution which is built from scratch. It was created back in
2002 out of a desire to try new approaches in the Linux distribution design space. Unfortunately,
nearly 20 years later, judging by the popularity of the distribution, we can conclude that
the experiment was not successful.
Let’s start with the installation process. When you boot up the downloaded ISO file,
you will see CLI interface. Then you need to write the startx command and the graphical
user interface with the Awesome WM (it’s a tiling window manager) will appear.
The installation process is fairly straightforward, but definitely not for beginners in the Linux
world.
GoboLinux was designed focusing the experienced user who doesn’t like things to be automagical.
Our scripts merely automate procedures, but they don’t “make decisions”, and whenever
they have to, they ask first.
GoboLinux not use systemd nor a System V initialization procedure. Instead, it has its own. At /System/Settings/BootScripts
you will find a few files that command the entire boot procedure.
The custom Awesome WM environment shipped by default in GoboLinux. There is no graphical
text editor, file manager, control center, system monitor or anything else. You are expected
to know how to manage the system via the command line.
But don’t expect to find an apt, yum, pacman, or any other package manager here. Let me
tell you – there is no package manager in GoboLinux. It uses a simple yet comprehensive
source-based dependency-resolving package management system.
The distro relies on a series of tools that automate various tasks, such as generation,
installation and removal of software, and most importantly, maintainance of the symbolic
links that keep the system consistent.
For example, GoboLinux use tool called Compile for installing software. Compile downloads
source tarballs, unpacks, compiles and installs software, using simple compilation scripts
called “recipes“. A recipe is a small file which tells Compile about the location
of the source code on the Internet to download it.
Now let’s move to the file system. The GoboLinux hierarchy represents a radical departure from
the filesystem hierarchy traditionally employed by most Linux distros out there. Basically,
this means that there are no directories such as /home, /usr,/etc and so on.
In GoboLinux, all files for a program, including executables, headers and libraries, are installed
below a single directory that belongs to that program. The main idea of the alternative
hierarchy is to store all files belonging to an application in its own separate subtree
under the /Programs directory.
In other words, you don’t need a package database because the filesystem is the database.
I guess the idea behind this decision is GoboLinux to be geared towards people who prefer to
install applications from the original source packages.
Removing the program from the system is simple as rm -rf /Programs/app_name. But since this
leaves behind dangling symlinks, GoboLinux offers the RemoveProgram utility, which removes
the program and all links pointing to its files in /System/Index.
Conclusion
GoboLinux introduces a lot of new ideas into the Linux world. It breaks with the historical
Unix directory hierarchy and so it does not comply with the FHS standard. It organizes
programs in entirely different own way.
Talking about the system in general – it’s fast. However, software installation can be
a real pain.
Probably the biggest issue when using GoboLinux is the availability of software. In this aspect,
GoboLinux is far behind the other estabilished distributions. There are a lot of software
which do not have a recipe in the database of the Compile tool. Which means you have
to download and install it yourself.
In conclusion – Did I have fun while testing GoboLinux?
:: More ::
Explore this novel Linux distro, which throws out the old Unix filesystem hierarchy in favor
of something more modern.
One of my favorite sayings comes from the mouth of Henry Spencer, author of the Regex
regular expression parsing library (among many other things). He said: "Those who do
not understand Unix are condemned to reinvent it, poorly." But, what exactly did he mean
by this? Well, many hackers regard Unix as the pinnacle of operating system design. Unix
pieces together many ideas and technologies that make it a truly universal operating system,
running on everything from wristwatches to supercomputers. The concepts and foundations
on which it's based will be solid forever.
Still, every few years, someone comes along promising a revolutionary OS that discards
all the old 1970s baggage and implements everything using the latest buzzwords du jour. Why implement
all that old Unix gunk when you can build an OS in a version 0.0.3 language someone
just posted on Hacker News? Why should everything be a file when obviously JSON is the only
sensible way to store data? And who needs a filesystem anyway?
But the same thing tends to happen to trendy OSes like these. Over time, they either die
off or end up becoming more and more Unix-like. The developers realize that Unix isn't actually
old and clunky but is actually a rather smart design crafted by hackers with a lot of experience.
Unix may have been written for the mainframes and minicomputers of the 1970s, but it was
very easily adaptable to smaller devices. It's no coincidence that Unix flavors pretty
much run the world now: Linux and FreeBSD on servers, Android on phones, Mac OS on many
desktops and laptops. Even Microsoft is trying to get in on the action with its Windows Subsystem
for Linux.
So Unix is a solid and well thought-out OS, and straying too far from its principles can
be risky. However, that doesn't mean you should be overly dogmatic and resist any change.
Arguably, a few things in Unix-like systems are a bit archaic and could be updated, without
radically re-engineering the whole OS. Say hello to GoboLinux [1].
GoboLinux is – for the most part – a regular Linux distribution, but with one major difference:
it eschews the old filesystem hierarchy (/usr, /lib, /etc, and so forth) in favor of a more
modern design where each program lives in its own directory. In theory, this should
make it easier to distribute, install, and remove programs. Additionally, GoboLinux features
its own boot system that's not based on the old SysVinit or BSD scripts – nor does it
use Systemd. It's a fascinating distro, so in this article, I'll show you how it works,
how to install it, and where it's heading.
A Bit of Background Most Linux distributions adhere to the Filesystem
Hierarchy Standard, aka FHS [2], which determines the directory structure in a typical Linux
installation – i.e., which files and directories go where on the drive. The FHS is heavily
inspired by older Unix flavors and leads to a setup like this:
/ (aka root directory) – The highest level directory, with nothing above. This contains
all other directories (and their subdirectories).
/etc – Configuration files. This really is a mixed bunch, containing text-based config
files for system-wide applications and services, scripts, and other bits 'n' pieces. There's
very little standardization in here, with each file having its own format and syntax,
and various subdirectories.
/bin and /sbin – Base-system binaries for regular users and the superuser (root), respectively.
These are available immediately after booting, before other filesystem partitions are mounted.
Here's where you find the Bash shell and other tools.
/lib – Historically, this contained base-system libraries, like the C library that almost
every program depends on. Today, it also contains Linux kernel modules, systemd scripts (on
distros that use it), and various other components.
/usr and /usr/lib – Programs and libraries for normal user accounts. This is typically
the largest part of an installation and includes non-base software – the X Window System,
desktop environments, Firefox, etc. In many older Unix installations, /usr would be on
a separate partition and mounted later during the boot process to keep user apps separate
from the base system.
Those are some of the most important directories in a typical Linux installation, but there
are many more as well. You can see some historical baggage in there, with some directories serving
multiple purposes, bits of overlap, and not much in the way of standardization (despite
the best efforts of the FHS). Most significantly, though, is that a single program may have
files in many different directories. Have a look at some packages on your current Linux
installation and see where they scatter files. For instance, on a .deb-based distro:
dpkg -L bash This shows that the Bash package drops files
into /etc, /bin, /usr, and various sub-directories of /usr. There is some logic to this, but
it makes a package manager pretty much essential. How can you easily remove a program when its
files are scattered over so many different directories? How can you tell which file belongs
to which program? Tools like dpkg, apt-get, yum, rpm, etc. take the pain of this away,
but you could argue that they are just more layers of complexity and abstraction on top
of what should be a simple design.
How does GoboLinux approach this? Essentially, it tries to redefine the filesystem. Instead
of programs being scattered all over the drive and hard to manage without specific tools,
each program is placed in its own subdirectory of /Programs, so they are easy to locate,
change, and remove. In GoboLinux, "the filesystem is the package manager," drastically simplifying
the software management process. On top of that, the distro makes it possible to have
multiple versions of the same program installed, side by side. Try doing that with your regular
Linux distro – even with the most awesome command-line gymnastics and symbolic link
shenanigans, it's tough to achieve.
Installing GoboLinux You may be reticent at this stage to switch
to GoboLinux as your primary distro. Fair enough – I recommend exploring it in a virtual
machine such as VirtualBox (or just installing it on a spare PC). Go to the download page
[3] and grab the ISO image of the latest release – 016 beta at the time of writing, but it
may be final when you read this.
In VirtualBox, assign it to the emulated DVD drive and start the virtual machine. After
a few moments of booting up, GoboLinux will ask you to select a language and keyboard
map. Then you'll land on a root command-line prompt – which probably wasn't what you're
expecting, so enter startx to bring up the X Window System and access the GUI. From there,
you'll find an installer icon on the desktop, so double-click that and follow the prompts.
If you have trouble running startx, though, you'll need to perform a text-mode installation
:
Installer
Note the capital letter at the start – this is your first taste of how GoboLinux does
things! Use Tab to switch between buttons and other elements on the screen, and Enter
to select them. You'll be prompted to choose the partition(s) on your drive where GoboLinux
should be installed, the package sets to be copied over (it's best to leave them all selected),
and where to install the boot loader. For the most part, you can just accept the defaults
and keep selecting Next.
You'll be prompted to set a password for root, the administrator user, and also create a
normal user account for your day-to-day work. Lastly, the GoboLinux installer will perform
a final check that you're ready to go ahead with the options you selected – if so, the
files will be installed and then you can reboot. If GoboLinux boots into text mode, you can
log in as your regular user account and enter startx to bring up the desktop
Filesystem Magic To see how GoboLinux handles software, open
a terminal and cd into the /Programs directory. There you'll see a bunch of directories, one
per program, so try switching into one – e.g., Nano. Then you'll see three directories: one
with a version number, which contains the binary and support files for that version
of Nano. There's also Current, which is a symbolic link to the version currently in
use (this is how you can have multiple versions installed at any one time), and Settings,
which contains files that would normally be stored for system-wide usage in /etc (e.g.,
nanorc).
This system doesn't just apply to programs but to libraries as well. For instance, Glibc
(the GNU C Library) can be found in /Programs/Glibc/2.24/lib). As for "infrastructure" software – i.e.,
not standalone desktop apps – those are in /Programs, too. You'll find the X Window
System in /Programs/Xorg-server, binaries from Coreutils in /Programs/Coreutils/Current/bin,
and so on.
This is all good and well, but how does GoboLinux keep track of all these, without having to
use a giant $PATH environment variable? Well, take a look in the /System/Index directory.
There you'll see bin and lib directories containing huge amounts of symbolic links to all of the
programs and libraries stored separately in the /Programs folder. For instance, go into
bin and do ls -l nano, and you'll see something like:
nano -> ../../../Programs/Nano/2.7.0/bin/nano This shows you how GoboLinux knows where to
find Nano (and other programs) in the installation. The /System directory contains other components,
neatly arranged into their own sub-folders, as well. You'll see that the kernel can be
found there (along with its modules), while the Settings directory does the job of a traditional
/etc.
Now, if you cd into the root (/) directory and look around with ls -a, you'll notice
something odd: Apart from lost+found, none of the usual Unix-y filesystem locations can
be seen. There's no /etc, /lib, /tmp, or anything like that. What's going on here? Has GoboLinux
done away with them all completely?
Well, not quite. GoboLinux is set up with a kernel patch that hides these directories
by default. They do actually exist, so you can cd /etc and then look around inside, but
they're not shown to you in your daily work. This is all about simplicity: Users and admins
shouldn't need to be concerned about the "legacy" Unix filesystem, apart from in extreme cases.
For most tasks of editing config files, updating programs, and the like, these should all be
possible via the newer GoboLinux filesystem structure.
Helpfully, though, the distro includes a small tool for changing this behavior. Enter gobohide
-l to list all of the Unix-ish directories that are hidden by default. To disable hiding,
so that one is shown at the command prompt and in your file manager, use the following:
gobohide -u /etc Now /etc will be visible. You'll see that
it's a symbolic link to the /System/Settings directory you were in earlier, however, so
it's not just duplicated content.
Have fun exploring the system: Clearly a lot of thought has been put into the design, and
it works surprisingly well given the amount of software out there that expects traditional
Unix-style filesystem layouts. GoboLinux feels well engineered, and when you go back to a
regular distro with its package files scattered all over the place, everything seems rather
disjointed and thrown together.
Still, GoboLinux has its rough edges: I had issues getting some apps to work (see the
"Adding New Software" box), and there are some questions about its long-term viability
(there was a major gap of six years between releases 014 and 015). But even if GoboLinux
isn't going to be your daily driver any time soon, it's good to try out a distro that dares
to do things differently – after all, as great as Unix and Linux are, you should always
give room for improvements. And, given that GoboLinux's novel directory structure can
still be used to create a working distro, I'd like to see some elements of it incorporated
into the mainstream distros at some point (see the "NixOS: Another Alternative" box).
Fedora devs, what do you reckon?
Adding New Software
GoboLinux is primarily a source-based distro, so whenever you want a new piece of software,
you issue a command that downloads the program's source code (along with the code for its dependencies)
and builds the whole caboodle. First, take a look at the available "recipes" [4] – that
is, the scripts and information bundles for various open source apps and tools (Figure
4).
Let's say you want to install Qemu, the rather awesome PC (and other machine) emulator. Enter
the following command:
Compile qemu This will search for a matching recipe and
tell you what it's going to download. If the app has a lot of dependencies, Compile will
prompt you before grabbing them; enter "CA" for "compile all" to skip having to confirm
for every single file.
Then, Compile builds the dependencies and the program itself and installs them into
GoboLinux creating symbolic links accordingly so that older programs using Unix-like paths
can still work with them. GoboLinux has a lot of recipes at its disposal, so you can
find pretty much every major FOSS app and utility in there, although some of the versions
are rather dated
Thanks for watching,
I hope you enjoyed this video,
If you did hit that thumbs up button, it helps me to make good content for you, other then
that, I will see you in tomorrow's video, peace out.