erroneous thoughts

· · · whilst the great ocean of truth lay all undiscovered before me · · · /Newton/

Debian ex Arch(Linux)

So I decided to use some free un-allocated space in my laptop’s hard drive to install GNU/Linux Debian. Doing this has been on my mind for some time now, but the final straw that pushed me to do it was the fact that I need to use Skype (ahem…), and given that it is a piece of crap proprietary software, now owned by an NSA friendly corporation, I decided I might as just install Debian, and dump Skype therein, where it can only cause a minor amount of damage. (Of course I only noticed that for Linux only 32 bit binaries are provided after installing 64 bit Debian…—but alas I got lucky, as that did not bring a lot of extra trouble—more on that later.)

OK, so having ArchLinux already pre-installed in my laptop, I decided that the best thing to do is install Debian from Arch. What I describe next are the changes to that procedure that I have to do to get it to work.

So first, this method of installation requires the debootstrap tool; for Archers, you just have to get it from the AUR.

Next, after creating the chroot environment and chroot-ing into it, the PATH environment variable will not be set—which means that to run commands at the prompt, you’ll have to invoke them with their full path—not very practical. The solution is to set PATH to the value of ENV_SUPATH in the /etc/login.defs file.

# export PATH=<value from `/etc/login.defs`>

Next, when setting the timezone, there exists nothing in the /etc/rcS file that is used to indicate «whether the system will interpret the hardware clock as being set to UTC or local time». But this did not seemed to cause trouble so, moving on…

Next, I stumbled across one weird error when running aptitude update. It complained that some signatures could not be verified, but it turned out that it was caused by a network outage I had failed to notice…

Next on the menu is dealing with the bootloader. I use GRUB, so it was just a matter of adding an entry for Debian. The partition where Deb is installed is /dev/sda4, so in file /etc/grub/40_custom I appended the following:

set root(hd0,4)
linux /boot/path/to/vmlinuz root=/dev/sda4
initrd /boot/path/inird/image

After that you have to run # grub-config -o /boot/grub/grub.cfg to generate the GRUB configuration with the new entry. In the snippet above, the reason you have to specify the root location twice is that in more advanced setups, the values could be different: in the first line we tell GRUB where to find the linux image (vmlinuz), whilst in the second one we tell the linux kernel where the root filesystem is located. For example if we had set up a separate boot partition, those values would differ. In the second line you can also add kernel options; the ones I used were taken from here.

A quick side note about initrd: in my first attempt, the Debian system I ended up with was not bootable. I thought at first that this might be because the initrd was missing a module for ext4, the filesystem I choose to use. So I added the module, like so:

# echo ext4 >> /etc/initramfs-tools/modules
# update-initramfs -v -u -k `uname -r`

Next, we have to deal with users and passwords. The first step is to set root’s password: just run passwd. Then you have to add an everyday, non-root user: run adduser. Next you have to install and set up sudo, and KDE.

# aptitude install sudo
# aptitude install kde-standard

About KDE, when selecting the keyboard layout, two of the choices were “Português” and “Português nativo”. DO NOT CHOOSE THE LATTER! It completely screwed up my keyboard, inside KDE, to the point I was not able to login (because I could not type the password). Always choose “Português”! Anyway, that ordeal forced me to reconfigure the keyboard, which is done like so:

# dpkg-reconfigure keyboard-configuration

For testing, I also required the startx command (to avoid having to reboot the machine to see if my latest tweak solved the problem…). It is in the xorg package.

Finally, although I only noticed this after installing Skype, sound was not working in Debian. To fix this, do in root, and reboot:

# aptitude install alsa
# alsactl init

Actually, this got sound working on Debian generally—but not on Skype. More on that below.


The instructions for amd64 in Debian’s wiki are sufficient:

# dpkg --add-architecture i386
# apt-get update
# wget -O skype-install.deb
# dpkg -i skype-install.deb
# apt-get -f install

The first line enables Multiverse (remember Skype is 32bit only, whilst we are now in a 64bit Debian…), and the last fixes missing dependencies. Beware to check any packages that last command might want to remove, for some of those may be potentially still necessary!

Now, as mentioned before, there was no audio in Skype, and it turns out the fine wiki has the answer for this as well: Skype now requires pulseaudio to be installed. The Debian installer already installed the libraries for this; I was only missing the server, so:

# aptitude install pulseaudio

Notice that this will start the pulseaudio server, and set it up for starting when logging in.

I end this post by noting that if you use an external webcam and/or microphone (as you should), these have to be selected in Skype after been plugged in.

That’s it! Enjoy your conversations and, while you’re at it, don’t forget to thank the patriotic men and women who have nothing better to do tirelessly monitor everything we do and say, to stop The Bad Guys™ from triumphing! Have fun!