Archive for the ‘Debian’ Category

h1

Changing screen resolution on VirtualBox (Linux Debian)

October 13, 2010

Hi after … more than a year!!!

These are the necessary steps that you’ve to follow if you want to change your screen’s resolution using VirtualBox (By the way, this app rocks!) on a Debian virtual machine (Also is applicable to the most of the Linux distros):

  1. Install “build-essential” package. In debian is enough typing apt-get install build-essential
  2. On the VirtualBox menu while the VM is running, press Devices and “Install Guest Additions”. This will mount a cd drive on the system
  3. cd /media/cdrom and sh autorun.sh
  4. Log as root and edit the next file: /etc/X11/xorg.conf
  5. At the end of the file there’s a section called “Screen”. Probably you’ll see “Dept 24”. Open a new line and write the next “Modes “1366×768″ …” And the custom resolution that you need to your machine
  6. Reboot the VM with a shutdown -r now

That’s all, now you’re ready to work with the desired resolution

Cheers

Advertisements
h1

How to: Recovering your Debian/FreeBSD root password

November 1, 2008

Hi there again.

Probably, you’ve lost your root password at least one time in your life (yea, you are not the only one 😉 )… There’s no problem, I’m gonna show you a easy way to fix it.

  • For Debian (Using GRUB, anyway, this will work in any boot loader)
  1. In the line where is our Debian installation, press “e”
  2. Now a kind of editor will be opened. Type the following command after the current commands: “init=/bin/bash”
  3. Press enter
  4. Now you would be back in the first step. Just press de “b” key, to boot the system with the new parameters
  5. Now the system prompt would be a root session. But if you try to use “passwd” command, the system will deny the operation. To fix this, type “mount -o remount,rw /dev/[your_drive]“. Usally your drive will be sda1, hda1 or similar.
  6. Now use the passwd root command to change.
  7. Reboot and your computer and use your new root password 😛
  • For FreeBSD
  1. In the boot menu, choose the option 4 “FreeBSD in single mode user”
  2. Now a message like “Enter fill pathname of shell or RETURN for /bin/sh” will be shown. Just press ENTER
  3. The next step is typing “mount -t ufs -a“. This will mount every file system found in /etc/fstab
  4. Now just use the passwd root command
  5. Reboot the system
h1

Solving “NO_PUBKEY” error in APT

October 4, 2007

Sometimes when i use ‘apt-get update’ i receive an error like this:

W: GPG error: http://mirrors.dk.telia.net testing Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 010908312D230C5F

To fix this,  copy the number (010908312D230C5F in the example) and type:

  • gpg –keyserver subkeys.pgp.net –recv [NUMBER]
  • gpg –export –armor [NUMBER] | apt-key add –

Then, let try “apt-get update” again.

h1

Adding a NTFS partition to fstab

October 3, 2007

Fstab it’s located in “/etc/fstab”, and it’s a plain text file which contains the information about our disks, and the how they should be mounted in the system.

If you want to add a NTFS partition you must type this:

/dev/hda[X] /mnt/[folder_name] ntfs ro,user,auto,noexec,umask=0 0 0

Where:

  • ro = Read Only
  • user = Allow to mount the partition if you’re a limited user
  • auto = This means that the partition will be mounted at the system bootup
  • noexec = You’ll not be able to execute binaries (Highly recommended to Win partitions)
  • “umask=0”  = Means everybody can do everything with the files on the disk [See more]
  • 0(first) = The partition will not be backed up
  • 0 (second) = Put 1 if you want to check that partition with fcsk at the bootup (No necessary to Win)

NOTE: Put to the directory read only permissions with chmod*
Sources: http://www.tuxfiles.org/linuxhelp/fstab.html

http://ubuntuforums.org/showthread.php?t=283131

h1

How To: Compile Kernel

July 5, 2007

Hey!. Sometimes, we need to compile our Kernel to update drivers or other somethings. Some people thinks that it is a hard task, but not!. It’s simply. In a few steps we can compile our own Kernel in any Linux distribution.

1) We must have installed the following packages:

 

  • kernel-package
  • libncurses5-dev
  • fakeroot
  • wget
  • bzip2
  • build-essential

If not, try to use apt-get [package name] after a apt-get update

 

2) Move to /usr/src/ path. To do this, use cd /usr/src

3) Get the Kernel. To this, open your browser and go to http://www.kernel.org and download the latest, or you needed.

You can use “wget” to this. For example if we want to use the 2-6-25 Kernel, we type this in the console wget http://www.eu.kernel.org/pub/linux/kernel/v2.6/linux-2.6.21.5.tar.gz

4) When the kernel have been downloaded. Unpack the ‘tar.gz’, using tar xvf [tar.gz package name]

5) Make a simbolic link to the original folder which contains the (Just unpacked) Kernel. Type ln -s [Kernel folder name] linux.

Why we do this? The folder we created with “ln -s” it’s a simply link to the original folder. This folder it’s only to facilitate the work.

6) Move to the symnolic link folder “linux”. Just type cd linux

7) Make sure you’re in /usr/src/linux folder, and now type make clean && make mrproper

8 ) Now, type make menuconfig NOTE: There’s other kinds of compile, but i ever use this. It’s the most easy and secure, i think.

A screen like that will be loaded

In this, you must select the things you need to run your system and the modules you want.

Before this, you must save a configuration file with the settings you’ve selected.

9) Then, you must type the following:

make all
make modules_install
make install

10) We’ve installed out Kernel, but now we should say the system where’s the new Kernel.

To this, type:

depmod [number of kernel] Example -> depmod 2.6.21.5

apt-get install yaird

mkinitrd.yaird -o /boot/initrd.img-[Number of kernel] [Number of kernel]

update-grub

 

After all, we’ve compiled our own Kernel :). To load it, just reboot the computer.

 Sources : HowToForge , Frikis.org

h1

Burning CD from Linux console

June 26, 2007

I founded this great link about making CD images, burning images, etc. The text use APT to install some applications, but you can install it manually.

http://ftp.cl.debian.org/man-es/…

h1

How to install XFCE4 on Debian

June 25, 2007

I installed using a 3.1 version (Sarge), but i upgraded to 4.0 Etch. Then, i needed to install a light window manager in my old computer (Athlon 1GHZ). XFCE is one of the most important and i have wanted to try it for a long time!.

Then, lets play :D. The first, you will need some packages to install it. You can obtain it using APT.

First, make sure you’ve the following:

  • GCC (GNU C/C++ compiler, 4.2.0 is the last version at this time)
  • bzip2 data compressor
  • libgtk2.0-dev (GTK+ runtime libraries)
  • libxpm-dev
  • libsm-dev
  • libice-dev
  • pkg-config (It’s a tool to manage and compile libraries)

Before you install (or not!) this packages, download the last version of the XFCE installer from a mirror (Like SourceForge.net -> XFCE on SF). You can use “wget” to download to your hard drive. At the time of this writing, the last version is 4.4.1, and the installer file have this name -> xfce4-4.4.1-installer.run.

The final step its too easy. Simply, log with “root” or use “sudo” command, and type this:

./xfce4-4.4RC2-installer.run

Before this, the package will be uncompressed (Showing dots in the screen..), and will show a screen with a welcome message, like a typical assistant.

At this point, you only must follow the instructions and XFCE will be installed on your system 🙂 .

I had some issues during the installation. One of them, shows something like this error.

(installer-gui:3721): Gtk-WARNING **: cannot open display:

To solve this, make sure your GTK+ runtime libraries, are > 2.0 version. Try this command “apt-get install-f libgtk2.0-dev”

I’d other error, which shows this message after much more “warnings” about fonts.

could not open default fontfixed

To solve this, type “apt-get install xfonts-base”.

Before this, you can start XFCE typing “startxfce4”.

Enjoy your new desktop 😛 !