Odi's astoundingly incomplete notes
New Entries
BT battery strength support upcoming in 3.3
Yey, the 3.3 kernel will report the battery strength of Bluetooth mice and keyboards! The patch just went in.
Add comment
Upgraded from x86 to x86_64
Yesterday I have upgraded my 2006 MacBook Pro from 32 to 64 bit Gentoo. It went notably smooth. This was the ONLY reinstall in five years. Here the full beauty of Gentoo shows: smooth upgrades from a 2.4 kernel then to 3.1 today, kde-3 to kde-4.7, glibc, etc. everything without ever completely reinstalling and not being able to do something else while it's upgrading!
Downtime for this one: one night during which it was recompiling everything.
The steps involved were more or less:
Downtime for this one: one night during which it was recompiling everything.
The steps involved were more or less:
- run a full backup
- make sure to have a bit of free space left
- find a decent boot CD with 64bit kernel where WiFi works: SystemRescueCD
- mount the hard drive
- move the old root under a directory (
/old) - install Gentoo stage 3 over the network
- move over the distfiles from
/old/usr/portage/distfiles(they use a lot of space and saves you lots of downloads) - move back the
/homedirectories and/root - copy back
/etc/passwd* /etc/group* - copy back some
/etc/conf.dfiles, especiallynet - copy back
/etc/make.confand changeCHOST="x86_64-pc-linux-gnu" - copy back
/etc/portage/* - copy back
/usr/src/linux, make oldconfig and make - also re-emerge grub and do grub setup again
- reboot, yey!
- emerge xorg-x11
- emerge kde-meta
- go to sleep
- restart into KDE, see Desktop the way I left it, smile at the world
- emerge what else is in
/old/var/lib/portage/worldduring breakfast - delete most of /old, just keep some files in /old/etc and /old/var if needed later
- delete /usr/portage/distfiles
- rely on backup and this website
emerge --sync now takes only seconds while before it could take minutes. No idea what causes that much difference.EDITOR and PAGER in Gentoo
Gentoo lets you define your locale, editor, visual (vim), pager (less). They set the respective environment variables. By default these are unset. Make sure to set them.:
eselect locale eselect pager eselect editor eselect visual eselect vi
openssl version information in ELF binaries
It seems that on Debian the OpenSSL libraries (
Gentoo (and other distributions) does not have OpenSSL built with version information. Using a Debian binary (like spotify) on such a system causes
I have hacked up a little Java utility that does just that. It should work on most ELF binaries that link against openssl. Yes it's Java, as it's the language I'm fluent in. Feel free to convert it to C.
Download ElfFix.
libssl.so, libcrypto.so) contain symbol version information. Binaries linked on a Debian system against OpenSSL may thus contain version requirements on these shared objects.Gentoo (and other distributions) does not have OpenSSL built with version information. Using a Debian binary (like spotify) on such a system causes
ldd to complain about the missing version information:/usr/lib64/libcrypto.so.1.0.0: no version information available /usr/lib64/libssl.so.1.0.0: no version information availableGentoo's
revdep-rebuild thus detects the binary as broken. To fix this issue we can modify the binary and remove the version information in question.I have hacked up a little Java utility that does just that. It should work on most ELF binaries that link against openssl. Yes it's Java, as it's the language I'm fluent in. Feel free to convert it to C.
Download ElfFix.
Oracle without swap works
Oracle without swap
I have been running Oracle 11.2 on x86_64 linux 2.6.39 with no swap and transparent hugepage support. The system has 6GB RAM and
Oracle is configured to using automatic memory management with
While Oracle would run fine most of the time, sometimes connect fails with:
Obviously
So to fix this, I reduced the SGA to 3.5GB. This results in a bit less than 5GB used memory. And now it works fine without swap!
vm.overcommit_memory=0. Oracle is configured to using automatic memory management with
MEMORY_TARGET = 4000M. There is nothing else on the system. So 6GB vs 4GB should be plenty, right? Wrong.While Oracle would run fine most of the time, sometimes connect fails with:
ORA-01034: ORACLE not available ORA-27102: out of memory Linux-x86_64 Error: 12: Cannot allocate memoryIf you go to the server and check the memory usage, all seems fine however:
~ # free -m
total used free shared buffers cached
Mem: 5972 5714 257 0 11 4078
-/+ buffers/cache: 1624 4347
Swap: 0 0 0
After adding a little swap file (1 GB) the problem goes away. With vm.swappiness=40 the swap usage remains stable at around 250MB. So what's going on here?Obviously
free's output of 1.6GB used memory is wrong. The 4GB SGA lies in the shm filesystem, and obviously doesn't show up here. Why? Because in Linux shm is mapped to the filesystem cache. I guess this is a trick so that reads from shm do not get copied to cache. So to get the real memory usage you have to add the shm usage to free's output. And that sum is 5.6GB. Which is admittedly a bit much for a 6GB swapless system.So to fix this, I reduced the SGA to 3.5GB. This results in a bit less than 5GB used memory. And now it works fine without swap!
-this may be a fork() related problem: Linux doesn't let you fork unless it can pre-allocate enough space, even if it's never actually used. You may need enough swap space to host the memory image in swap if needed.
I am not convinced. That would mean fork() doesn't work at all in a system with no swap. Which is obviously not the case.
Localization gone wrong.
Today I recevied an Excel file with dates that look like this:
- 2.Nov.2011 03:00:00 nachm.
- 22.Nov.2011 10:00:00 vorm.
Spotify on Gentoo
Spotify is available in my country, yey! I have written an ebuild for Gentoo that actually works. The trick is to symlink old openssl so names to
openssl-1.0.0. Spotify does not actually depend on the old version (it crashes with it). It merely expects the old so names instead of the (correct) new ones.Kaki jam
Winter is closing in. That's the time when the kaki ripen. So today I made delicious jam from kaki and apple.

I used


Carefully peel the kaki. They have a very thin but hard peel. This is going to be messy as the fruit easily turn into sludge while being peeled. You'll like it, trust me :-) Collect the peeled fruit in a large pot.

Peel also the apple and cube it. Pre-cook the apple in a sip of water in a small pot until soft.

In the large pot, mash the kaki. Then add the cooked apples. Add a small piece of real vanilla to taste. Cook a the mixture for 10 minutes while stirring constantly.

Blend the mixture into a smooth mash.

Now add the sugar and gellant. Stir gently and cook for another 5 minutes. Then fill into the prepared jars. After closing the lids turn the jars over and let them cool off.

Time to enjoy the remaining hot jam in the pot with your fingers!
I used
- 8 very ripe kaki fruits (about 2 kilograms)
- 1 large Boskoop apple
- 1 kg of sugar
- gellant (apple pectine) for 1kg of fruit (it's sufficient believe me)
Carefully peel the kaki. They have a very thin but hard peel. This is going to be messy as the fruit easily turn into sludge while being peeled. You'll like it, trust me :-) Collect the peeled fruit in a large pot.
Peel also the apple and cube it. Pre-cook the apple in a sip of water in a small pot until soft.
In the large pot, mash the kaki. Then add the cooked apples. Add a small piece of real vanilla to taste. Cook a the mixture for 10 minutes while stirring constantly.
Blend the mixture into a smooth mash.
Now add the sugar and gellant. Stir gently and cook for another 5 minutes. Then fill into the prepared jars. After closing the lids turn the jars over and let them cool off.
Time to enjoy the remaining hot jam in the pot with your fingers!
Strange J characters in email
Have you ever wondered why the character J appears seemingly randomly in email you receive? Raymond has the explanation.
On a side note this happens for me because my Linux installation does not have the Wingdings font installed.
On a side note this happens for me because my Linux installation does not have the Wingdings font installed.