My Debian 9 Installation Experience

Two days ago, I switched over to Debian 9 from a customized version of Ubuntu. I just love it. However, installation and configuration was not that easy. It seems I got obsessed with the easy installation mechanism presented by Ubuntu. I had of course installed other distros before Ubuntu, which had primitive text-based interface. They include the early versions of IT@School GNU/Linux (based on Debian 4) and CentOS. The former switched to Ubuntu and the latter has included a much simpler installer Anaconda.

Ubiquity, the Ubuntu installer, was really revolutionary (in a desktop user's viewpoint). It has regular graphics and multilingual support from the first stage itself. This feature usually gets cloned into all other distros that are based on Ubuntu. Anaconda is also simple, and is used by distros including Fedora and CentOS.

As I said earlier, I used to install desktop distros with primitive UI installers. I have considerable experience with command-line-only versions also. This very server is run by Debian 8 with no desktop at all (as of 2017). Besides all, I'm a command line lover. But that's not the case when it comes to a desktop version. It has to be free of any geeky stuff because you're thrilled to tell your neighbor how simple GNU/Linux has become. However, installing Debian 9 wasn't a pleasing experience (except having the thrill of switching to a much libre distro).

Of course most of the issues were caused by some silly mistakes I made. But if many make the same mistake, it means the software is less user-friendly.

I'm not writing this to blame Debian developers. Debian is of course a great distro. The aim of this write-up is to share my experience with solutions to some common issues so that it will be helpful to others. Also, those who contribute to Debian can consider this to make it much user-friendly.

The situation

I occasionally test new distros in virtual machines. But I won't be changing my primary installation because of stability issues. Due to the fact that my hobbies span different fields including programming, music, photography and web technologies, I need a bunch of additional packages. Switching my primary distro means installing and configuring all these packages, which isn't easy (but I bet it is way simpler in GNU/Linux compared to any other OS, provided you have a good Internet connection).

Another issue is files. I need them in my Home folder. But reusing the Home from an old installation can cause issues (yes, even if you have created a separate partition for /home). Moving hundreds of thousands of files from the old partition to the new one seemed to be the only solution, which is another nightmare (by this installation, I changed the my methods: made a separate partition to get mounted as a sub-directory inside /home/nandakumar/, which means I can reuse it in future without any serious issue).

So what I usually do is installing an LTS version and simply continue using it until it becomes unsupported.

Now you know there must be some serious reason for this switch. First of all, I had always wanted to switch from Ubuntu to something like Debian. But what caused it to be now was the issue with CPU architecture. My old installation was 32-bit. The whole world is getting 64-bit-only. I didn't make the switch partly because I knew there wasn't any real performance enhancement and partly because my Pentium Dual Core was identified to be 32-bit-only by some installers and virtual machines. But it has become too late. More and more packages are becoming 64-bit only. It isn't easy for me to cross-compile my packages for 64-bit users also (or use a VM or another PC to do so).

I knew that my CPU actually supports 64-bit code and modern GNU/Linux distros should be recognizing it. So I simply made the decision to switch my primary distro, and it was the right point to fulfill my dream. Instead of upgrading to a 64-bit Ubuntu, I chose 64-bit Debian (I don't hate Ubuntu; but an obsession is dangerous because there are other distros to explore, among which are much libre).

Mistake 1: didn't get the right ISO

To get Debian downloaded, I first visited debian.org and followed the link Getting Debian > CD/USB ISO Images, as I was planning to prepare a Live USB stick.

Now I made a silly mistake: Just followed the link Download CD/DVD images with BitTorrent, without scrolling down further, were a separate link for Live images are given. I had downloaded Debian before, and I should've known it. Sadly, I realized this only after the download was complete, which coasted another couple of hours.

For those who plan to prepare a live USB of Debian 9, this is the page you should visit:
https://www.debian.org/CD/live/

Mistake 2: didn't burn it right

I realized this only in a later stage. But since copying the image comes second in the process, I include it here.

When the installation was progressing, I got an 'Installation failed' message. There was no clear explanation. I got back to the menu and tried verifying the CD (USB stick, actually), which also failed. A quick search on the web suggested me that I should go back to the installer menu, execute a shell, and mount the USB stick as /cdrom manually. I tried that, even created a symbolic link to make both /cdrom and /media/cdrom point to the same contents, but no success.

So I aborted and booted into my old installation. There I checked the SHA1 sum of the downloaded ISO (which I should have done before copying it). Thankfully it was not corrupted. So I decided to prepare the stick again.

I had used the dd command (dd if=/debian.iso of=/dev/sdb bs=4M) for my first experiment. This means I didn't make the mistake to use Unetbootin or give /dev/sdb1 instead of /dev/sdb. Still having problem, I thought I could use a different command this time.

Thanks to the official documentation, I used this and the issue was resolved:

cp debian.iso /dev/sdb
sync

I'm not sure whether the problem was with the use of dd command (especially since I've given bs=4M). Still to try it again and see the results.

Can't run the installer from live desktop

The early Ubuntu discs presented a screen with two options, Try Ubuntu and Install Ubuntu. Even though one has opt to try Ubuntu without installing, he can trigger the installation process simply by double-clicking on a special icon on the desktop. Newer versions directly present the desktop, and the installer icon remains there. It will be a exciting experience for a newbie to install an OS while he is playing a media file in parallel (although this is not recommended).

This is the first feature I noticed missing in Debian Live. It is the boot screen that presents you the options to chose between the installer and the Live desktop. If you choose the Live desktop, you have to restart to get the installer back.

Internet connection required?

I didn't download a netinst CD, which means I should be able to install Debian without having Internet connection. But that wasn't the case for me this time. The installation kept failing at the mirror selection stage when there was no Internet connection. Still I get the error when I try the stick in other computers. Did I forget to turn off something? I don't think so. However, if you are in a hurry, make sure that you have an Internet connection and you don't skip the network configuration stage while installing.

If Internet connection becomes necessary for installing a GNU/Linux distro, it is going to be really hard. Vast majority of users still don't have a regular broadband connection. But the real frustration comes when you have a working Internet connection, and your network card is not supported by Linux. Let us hope an active connection won't be necessary for installing GNU/Linux at least until Internet becomes ubiquitous.

My computer says I'm not the admin!

This was the real problem. Locking root access is an expected behavior in most GNU/Linux distros. But this was a step further. I was denied the most basic administrative privileges. I failed to unlock the System Settings dialog using the default account I created. I tried both my (admin's) password nor root's password, but neither helped. Same issue with mounting additional partitions. I wasn't able to run the sudo command as I was not in the sudoers file. This means I can't even install additional packages. root login is already locked, so there was no way I could've solved the issue from within Debian.

I tried the recovery mode from the GRUB menu while startup, but it was locked, too.

One solution is to boot into another installation or Live disc and edit the sudoers file manually. But I tried the much simpler way: dropping into single user mode by editing the GRUB entry (thanks to some online documentations). While in the GRUB menu, I chose Debian (regular, not recovery), pressed e to edit, appended init="/bin/bash" at the end of the line that starts with the linux command (RedHat-based users should be appending single instead), and pressed F10 to boot. Boom, I have the root shell!

Now I gave these commands:

mount -rw -o remount /
passwd
adduser nandakumar sudo

The second line enabled me to change and unlock the root password (without giving the older one), and the third line added my primary user to the sudo group. Problem solved.

(This isn't a security flaw. Your computer can be manipulated by a random person if he has physical access, anyway. So there is no point in disabling this convenient feature.)

GNOME: Shell is amazing, but apps can get better

If you haven't tried GNOME 3 yet, just try it. If you tried it in its early days and instantly hated it, make a comeback. You'll love it. GNOME 3 has become way better. However, despite having a vast set of built-in shortcuts, keyboard and input support has still to get patched.

I'm discussing GNOME since I downloaded Debian with GNOME flavor. There is no point in going deeper since this is a review of Debian, not GNOME. GNOME is not limited to Debian and Debian is not limited to GNOME. However, as a desktop environment officially supported and served by Debian, there is no point in skipping it also.

Modern, classic, and accessible

When Ubuntu introduced Unity, initially I hated it. I was using GNOME 2 with the classic Applications, Places, and System menus. But I knew the psychology of hating strange things, and hence gave it a try. Eventually I got obsessed with Unity, mainly because of the keyboard shortcuts it supported. Using all ten digits with the Super Key was the easiest method to launch my favorite applications. The window switching mechanism was also attractive. Now GNOME 2 became the harder one, as you can't launch an application directly by typing its name, unlike Unity. I had tried GNOME 3 in its early days, but didn't find it a replacement for Unity as the window switching mechanism wasn't that easy.

But that's not the case today. I got GNOME 3.22.2 shipped with Debian 9. It is way better and faster than Unity. No crashes at all. Set your favorite shortcuts, and it's all yours.

Like in other distros, you can select alternative desktop environment in the login screen. GNOME Classic is available there along with GNOME Shell (if you downloaded Debian GNOME), which has the classic Application menu and panels.

However, switching between desktop environments didn't work very well. I had to login twice or restart to get back to GNOME Shell after I had just tried GNOME Classic.

Revolutionary UI has less keyboard support

GNOME Shell is really productive if you are a keyboard lover. But I don't think the same applies to the default applications in GNOME. They are dropping classic features like menus, toolbars, status bars, etc. Countless people have complained about Nautilus dropping its support for panes (F3 feature; however, I started loving tabs instead of panes after this update -- it is more productive).

GNOME developers say these changes are to support multiple devices including the touchscreen ones. I understand that. But removing menus isn't a cool thing. For example, I used to issue the shortcut Alt+T, D to select the word counting option from the Tools menu in Gedit. Now there is only one menu which looks like the super menu present in browsers and mobile phones. The worst thing is, it doesn't support keyboard shortcuts (or, did I miss something?). Hope they can offer different types of menus based on the device type.

I could make the status bar visible by editing /org/gnome/gedit/preferences/ui/statusbar-visible using dconf Editor. Still to explore more options.

Issues with input methods

I had noticed a mail from the mailing list of Swathanthra Malayalam Computing, reporting the absence of Malayalam keyboard layout in Debian 9 and the inability to install it by standard means. At least this issue wasn't a surprise to me.

GNOME finally has an integrated 'standard' input system which claims to support all major languages. But I couldn't find any Indian languages there (except Hindi, if I remember correctly).

Here is the details of the bug, which seems to have got fixed by now:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=865316

Before that this is what I tried:

Turned off the integrated IM to try other methods including fcitx (thanks to the official documentation):

gsettings set org.gnome.settings-daemon.plugins.keyboard active false

Tried different methods, and fcitx worked. But the regular layout switching mechanism didn't work as expected. I had to launch the whole configuration screen each time I had to switch the layout (to move the required layout to the top of the list).

Then I found this page, where the command to switch the XKB layout directly was given:
http://wiki.laptop.org/go/Keyboard_layouts

So I wrote a shell script, wrapping the commands I needed:

#!/bin/sh

if [ -f /tmp/ml ]; then
    setxkbmap us
    rm /tmp/ml
else
    setxkbmap in -variant mal
    cat /dev/null > /tmp/ml
fi

Then I created a shortcut for it (which was the next difficult thing since GNOME Shell had eaten up almost all combinations). What I have now chosen is Right Ctrl + Menu.

Printer issue (CUPS not installed by default)

HP LaserJet 1020 plus is the printer I use today. Unlike Canon printers, HP printers have a good support on GNU/Linux. If I face any issue, I can manually install the latest version of hplip, and the issue will probably get resolved.

But to my surprise, model-specific detection or driver issues weren't the problem here. No printer was supported at all. When I opened Settings > Printers, it showed a message Sorry, the system printing service doesn't seem to be available.

A quick search on the web suggested that I should be running the CUPS service, which I tried and failed. Then I checked the package list to find cups wasn't installed at all! I don't think cups is a package that breaks Debian policies. I'm using the main repository and cups is present there. So why is one of the most basic components missing by default?

However, I installed the package cups manually, and the issue got resolved:
sudo apt-get install cups

When I did that, everything was easier. I got the printer detected without any issue. Still it didn't print. I had expected that to happen. Now I installed the package hplip, and ran hp-setup -i

It prints now. Sadly, hplip needed some non-free plugin to get all of the printer.

Still I love Debian!

A developer should consider any non-user-friendly situation an opportunity to learn and create new things. Installation of Debian 9 was also such an opportunity to me. But it was more than an educational experience. After all these workarounds and some additional tweaks, I have actually started loving it! Seems I won't be using the customized Ubuntu 14.04 installation anymore (except for 32-bit testing).


Written by Nandakumar Edamana and originally posted on nandakumar.org. Verbatim copying of this article or selected parts permitted, provided this message is preserved.

Read more from Nandakumar at nandakumar.org/blog/