Place Ghantoos

Debian: restore grub on sd{a,b} using grub-mkdevicemap and grub-install

I had to reinstall grub on the MBR of one of machines. After resizing a GPT partition, and actually writing the changes on the disk’s partition table, my MBR was erased (the MBR is controlled by the GTP partition table), thus removing my dear grub.

Anyways, after rebooting my machine using the Debian Installation disk, I discovered that my disk were named differently: /dev/sda was renamed to /dev/sdb (classic!). Unfortunately, I struggled with grub-pc, grub-install, grub-update, update-grub to restore my grub information to the MBR, with no success.

I then found out that the file (/boot/grub/ was pointing to the wrong disk name.
So here is what I did to get over the disk renaming craziness and restore grub to the MBR.
Read the rest of this entry »

Migrating sourceforge CVS source repository to github

As many lshell users showed interest in an git repository to facilitate their contribution, I finally took the time to do the migration.

Lshell’s source code was hosted in CVS repository at As I wanted to keep all the commits history, I had to properly migrate all the information from CVS to GIT.
There are no tricky parts here. But I thought it could be useful to have an post describing a whole migration from a CVS repository to github.
Read the rest of this entry »

requestsync: package sync requests from Debian to Ubuntu

One of the Debian packages I maintain was just uploaded to Unstable (going into Squeeze). As this upload closed a Launchpad bug, and I appear as the maintainer of gip in Ubuntu too [1], I had alert the Ubuntu folks in order for them to synchronize the latest package.

The procedure is well described in the Ubuntu wiki [2]. But I thought I would paste a summary and the output of the different commands.
Read the rest of this entry »

screen(1), /etc/profile, ~/.profile, /etc/bash.bashrc and ~/.bashrc

For a while, I have been having problems with screen(1) on some of my machines. I am not the “colors in my terminal” type of guy. But unfortunately, when you get used to having “some” colors out there, it is disturbing to lose them when going inside a screen.

The problem was that screen(1) did not source neither /etc/profile nor ~/.profile when it spawned a new shell; only /etc/bash.bashrc and ~/.bashrc were sourced.
As I don’t like having my preferences included in bash specific files, they were all added in *profile (specifically in /etc/profile.d/).

In order to find the source of the problem, I just added “echo ” in the different files (the ones in the title on this post ;) ). And launched screen to see which files were actually sourced.

The solution was quite simple. Let screen(1) spawn its shells as your login shell using the $SHELL environment variable. Add the following to /etc/screenrc or ~/.screenrc:

# make the shell in every window as your login shell
shell -$SHELL

À bon entendeur, salut!

Ignace M

FreeBSD: keep root’s shell inside /bin!

I just upgraded my server from FreeBSD 7.2-RELEASE to 8.0-RELEASE.

The upgrade steps are very clearly stated in the FreeBSD 8.0-RELEASE Announcement.

Everything went as planned, until the penultimate step, where I was supposed to follow Colin Percival’s instructions and rebuild all my ports before executing the final: freebsd-update install.

Instead of rebuilding my ports, I just executed the last step (# freebsd-update install), which rendered *all* of my third party application unusable. This of course includes bash(1)! I was now unable to start a new bash session, hence unable to start new ssh connections, as my user’s default shell is /usr/bin/local/bash.

Read the rest of this entry »

Running Debian on a Samsung Galaxy under Android

I have read many tutorials that explain how to install a debian on the G1 phone (running Google’s Android too).

Here is a compilation of what I have done on my Samsung Galaxy (i7500) in order to get a root access and install a debian system on it.
1- Root access
2- Debian installation

Read the rest of this entry »

My first shot of NetBSD (5.0)

As I heard a lot about NetBSD lately, especially with NetBSD5.0 being released, I thought I would give it a try.

I admit, I had a preconceived idea of what I was going to face. I thought I would have to go a couple of time through the installer, try to understand how to use the partitioner, etc. But I was wrong. Ten minutes after booting up the iso image, my first NetBSD was up and running!

Even though all this documentation is available in the NetBSD guide, here are all the steps I went through to install my machine.

My installation was done using kvm-84 on a debian (testing) machine.

Read the rest of this entry »

Windows, botnets et vos données privées

Hello, it’s me again!

Dans un tout autre contexte, je vous propose d’élaborer un exemple d’insécurité informatique sur les machines Windows (XP ou Vista) qui sont branchées sur Internet.

Il y a quelques jours, des chercheurs de l’université de UC Santa Barbara, ont publié un rapport résumant la méthode de prise de contrôle d’un Botnet appelé TORPIG.

Read the rest of this entry »

Debian, BCM4328 and ndiswrapper

This is just a small post that may help those who are trying to install the wifi modules of a BCM4328 card on a debian OS using ndiswrapper.

The debian wiki explains very well how to install the necessary windows drivers using ndiswrapper, so I won’t go into details. Here are the main steps:

$ sudo apt-get install module-assistant wireless-tools
$ sudo m-a prepare
$ sudo m-a a-i ndiswrapper
$ sudo ndiswrapper -i /path /to/your/driver/DRIVER/bcmwl5.inf
$ sudo ndiswrapper -l
bcmwl5 : driver installed
	device (14E4:4328) present (alternate driver: ssb)

Read the rest of this entry »

Disable touchpad while typing on keyboard

I don’t know how you feel about it, but when my hand touches the touchpad “mouse pad” while I am typing on my keyboard, and changes to windows focus or the mouse positioning, it annoys me, A LOT!

So here’s what I did to get over this issue on my debian box. It shouldn’t be very different on other distributions. (I’ll update this post in case I ever try it somewhere else)

Read the rest of this entry »