Linux and FOSS

Getting GNU Linux back on the desktop

I installed Linux for the first time… a long time ago. I remember downloading the 10-12 floppy disk images to my 250MB hard drive equipped 486 computer. It took quite some time because it was not only slow using a 28.8k modem I also had to watch out so that my parents didn’t find out I was hogging the phone line. It quickly got expensive since phone was paid by the minute in Sweden back then. I played around and learned a lot using it. It was mainly console mode or fvwm2 in the X-windowing system. But compared to Windows 3.11 it was great and super stable. I still have fond memories of this time.

Ever since this I have been a Linux user. Started of with Slackware and later moved over to Red Hat and then Debian. During all these years I have been a full on Linux desktop user for periods of time but also been pushed into using both Mac and Windows. The latter has always been painful. For the last 5-10 years it’s mainly been Ubuntu on the server side and Mac for the desktop. Recently, because of the bigger cooperations and governments start to invade privacy more and more my interest for free and open source software has increased a lot. I thought it was time to try Linux on the desktop once again. This time the choice fell on Debian.

Closed Vaio laptop
The closed Sony Vaio laptop

For work I cannot really switch from my Mac but privately I will try too use my Linux box as much as possible to see how well it can fit my normal day-to-day needs. I have re-purposed an old Sony Vaio laptop that I have not been using at all for the last few years. It has had Windows 8 installed and I cant stand that user interface. I have also found the machine loud and hot. When your hands and fingers sweat when typing on the keyboard, you know it is warm.

The not so smooth installation

I choose to use the latest Debian (stretch) and during the installation wizard the Gnome user interface. I have been using both KDE and Gnome in the past and liked them both. The installation was not pain free. My first issue was to find the correct ISO image and get it correctly flashed to a USB thumb drive. Etcher is a fantastic tool and I highly recommend it if you are starting this journey from Mac OS. It is super easy to get the drive flashed. Download etcher, choose the ISO and flash. Done. My issues where to find this tool but also to find a working thumb drive in my drawers.

After figuring out how to get into the BIOS to deactivate “secure boot” I got booted into the install wizard which was really nice and had changed a lot since my last installation. I needed to spend some time to get the WIFI to work – this laptop is using an intel chip set that does not have any free/open drivers and thus they are not included in the distribution. Google helped me to find them separately and feed them into the installation process. To use Google less will be a later project to embark up on. This could probably have been done easier and if you are a less computer savvy user this would have stopped the journey completely. Since I will not use this machine with any other OS I chose to repartition and use the whole drive for my installation. Nice experience so far! Now the real problems started.

Making it boot

When the installation was complete the computer reboots and no operating system could be found. I could boot using the flash thumb drive and the grub command line tool that was included. For my own memories sake, and yours, this is how I could reboot back into the system using the grub command-line.

set root=(hd1,2)
linux /boot/vmlinuz root=/dev/sda2
initrd /boot/initrd
boot

Of course the path to the right kernel and initrd images should be used. Luckily you can tab your way through the grub command line tool.

So this got me into the machine, but it is not very optimal to do this every time I need to restart the laptop. And what if I loose the USB stick? So here I spent a few hours to figure out what was going wrong. The main issue was and is that this laptop is using uefi but is not adhering to the standards. Not surprisingly knowing how tightly it was designed with Windows. But I managed to find a solution to have it boot back into Debian without needing the USB. I found two articles (one and two) that helped me even though I didn’t do exactly what they did to solve my problem. What I did after successfully booting into my laptop was:

1. Fix the EFI-partition

By using the terminal I did the following (needs to done by “sudo” these commands or “su” into a root-shell).

cd /boot/efi/EFI
mkdir Microsoft/boot
cp debian/grubx64.efi Microsoft/boot/bootmgrfw.efi

When the EFI partition is fixed, time to push grub a long.

2. Updating the grub configuration and pushing the boot loader into the master boot record

The grub configuration file can be found on /etc/default/grub and in it there is a variable called GRUB_CMDLINE_LINUX_DEFAULT. This was updated from “quiet” to “libata.force=noncq quite”.

Again with “sudo” or a root-shell do the following to update grub and install it.

grub-install
update-grub

This was all I needed to to get it to work. Sounds simple but took a few hours to figure out and a lot of reboots. My interpretation of this is that this Vaio laptop is simply ignoring the settings of the uefi boot loader and always tries to booth the Windows one. Even if it doesn’t exist. If I still had Windows installed I could probably have added my Linux installation to the Windows boot manager and there gotten the choice to choose OS. But here I am only going to use Linux.

The Sony Vaio with the lid open
The Sony Vaio with the lid open

From here and on

I have not been using my new system that much yet. I have done a couple of hours of work. Mainly systems administration work on some of the websites I am responsible for. And of course this blogpost. What I have noticed so far is that the system is probably using a lot less energy compared to when on Windows. It is not hot and uncomfortable to work with anymore. The fan is starting from time to time but compared to constantly being on before is a huge improvement. This has also had a dramatical increase in battery life. From 2 hours on Windows to almost the double on Debian. I am mainly using the laptop as it is a stationary but it is still good to be able to use it on the road if necessary. The biggest change is actually the trackpad. I could not use it at all on Windows but it works good-enough now. In the past it was super sensitive and right click almost never worked. Now it works more like a normal trackpad even though I think it is pretty bad build quality on this particular laptop model. I will most likely continue to use an external mouse. I am suspecting that this trackpad could be impacted by the laptop being warm and thus not working as expected.

Screenshot from Debian Gnome Desktop
Fixing some images in Gimp for this blog post

There is of course a lot left to try out. I have not checked if the sound capabilities works is as one example of this. I will continue to use it and I will report back with my findings after a few months use.