it's all about the penguin
11:09 22/04/2008

clifoo 2 - mass but selective svn add

Recursively add all current files and folders not maintained in svn, to the repository:

snoopy$ svn status | grep '^?' | awk '{print $2}' | xargs svn add

15:34 07/12/2007

Au revoir Archlinux!

A la suite de quelques étranges erreurs sur mon PC (snoopy), je n'ai pas eu d'autre choix que de réinstaller un nouveau système.

C'est donc après seulement quelques hésitations que j'ai installe Debian Sid sur mon PC.

Ça faisait plus de trois ans que snoopy etait sous Archlinux, ce qui est un exploit. Archlinux était la première distribution linux que j'ai vraiment gardée. Avant ça, je ne faisait vraiment que les tester pendant quelques semaines.

Cette fois-ci j'ai choisi Debian Sid pour sa modernité, sa légèreté, son gestionnaire de paquets et son Contrat Social, assurant la libre redistribution des logiciels fournis.

Je ne me souviens plus de la date a laquelle j'ai installé archlinux sur snoopy, mais ce qui est sur c'est que le vendredi 1er décembre est le jour a laquelle j'ai installée SID. On va voir si ça tient la distance.

15:18 14/11/2007

Bridging network interfaces the Red-Hat way

I have been using Linux network bridges for a while at work for various reasons, ranging from installing a new invisible firewall to measuring bandwidth in a client server setup. Until now, I always used a script called by rc.local to create the bridge and add interfaces to it, but today I found the proper Red-Hat way of using bridged interfaces:

If you have read until here, you are probably already aware that, in Red Hat or CentOS, interfaces are configured in /etc/sysconfig/network-scripts/ifcfg-[interface-name]

So the first step is to create a interface file for the future bridge: ifcfg-br0

DEVICE=br0
TYPE=Bridge
BOOTPROTO=static
BROADCAST=192.168.1.255
IPADDR=192.168.1.10
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=no
ONBOOT=yes

That file /etc/sysconfig/network-scripts/ifcfg-br0 will create the bridge itself but no interface will be member of that bridge.To add, say, 2 interfaces eth0 and eth1 to the bridge br0, edit or create /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BRIDGE=br0
ONBOOT=yes

and /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BRIDGE=br0
ONBOOT=yes

a reboot or "service network restart" will then create and activate your new Linux network bridge.

You can now easily filter traffic thanks to the physdev module of iptables or install an invisible proxy server.

14:06 31/10/2007

The Inquirer on Ubuntu

in
Ubuntu apparently made a small mistake on laptop ACPI settings for hard-disks which might severely shorten the lifetime of the hard-drive, and here is what a truly brilliant journalist over at the inquirer decided to write:
...

According to one bod on Slashdot it can be done by doing the following:

Make a file named "99-hdd-spin-fix.sh".
In the file write the following lines:
#!/bin/sh and hdparm -B 255 /dev/sda. Save the file to three locations, /etc/acpi/suspend.d/, /etc/acpi/resume.d/ and /etc/acpi/start.d/.

Then you should be ok, he thinks. µ
Great journalism, That guy really deserves the pullitzer price for this article. All he is trying to do is to highlight the potential complexity of an operating system while criticising the community-type support of free and open source software.

He could have mentionned that ths will probably be amended in an update, but he didn't.


That was my rant for the day .... so far.
15:11 04/10/2006

FVWM-Crystal and Archlinux

FVWM-Crystal on Archlinux

FVWM-Crystal with a custom recipe (thanks Miguel) and a clean blue wallpaper.Xorg Composite extensions are activated and we can see mrxvt, gaim, gkrellm and gdeskcal.
09:47 23/08/2006

encryption encryption encryption.

Encryption is one of those things that people consider as overkill until they have a problem that could have been prevented easily.

Let's take a practical example. A few months ago, Marie's mother had a hardware problem on her computer. I was there so I had a quick look and reckoned the motherboard was playing funny games. The computer had been bought from a computer shop and was stil.l under its first year warranty. We took the PV to the shop, explained the problem to the gadgie there and left after being told to come back in a few days. We went back (our) home and marie logged on to MSN .... her mother's account was on-line. In other words, the gadgie had connected the PC to the internet, the password was blank, and auto-connect settings on Messenger logged her account on when HE logged on. Of course there are several problems here. blank password and auto-login are the obvious ones, along with the gadgie's idea of connecting the PC to their internal LAN. But because we gave physical access to the hardware, a login password would not have been a bigger hurdle to bypass for Joe Gadgie. What are the solutions, we had to give him the PC for maintenance, we couldn't take out the hard-drive out really bacause he was not sure where the problem was, even though I told him. And still we don't trust this guy with our data.
What I want is the ability to provide physical access to somebody for maintenance . The solution is to encrypt the sensitive disks. I will also not have to worry when one my disks gets a bit shaky, and be able to just throw it away or give it back to the shop for replacement without worrying about the data on it..
Several tools will encrypt disk or portion of disks under Linux, but the upcoming standard seems to be Linux Unified Key Setup. It is the product of a sole man who also ported the dm-crypt API to the Linux 2.6 kernel.
The archlinux wiki has a page for setting dm-crypt with luks and I found it very useful in order to get familiar with the technology. Its main limit is really that it didn't yet explain how to use keyfiles with LUKS. LUKS official wiki was very clear and the main job was really to organise the data in order to empty the first disk. I went a bit crazy on the key size at the beginning with 2MB key. I was surprised when I couldn't luksFormat a 200 GB hard drive with this key while I could with a 2KB key.

I am now all set with a total of 460GB encrypted with luks on my workstation. I have to admit that I since then notice a slight decrease in performance. It still doesn't compare with what I was expecting and is definitely worth a try.
21:02 30/06/2006

Bulk #7

- teaser for Spiderman 3. In theaters 3rd of May 2007 !!! So much to wait
- The new top500 supercomputer list has been released. It seems pretty obvious that Linux is a good solution for supercoputing .... as it runs 393 of the 500 !. the list has been released at the occasion of the super computing conference in Dresden, Germany. I bet those supergeeks also dig a bit of footie, ;-D;
- Schneier shares its wifi. I also open my wifi to my neighbours, but it's a shame my access point can't cope with the whole cul-de-sac. I might top it up some time and tell the neighbours.
- The LugRadio dudes are et Gnome User And Developer Conference in Spain. They have released a podcast and seem to realy enjoy themselves. According to 'No, GUADEC 2007 is in England !
- A couple comics .... put together by lawyers to explain copyrights.
- Sometimes, you find some stuff on the Internet that makes you think ...
- New OpenOffice to download.
- Now those might be the worst footie goodie I have seen since the world cup started.
- Brian Johnson. It might be a very common name, and might not ring a bell in any way. but Brian Jonson has cojones
- A couple of modification on the site... expanded width, added a column, clean the css .... again !
17:34 25/06/2006

dead hard-drive (again)

It's happened again: Last week-end, one of my two 200-Gigabyte began to show some bad blocks and I thus started myself to get worried.

I needed some space to try to get any data back from the three reiser4 partitions that are on the dying Seagate Barracuda 200GB, so I got a brand new drive.
The three partitions wouldn't even mount, complaining about unreadable journal blocks .... I started to look around for solutions, as I can't just forget about the 75GB of music. The solution was almost obvious : dd_rescue
The last time a hard drive a hard drive gave up on me, I tried a couple of dd commands, before giving up on him. Indeed, dd stops at the first error encountered. It was obviously no good for recovery purposes.
This time, I just didn't want to give up. I googled around for a solution and found dd_rescue, which just skips the failed segments of data. With my second hard drive in hand mounted as /mnt/backup, i used the following command:

$ dd_rescue -b 4k -l hdb1.log /dev/hdb1 /mnt/backup/hdb1.img

This took three days, discarded 41752KB of corrupted data and generated a 100GB hdb1.img file. Originally, /dev/hdb1 was a reiserfs partition. I then needed to rebuild the reiser4 tree with :

$ fsck.reiser4 --rebuild-tree /mnt/backup/hdb1.img

A few minutes minutes later, the image was considered as a healthy reiserfs partition that I could mount on a loop devive:

$ mount -o loop -t reiser4 /mnt/backup/hdb1.img /mnt/test

All the corrupted data, 110 files, was copied to lost+found, with numeric folder names, and the right filenames .I got more than 99% of my data back. Enough to put a happy smile on my face.

thanks to titov
Syndicate content