Category: English


A friend of mine asked if I had a spare PC. Now, I had this PC, an old AMD Athlon, sitting in my storage. The PC had a Debian installation, installed for an event a few years ago, so, it didn’t contain any personal information. Anyways, I decided to re-install the machine. I decided to install Xubuntu. A “n00b-friendly” distro but with a sensible Desktop Environment.

While under Debian the machine worked fine, under Ubuntu, the first issue were graphical glitches and artefacts. The second problem is tha Flash refused to work. Firefox reported the plugin was installed, but it didn’t work. Chromium even refused to start up when the pepper version of the flash plugin was installed. *sigh*

So, I am installing Debian again. It’s a newer then the version that was previously installed, of course, but since Debian worked before, I guess it should work again.
Well…. nope… Under Debian I am having simular issues. Well… Ubuntu and Debian are related. Perhaps I should try something else. I mean… personally I would install ArchLinux, but since I will not be the user for that installation, it should be something n00b-friendly. However…. I might try my Arch installation from another machine, just as a reference. Just to rule our a hardware issue….

Oh my…. I haven’t written at all in this blog this year…
Anyhow…. I will report about a number of technical problems…
They always seem to come at the same time, don’t they?

Let’s see, my raspberry pi server, down again. So… what I did in the past, I moved the root file system to an external hard disk, since I was suffering from file system corruption on the SD card. This week, file system corruption also occured on that external hard disk. Last week, the raspberry pi crashed, and when I rebooted it didn’t come up. It couldn’t find the root file system. Powercycling the hard disk containing the root file system fixed the problem. Seeing the problem I had last week, I blaim faulty hardware for the problems I’ve been experiencing. Now, I come to a point where I suspect the SD card I used before to be faulty as well. I am thinking ways to test that SD card. Perhaps I could create a script that writes random data to random positions, both on the SD card and in an image file, and comparing both in the end.

My dedicated server, which hosts this blog, also encountered a problem. A problem simular to a problem I’ve been experiencing with my previous server. It ran out of memory and killed amavis, virtually disabling the email subsystem. Now, I have configured the OOM to be less likely to kill amavisd-new or clamd, to be less likely to be killed in the event the system runs out of memory. For now, only a single instance. Let’s have a look at the /proc filesystem. In there we see a directory per running process.

Say, the pid of clamd is 12345, then we can set the killing likelyness from -16 (unlikely) to 15 (very likely) like this:

# pidof clamd
12345
# echo -15 > /proc/12345/oom_adj
#

Well… having that said, the issue still is, the system ran out of memory. Now, I have to say, this machine was pre-installed by OVH using their default ISPConfig configuration. The machine has 3 GB of RAM installed, and was configured with 1 GB swap. Now, the rule of thumb is to have twice as much swap then ram. So, I guess that’s the cause of the problem. Now, I would like to increase the swap, but I cannot repartition a running system. And even if that wasn’t an issue, the system is running a software raid.

# blkid
/dev/sda3: UUID="8199facf-617b-475a-9874-79f017193cce" TYPE="swap" 
/dev/sdb3: UUID="366beea7-8e2f-457b-b184-78c811df7d07" TYPE="swap" 
/dev/sda1: UUID="9cf67138-a39d-3a3f-a4d2-adc226fd5302" TYPE="linux_raid_member" 
/dev/sda2: UUID="f8058e35-2dec-e859-a4d2-adc226fd5302" TYPE="linux_raid_member" 
/dev/sdb1: UUID="9cf67138-a39d-3a3f-a4d2-adc226fd5302" TYPE="linux_raid_member" 
/dev/sdb2: UUID="f8058e35-2dec-e859-a4d2-adc226fd5302" TYPE="linux_raid_member" 
/dev/md2: LABEL="/var" UUID="f8893706-4d3c-45aa-af84-b302221f3bd7" TYPE="ext4" 
/dev/md1: LABEL="/" UUID="4903b0b6-3e50-4fc9-bb0b-1ab3e6c505b7" TYPE="ext4" 

So, I guess I’ll solve it by creating a swap file instead. The system is paritioned to have a small root file system, and a huge /var file system. Therefore I’ll create the swap file in /var

# fallocate -l 6G /var/swapfile
# chmod 600 /var/swapfile 
# mkswap /var/swapfile 
mkswap: /var/swapfile: warning: don't erase bootbits sectors
        on whole disk. Use -f to force.
Setting up swapspace version 1, size = 6291452 KiB
no label, UUID=74989c54-dc14-4b65-8577-13b356ca79c8
# swapon /var/swapfile 

And add the swap file to the fstab.

Checking the swap status:

# swapon -s
Filename				Type		Size	Used	Priority
/dev/sda3                               partition	525308	254816	-1
/dev/sdb3                               partition	525308	16488	-2
/var/swapfile                           file		6291452	0	-3

Well… I guess this solves the memory problem. I might have a closer look at some logs, but so far I haven’t seen any task using suspecious amount of resources. I guess 3 GB of RAM + 1 GB of swap just wasn’t enough.

Those of you who have been following my blog for years know what my Christmas blog post will be about. I’ve been reading my previous Christmas posts, looking back on what I wrote in previous years, thinking about what my life used to be like, back then.

Christmas… and that fat guy dressed in red… Santa, the symbol of the Commercial holiday Christmas. I have been telling this every year… what makes me sad is seeing Christmas being an economically event. It’s just about the presents, the food, etc. etc.

I plead for a different kind of Christmas. I don’t care about presents or special food, no thanks. What I want for Christmas is that people start caring for each other again.. and not only at Christmas. What I wish for… a new world… a world where everyone can be happy… that’s my dream. I wish people would truly care about each other again, for people to respect each other’s opinions and lifestyles.

I dream of a world without hate. I know what it is like to be done wrong, and I know how easy it is to hate the ones that did you wrong. But I have realised, if I ever want to find peace within myself, I have to forgive. I’ve come to the believe that forgiveness is the only way to peace, not just within me, but in the world as well. Therefore, I ask you, please be forgiving.

I wish for everyone to be happy.  I wish for those who are going through a hard time they’ll find happiness again. For the lonely and depressed, that better times are ahead. For those who spend Christmas alone, either physical or emotional, to find someone that takes away that loneliness. I wish for everyone to be happy.

*hugs* love ya all!

Merry Christmas
God Jul
Vrolijk Kerstfeest

Back in 2011 I used to trade some bitcoins at an exchange called Bitcoin7. This exchange got hacked and I lost all my bitcoins and euros in my account over there and I lost my interest in cryptocurrencies. However, since the exchange rate of the bitcoin got a lot higher then back then, I’ve decided to take a look at it again.

I’m also thinking about doing a bit of mining. I mean… there is a fancy graphics card in my laptop, and I am no gamer, so, mining is the only purpose of the damn thing. However, getting OpenCL working using free software only (free, as in open source. not using proprietary binary blobs as driver) is not a trivial task. The open source nvidia driver, nouveau, does not support OpenCL at all, therefore my HP EliteBook 8530w is out of the question. My HP EliteBook 8570w however, got an ATI/AMD graphics card. With this card, OpenCL should be able to work. However, support is not included in the mesa package available in the repository. In the AUR repository there is a package mesa-cl, however, it fails on compiling a dependency, the libclc-svn package, also from AUR. As I look at the build instructions for GalliumCompute, it seems they compile a llvm/clang with experimental r600 support. I suppose the repository version of llvm/clang misses this configuration option, which may be the cause of this build failure.

Therefore, I am compiling some stuff manually, according to the instructions on http://dri.freedesktop.org/wiki/GalliumCompute/. I usually prefer not to install software which is not managed by pacman. Having files floating around in my root file system that are not managed by any packet seems a little messy to me.

Anyhow. mining… I might have a look at mining both bitcoins and litecoins. Possibly other cryptocurrency as well later, but for now, bitcoins and litecoins will be the thing I will look at. I might possible also have a look at an ASIC for bitcoins. I am considering ordering an USB Block Erupter.

However… synchronising with the bitcoin and litecoin networks takes forever.

I have mentioned a few posts ago about a cheap 3G module that would fit in my HP EliteBook 8530w laptop. It seems, at least at HP, they call it a WWAN (Wireless Wide Area Network) module, but whatever it’s called, I am more interested in getting it to work.

When I checked my mail this afternoon, the 3G module had arrived. So, it’s time to play with my new toy ;)

DSC_0262DSC_0263

So, let’s get started

DSC_0265DSC_0267

My greatest problem was finding fitting screws. I was only able to find one screw that would fit, so that’s why there is only one screw there. But it sits in its slow. So… let’s see if it works, right?

DSC_0270DSC_0268

The BIOS recognises the device, and it’s enabled in the configuration, we’re ready to go. In order to use a 3G Modem, I need a SIM card. I have chosen for a pre-paid card from the virtual provider *bliep. The SIM card slot is behind the battery. In order to use this SIM card, I have to “activate” it by inserting it into a phone and call a phone number. After having done is, it can be inserted in the laptop.

DSC_0278DSC_0269

But after booting ArchLinux, the device is not recognised. There appears to be nothing at all. After a little research, I discovered this is because of the rfkill.

But first things first, installing the drivers:

$ yaourt -S gobi-loader gobi-firmware


Activating the automatic disabling of the soft-block

systemctl start rfkill-unblock@all
systemctl enable rfkill-unblock@all

Edit: the automatically unblocking doesn’t work well that way. It will need some more tweaking. The problem: this way the firmware will not be loaded. The goby-driver uses some udev rules to manage that, but the udev rules need to be parsed before the device becomes visible, which appears not to be the case using this method. But since 3G is not a feature I will be using much, I think I’ll leave it on manual unblocking for now. The code for that is rfkill unblock 3 or rfkill unblock wwan

Activating the ModemManager

systemctl start ModemManager
systemctl enable ModemManager

And when we start xfce4 then, we’ll see

Schermafdruk - 15-11-13 - 20:33:07

And then it’s just configuring the connection. All we need to know is the APN for *bliep, which is internet.arta and we’re ready to rock. What we see here is an IP address from the T-Mobile Netherlands range ;) It works!

Schermafdruk - 15-11-13 - 21:10:05

One thing to observe is the fact *bliep gives me a NAT’ed connection:

Schermafdruk - 15-11-13 - 23:23:31

Okay, so, I’ve got my ArchLinux installed on my HP EliteBook 8570w. I wish have the same installation on my HP EliteBook 8530w. The way to go, just make a copy of the root file system and put it on the other machine.

cd /
tar  --one-file-system -avpcf /mnt/usb-hard-disk/arch-rootfs-running.tar.xz .

Then boot up the other system, in UEFI mode, from the ArchLinux USB Flash stick, and follow UEFI installation guide up to and including formatting the partitions. (See also my previous post: UEFI Installation guide. Then, in stead of pacstrapping, we’re going to insert the usb-hard-disk where we made a tarball and extract it to the root file system partition.

mkdir /mnt/{hd,usb}
mount /dev/sda3 /mnt/hd
mount /dev/sdc1 /mnt/usb
cd /mnt/hd
tar -xvpf /mnt/usb/arch-rootfs-running.tar.xz

Now, we have a “clone” of the installation of the other machine. A few system specific stept must be performed to make this system ready for use. First, I will arch-chroot into the system:

arch-chroot /mnt/hd

I will set the hostname for this laptop

echo 8530w > /etc/hostname

I will remove the graphics card specific patch (See Glamot Acceleration Problems)

rm /etc/X11/xorg.conf.d/20-radeon

I will remove the ssh keys, such that a new keypair will be generated. The same keys on two machines is a no-go

cd /etc/ssh
rm *key*

Another thing that must be done is generating a new fstab, as we have formatted new partitions, their UUID will be different. It is unique after all. (I am overwriting the file. I will re-add the NFS mounts later)

mount /dev/sda1 /boot/efi
mount /dev/sda4 /home
swapon /dev/sda2

genfstab -U -f / > /etc/fstab 

And finally, setting up the boot loader

grub-install –target=x86_64-efi –efi-directory=/boot/efi –bootloader-id=grub
grub-mkconfig > /boot/grub/grub.cfg

Which works fine on this laptop. The other laptop had an issue with efibootmgr.
However, the system boots up into an emergency console. Looking at the fstab generated, it had some weird entry causing the problem:

/etc/resolv.conf/etc/resolv.conf	/etc/resolv.conf	none      	rw,relatime,bind	0 0

Which is probably a remains from the booting from installation media and using the genfstab inside the arch-chroot, in stead of before.
Just removing the entry solves the problem, and then the system just boots up to the login prompt.

But, we’re not done yet. I have cloned the root file system, and not the home partition, Which means, there will be no home directory for my user.
so, log in as root,

mkdir /home/andre
chown andre:users /home/andre

Then, I can log out as root and log in as myself.

Just for convinience, I’ll copy some files from my other laptop’s home directory over:

scp -r 8570w:.config . 
scp -r 8570w:.thunderbird . 
scp -r 8570w:.mozilla . 

The xfce4-cpufreq-plugin didn’t really like this operation, but removing and re-adding it makes everything work. Also, I have to add the temperature monitor for the GPU again.

I was planning to swap the CPU’s of two computers, but I had to abort the plans. I assumed both machines were AMD Athlon 64 machines. But upon closer inspection,
it turned out one of the machines was an AMD Athlon, the earlier 32-bit CPU. Therefore, they have incompatible motherboards, and therefore, the plan is aborted.

The reason behind all of this. My AMD Athlon 64 machine is limited to 1 GB of RAM. The motherboard works fine with 1 memory module installed, but as soon as I insert a second memory module, it won’t even initialise the graphics card. A motherboard I once traded for a bottle of whisky. Anyways, I’ve gotten another working AMD system. I have only used it once or twice, and I thought it contained an AMD Athlon 64 CPU as well, but on closer inspection, it tured out to be an AMD Athlon.

Well… seems that plan got busted. Anyhow… the said machine will get its hard disks wiped and a clean install will be performed. I might just use the same trick as I’ve used on my laptop. Just unpack the root file system from a working installation. I might also install DUET, a loadable UEFI for BIOS based systems.

Since I’m suspecting the problems I have been experiencing booting ArchLinux on a WYSE S30 are related to the bootloader, I have created two bootable USB sticks with ArchLinux on it. One with a legacy GRUB, and the other with LILO. Both are available in AUR.

My original bootable USB stick was made on an 1 GB stick, which is rather small for the purpose. Therefore I’ve dd’d the content of the stick to a 4 GB stick, deleted and re-created the partition, and ran resize2fs on it.

After arch-chrooting (available in the arch-install-scripts package) into the partition, I’ve added the archlinux-fr repository to the pacman configuration and installed yaourt, so I can install stuff from AUR.

Installing grub-legacy appeared to go fine, but, the fact my host system is x86_64 caused a minor problem. The stage 1.5 and stage2 files got installed in /usr/lib/grub/x86_64-unknown in stead of /usr/lib/grub/i386-pc. After adding a symlink, the grub-install script works fine.

After that, I’ve dd’ed the content of the 4 GB stick to an 8 GB one. I have not adjusted the partitions, causing the following issue, and hence the -P ignore while installing LILP

sh-4.2# lilo -C /boot/lilo.conf -b /dev/sde1 -P ignore
Warning: Ignoring entry 'boot'
Warning: /dev/sde1 is not on the first disk
Warning: Device 0x0840: Inconsistent partition table, 1st entry
  CHS address in PT:  1:18:21  -->  LBA (8700)
  LBA address in PT:  2048  -->  CHS (0:33:3)
Warning: The partition table is *NOT* being adjusted.
Added Arch  +  *
Added Arch-wyse  +
4 warnings were issued.

The result, leading to two more-or-less bootable USB sticks. There are just little modification required, depending on how the BIOS of the WYSE S30 will identify the sticks to the bootloader. I am also suspecting this BIOS is what is causing the issues with GRUB2 and SYSLINUX.

Anyhow, the WYSE S30 is at Stack, so I cannot test any of these assumptions yet. Just working a little ahead, doing some preparations. What can I say? I do useful things while procrastinating… one trés importante exam coming up. I really need to pass that Discrete Structures exam, and then I can start my master’s project. And I must admit, it feels a little strange, thinking about it. Thinking about doing research, writing a paper. I mean… things are getting serious now, but, more then that. Thinking about people actually being interested in what I am going to do. The idea of what I am about to do is important. I mean… thinking it really matters…. it’s just weird you know.

Looking inside my laptop, I noticed:

An empty slow with wires

An empty slot with wires

I noticed an empty slow with two wires. I believe those are inteded to install a 3G module. There is a SIM slot behind the battery. Looking at my laptop’s (HP EliteBook 8530w) data sheet, the appropiate 3G module is an HP un2400. It’s available on ebay for US $13.58 + $2.89 shipping. According to google that’s about € 12. For that price i’d say it’s worth a try.

Looking at the datasheets of my other laptop’s (HP EliteBook 8570w) data sheet, the matching 3G Module is HP un2430. This is also available on ebay, but it’s a little more pricy: US $ 53.99 + $2.99 shipping. For that price, I say no thanks!

I mean, I don’t need it at all, but it would be a nice toy to play with. So, I wonder, would the cheaper un2400 also work in the new laptop? According to this thread on the hp forums it might be blocked by the BIOS. Damn, that would be a nasty trick to make people buy the expensive 3G card. I mean, what the fuck? The thing performs the exact same task, why it is 4 times as expensive?

So… I might buy that thing some time, and test it in both laptops. Who knows… but I will also be looking for an optical drive to use in the “upgrade bay” of my 8570w. I mean… a laptop without an optical drive feels kinda incomplete.

As I have mentioned before, my HP EliteBook 8530w has been experiencing overheating problems, which I expected to be related to dust. Undusting this laptop went easier then anticipated.

Step 1: Remove the keyboard screws, located at the bottom

Remove Keyboard Screws

Remove Keyboard Screws

Step 2: Unlock the keyboard locks, located at the top of the keyboard, between esc and f1, f4 and f5, f8 and f9, f12 and scroll lock/

Keyboard locked

Keyboard locked

Keyboard unlocked

Keyboard unlocked

Step 3: Remove the keyboard

Remove the keyboard

Remove the keyboard

The keyboard looks a little dusty on the back, however, the fan doesn’t look as dusty as expected. Appearances are deceiving.

Step 4: Remove the fan

Thick layer of dust

Thick layer of dust

As you see, there is a thick layer of dust at the air outlet of the fan, even though the fan blades are just a tiny bit dusty.

Dust

Dust

Now that thick layer of dust is removed, put everything together again in reverse order ;)

Now…. I am running the laptop at full speed (2.8 GHz in stead of 800 MHz) and make it compile stuff, to see if the overheating problem is solved.