Sunday, December 16, 2007

Migrating from Fedora 4 to Ubuntu 7.10

I bought a new hard disk. And I installed Ubuntu 7.10 on it (/dev/hdb). Ubuntu did not want to recognize my partition where I had previously installed Fedora (/dev/hda3). I had to install

$sudo apt-get install lvm2

And then I followed the instructions on:

Now, just add at the bottom of /boot/grub/menu.lst the following lines to

title Fedora Core 4
root (hd0,1)
chainloader +1

save the file and reboot! See this

To change the console font (when one gives Ctrl+Alt+F1) add the vga=771 to the corresponding line in /boot/grub/menu.lst. For example:

title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd1,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=44d34aca-a862-4a4c-99b8-b2ba480527cb ro quiet vga=771
initrd /boot/initrd.img-2.6.22-14-generic

The table of resolutions is: from

                640x480 800x600 1024x768 1280x1024 1600x1200
256 (8 bit) | 769 771 773 775 796
32,768 (15 bit)| 784 787 790 793 797
65,536 (16 bit)| 785 788 791 794 798
16.8M (24 bit) | 786 789 792 795 799

I "installed the super user". To do this, I just did:

$sudo passwd root

And I assigned a password to root

I removed the NDIVIA logo at startup: Edit /etc/X11/xorg.conf and change the corresponding lines to:

 Section "Device"
Driver "nvidia"
Option "NoLogo" "true"

The KDM has a keyboard configuration in English. But my keyboard has a german distribution. This makes it problematic to ingress passwords. To change the keyboard edit /etc/X11/xorg.conf and change the correponding line

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "de"

DO NOT run
$ sudo dpkg-reconfigure -phigh xserver-xorg
as it is recommended in the comments of that file!

To install the mouse in the console mode (Ctrl+Alt+F1) do
$ sudo apt-get install gpm
and then reboot the computer.

Friday, May 4, 2007


$ lspci with this command I can check for example which graphics card do I have

Adding Source list
you need to edit /etc/apt/sources.list file
sudo vi /etc/apt/sources.list
Add the following line for the latest beryl (Both i386&64 bit)
deb feisty main
Save file and exit
Copy the key file using the following command
wget -O- sudo apt-key add -
Now you need to update the source list using the following command
sudo apt-get update

Tuesday, April 10, 2007

How to associate the Start key in KDE

Execute in console

$ xev

And obtain the corresponding info. Example:

eyPress event, serial 30, synthetic NO, window 0x3e00001,
root 0x60, subw 0x0, time 5783328, (-83,158), root:(594,323),
state 0x10, keycode 115 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyRelease event, serial 30, synthetic NO, window 0x3e00001,
root 0x60, subw 0x0, time 5783427, (-83,158), root:(594,323),
state 0x50, keycode 115 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:

Execute in console (or put in .bashrc)

$ xmodmap -e "keycode 115 = F13" #esto es para que StartKey sea F13
$ xmodmap -e "keycode 91 = 46" #esto es para que la coma del teclado numerico, sea un punto

This is for making StartKey behave like F13

Now, in Control Center -> Regional & Accesibility -> Keyboard Shortcuts -> Global Shortcuts ->
Popup Launch Menu -> change Alt+F1 to F13, simply pressing the StartKey


Tricks for Maria
$ xmodmap -e "keycode 96 = minus" #F12 se vuelve minus
$ xmodmap -e "keycode 96 = underscore" #F12 se vuelve underscore
$ xmodmap -e "keycode 61 = space" #minus se vuelve space

Sunday, March 25, 2007

Samba tips


to see who is connected in the samba network to my computer... and to see which file that person is actually checking.

Thursday, March 15, 2007

Going from Fedora to Ubuntu

Instead of executing su, we have to execute sudo; this command will ask you a password. Just introduce the user password. If you want to be root you have to make
$ sudo su

Basically instead of yum we have another command, namely apt-get. Its use is as follows (more details executing $ man apt-get):
sudo apt-get install nameprogram
sudo apt-get remove nameprogram
sudo apt-get search nameprogram
sudo apt-get update nameprogram

$ sudo apt-get install thunderbird

$ sudo apt-get install ubuntu-desktop #do this if you are using kubuntu, to install gnome

$ sudo apt-get dist-upgrade #this command updates all the packages of the system

apt-get requires a list of the sources. You can edit it:
$ kdesu kedit /etc/apt/sources.list

Some other packages that are worth to install are:
adept, kpackage #those are similar to yumex
to execute:
$ kdesu adept

kdm libdvdread3 #I don't remember what is "kdm"


Some pages that contain useful information:

Finally, a good forum is

Thursday, February 1, 2007

Samba shares

Run as root:
mount -t smbfs -o fmask=444,dmask=555,iocharset=utf8,guest  //server/share /path/to/mount-point
This create a read-only share, for all users, including root.

mount -t smbfs -o fmask=444,dmask=555,iocharset=utf8,guest  //ariadne/videos /tmp/rapoldinet

fmask=444 gives owner, group and other read permissions
dmask=555 gives owner, group and other read and execute permissions for directories
guest mounts the share without any authentication.
iocharset=utf8 this is because Windows uses Unicode for their filesystem since Windows 2000. This way you are able to use special characters abroad ASCII in your filenames without running into problems.

Saturday, January 27, 2007

Accessing my Linux partition from Windows

There are some utilities like:
* ext2fsd
* explore2fs that allow you to make the job.

Recovering lost files

Just for the future:

There is a utility called libtrash. This is a wrapper library (LD_PRELOAD hack) around the system calls which Linux uses when deleting files, and which moves them to a configurable location instead.

However, if the damage is done:

It might be easy but it might be as well impossible to recover the lost files. One should for heaven's sake not unmount and re-mount the partition (that is, not reboot!).

If there is still any process running which holds the specific file open, then you're lucky and just copy the file descriptor from the /proc directory.
Here's a guide for that:

There are utilities for ext2 based file systems. One is called recover, and one e2undel. But you need to remember some informations about the files. And it won't work with ext3...

Also, depending on file type you might want to try "forensic utilities". These scan the whole partition for "magic bytes"/headers of known filetypes and *try* to restore them.
* Magic Rescue
* foremost
* The Coroner's toolkit
* PhotoRec (this claims even to recover from USBs, and memory cards).
* probably others...