Newest Ubuntu box -> Magnificence - GNU/Linux
(This is part of the podcast discussion extension)
You've been given the newest Ubuntu box with all the possible bloat
pre-installed (as in Unity, compiz, etc..). Your job is to turn it into
the magnificent rice machine within the time lapse of a week. How do you
proceed? (Hardmode: You only have remote access and you can't erase the
precious information from the drive)
This podcast was a simple talk between z3bra and I.
I went through my research and he commented on it.
Disclaimer: I did not test anything mentioned, it's a bunch of speculations.
I do not take responsibility for anything bad that might happen to you by
To attack this challenge I divided it in 2 parts.
The first focusing on stripping down the box to a bare minimum, removing the
unnecessary, and the second being the ricing part, which is easy for us once the
box is stripped down.
* Remove useless packages with their installed dependencies
Go to `/usr/share/applications` and un-install everything. Yes, literally
everything that is in that directory.
To do that you'll have to find the program that is called by the desktop file.
It's after the `exec=`.
Then simply `apt-get purge` them.
* Remove unity
Unity is a pain to any ricer. It messes up anything that is not Unity related.
Quote:> I was using Ubuntu at work because of the ease of use
So, you can't run anything along Unity, it'll break.
This long line will save you:
Don't forget to add users to the audio group or just uninstall pulseaudio.
There's another fix (untested):
* Remove and un-install daemons that are useless
Ubuntu comes with a plethora of daemons.
We don't want most of them.
To list them you can use:
Then you purge them.
The service command is a wrapper for the init system of
Debian based distros.
Thus, it worked for SysV, Upstart and now systemd.
Indeed, on Ubuntu 15, it changed from Upstart to systemd.
* Remove the splash screen and login manager
To do that edit `/etc/default/grub`, and remove the "quiet splash". After this run `sudo update-grub2`.
To remove lightDM, edit `/etc/X11/default-display-manager` then uninstall it.
* Clean up the rest
There might still be a lot of program on the machine that aren't used.
To get a list of them we use the Debian package manager:
We purge them, as usual and then we run:
To remove the packages that were installed as dependencies and are not needed
Make sure new users won't suffer. There might be things that are deployed when
they are created.
* A Nice Headless Box
At this point you should have a nice headless box, we cleaned it up.
I was wondering with Ubuntu 15 if a stripped down box wouldn't be equivalent to
a Debian box.
What's the difference anyway.
I did a mini-research and found this thread.
Quote:Debian uses SystemV style init, and inittab;
Quote:Most of Ubuntu's packages are just recompiled from Debian, so the software defaults (like the Apache web server configuration) are identical. I have two servers, one running Ubuntu Server 11.04 and one running Debian 6.0 and there hasn't been a single instance where I couldn't just copy a configuration file between them and have it work correctly.
Well, well, since Ubuntu 15 and Debian Jessie are now both running systemd that
doesn't leave much of a difference.
Systemd has brought a weird "unity" to the Linux game. (Pun intended).
We wondered about the difference in hierarchy, but weren't sure about it.
Considering their relation, they are mainly compatible. Obviously because Ubuntu is Debian based.
* Sources And Package Managers
You can't escape the init system but you can escape other things.
The box being stripped to a bare minimum you could try changing the sources,
/etc/apt/sources.list, to point to other compatible repos.
You might try Jessie or Linux Mint. (This really needs to be tested).
If you are still not satisfied with APT you can try another package manager.
You leave APT for the bare minimum that you currently have and use the new
package manager for the rest.
Possible candidates are:
pkgsrc on Linux
here's a quick guide.
The ricing part, the easy part.
I would personally use Ricerous as a reference to not forget anything.
There's not much to talk about here, we do that all the time with distros that let you start from scratch such as Debian, Arch, Crux, etc..
There might be another way to rice the box without having to stick to Ubuntu
and strip it down.
You can install another distribution from a running OS, copy the files
to it, and then without rebooting switch to the other to erase and resize the new partition.
This is a bit extreme and complicated.
Ubuntu is running you install some static packages and tools.
You build the kernel image that you want to boot to.
You boot from RAMFS which has assess to ssh and your harddrive.
Once you have that you can resize the partition and install the other distro.
There's a wiki link of the Alpine distro discussing the topic.
Other interesting options:
Quote:Ksplice is an open-source extension of the Linux kernel that allows security patches to be applied to a running kernel without the need for reboots, avoiding downtimes and improving availability (a technique broadly referred to as dynamic software updating).kexec
Quote:In computing, kexec (abbreviated from kernel execution, and derived from the Unix/Linux kernel call exec) is a mechanism of the Linux kernel that allows "live" booting of a new kernel "over" the currently running kernel.
Overall it was a great podcast!