Tuesday, January 15, 2008

Linux Tip - Get back GRUB after clone

After cloning a Linux HDD, i've booted from the new hdd and got myself a "pretty" grub error, the screen just went:
GRUB GRUB GRUB GRUB

and it filed my screen with that.

How to recover the mbr? here is the solution that i have found on the net (google it...)

1. Boot with any live CD (I've done it with Knoppix 3.x and Ubuntu)
2. Get a root shell and make a folder (mkdir ubuntu)
3. mount the root (/) partition of ubuntu (e.g. mount /dev/hdb ubuntu if you have two disks)
4. chroot the mounted partition (chroot ubuntu)
5. grub-install /dev/hda [1]
5. Exit the shell
6. Reboot

That did the trick :)

Thursday, January 3, 2008

Linux Tip - no Beeps on console

To remove the beeps on the console, we can do this:

# setterm -blen 0

Then we can put this line on /etc/rc.d/init.d/rc.local

every time your Linux box boot it will read the above line and
this will end the beeps on linux console.

Linux Tip - Keymap

To change console keymap in debian:

# dpkg-reconfigure console-tools

if that doesn't work, perhaps:

# apt-get install console-data console-tools debconf

and
# apt-get update