prmpec blogja

How to backup your root filesystem gracefully

 ( prmpec | 2009. február 19., csütörtök - 9:35 )

If I say backup I usualy mean dumping a whole filesystem, a content of a partition.
If other filesystems are already mounted to this filesystem, the "tar" will pack them as well. There are some magic switches for tar to stay on one filesystem, but then folders hidden by the mount will skipped.

My solution follows.
Mount the filesystem with option "bind", and dump the binded folder.

# mkdir /mnt/rootfs
# mount / /mnt/rootfs -o bind
# cd /mnt/rootfs
# tar cjf /mnt/backup/rootfs.tar.bz2 .
# umount /mnt/rootfs

Where /mnt/backup is an other partition.

Patching courier-authlib to enable password check in mysql database (md5, sha, crypt) with gentoo portage overlay

 ( prmpec | 2006. november 4., szombat - 0:46 )


My first problem was that I had a mysql database with my users that have md5 crypted passwords, and I wanted an imap server who will authenticate with this credential.

I've choosen courier-imap. (Maybe that was my only problem)

However courier-authlib provide mysql and also MYSQL_SELECT_CLAUSE whitch can be customized for your need, it does not allow the mysql to compare the passwords, and the algorithms provided by the authlib does not match with the ones in mysql. (The {MD5} prefix for the authlib will produce the base64 encode of the md5, the database provide the md5 represented on hexadecimals. You may write a function, that convert the hex digits to binary, and than an other that will base64 encode the value, but would be more difficult than fixing the courier.)

Booting a gentoo install-minimal iso from USB stick

 ( prmpec | 2006. október 6., péntek - 23:35 )

I've spending so mutch time to install a gentoo for the first time. The hardest thing was to make gentoo boot from USB stick, so I write you down what I did.

I needed to boot from USB because my new Core2 Duo mainboard (Asus) has quite fresh chipset which is not supported well even in the latest kernels. Nowadays we have the 2.6.18 kernel and in the days this blog was written only a few distributions boots with this kernel version.

I also write you a kernel compatibility matrix, which kernel version supports which part of my hardware: