Devil505
Diego
eugeni
fabiolone
Giacomo
Ingo
Jonathan
kiddo
Linux-Planet
Linuxindetails
Scurz
shredder12
theclimber
yohoAfter a fresh installation of Debian Lenny, I wanted to use a quite very recent version of VirtualBox.
One solution is the Debian backports : Here are the VirtualBox packages available
To make VirtualBox work well, you need to install the following packages : virtualbox-ose, virtualbox-ose-qt and virtualbox-ose-source
Here are the version(s) available for each package mentioned above :
virtualbox-ose : 3.0.12-dfsg-1~bpo50+1 (for i386)
virtualbox-ose-qt : 3.0.12-dfsg-1~bpo50+1 (for i386)
virtualbox-ose-source : 3.1.4-dfsg-1~bpo50+1 (for all platforms)
As you may have noticed, virtualbox-ose-source version is higher than the ones above. As a test, I installed all of them. I compiled the modules needed with module-assistant. I failed to launch a virtual machine.
Here is the message I got :
VBoxHeadless: Error -1912 in supR3HardenedMainInitRuntime!
VBoxHeadless: RTR3Init failed with rc=-1912
Running as a normal user the command vboxheadless, I encountered the same message :
fool@localhost:~$ vboxheadless
VBoxHeadless: Error -1912 in supR3HardenedMainInitRuntime!
VBoxHeadless: RTR3Init failed with rc=-1912
VBoxHeadless: Tip! It may help to reinstall VirtualBox.
The only workaround I found for this problem is to install the Sun’s package available here .
To install it :
root@localhost:~# dpkg -i virtualbox-3.1_3.1.4-57640_Debian_lenny_i386.deb
Make sure that the good modules are loaded correctly :
root@localhost:~# lsmod |grep vbox
vboxnetadp 6436 0
vboxnetflt 12332 0
vboxdrv 155144 2 vboxnetadp,vboxnetflt
As a last test, run the following command :
root@localhost:~# /usr/bin/VBoxHeadless
You should have the message below :
Sun VirtualBox Headless Interface 3.1.4
(C) 2008-2010 Sun Microsystems, Inc.
All rights reserved.
Usage:
-s, -startvm, –startvm <name|uuid> Start given VM (required argument)
-v, -vrdp, –vrdp on|off|config Enable (default) or disable the VRDP
server or don’t change the setting
-p, -vrdpport, –vrdpport <ports> Comma-separated list of ports the VRDP
server can bind to. Use a dash between
two port numbers to specify a range
-a, -vrdpaddress, –vrdpaddress <ip> Interface IP the VRDP will bind to
-c, -capture, –capture Record the VM screen output to a file
-w, –width Frame width when recording
-h, –height Frame height when recording
-r, –bitrate Recording bit rate when recording
-f, –filename File name when recording. The codec
used will be chosen based on the
file extension

After installing all the related Sun Java packages with this command :
root@localhost:~# apt-get install sun-java6-bin sun-java6-doc sun-java6-fonts sun-java6-jdk sun-java6-jre sun-java6-plugin sun-java6-source
I got this message :
This package is an installer package, it does not actually contain the
JDK documentation. You will need to go download one of the
archives:
jdk-6u12-docs.zip jdk-6u12-docs-ja.zip
(choose the non-update version if this is the first installation).
Please visit
http://java.sun.com/javase/downloads/
now and download. The file should be owned by root.root and be copied
to /tmp.
After looking at Sun’s website, I did not find the version requested. A bug has already been registered for a similar problem :
Bug#509636
The workaround is easy to apply. Visit Sun’s Java website : http://java.sun.com/javase/downloads/index.jsp
Go down this page and look for “Java SE 6 Documentation“. Click on “Download“. Then just follow the links and you will be able to download this file :
jdk-6u18-docs.zip
Execute the following commands to make the official Java documentation well installed on your Lenny :
root@localhost:~#chown root:root jdk-6u18-docs.zip
root@localhost:~#mv jdk-6u18-docs.zip jdk-6u12-docs.zip
root@localhost:~# apt-get update && apt-get upgrade
You will be told that the package sun-java6-doc has not been installed properly. Say yes to reinstall it. Normally, everything should go well now and you will get the message below :
/tmp/jdk-6u12-docs.zip has been unpacked and installed.
You can now delete it, if you wish.


Here are some bash tips that might be useful to you for a better and more efficient use of the bash shell.
The variable CDPATH
This variable expands the scope of the cd command.
By default, cd looks for a possible subdirectory in the current working directory.
Let us take an example :
fool@localhost:~$ cd cron
If CDPATH is not set, cd will look for a subdirectory named cron. If it does not exist, cd will look through the directories added to CDPATH. As we want to display the content of the directory /var/spool/cron, here is what we have to do :
fool@localhost:~$ export CDPATH=/var/spool/cron
Then, cd cron will work well and the current working directory will be /var/spool/cron
The bash builtin fc
fc displays a list of all the latest commands typed. It is like the command history.
To list the 16 lastest commands typed :
fool@localhost:~$ fc -l
To list a range of commands typed :
fool@localhost:~$ fc -l 495 501
The numbers 495 and 501 refers to the lines numbers displayed by the command history.
To reexecute the command number 495
fool@localhost:~$ fc -s 495


While trying to do some SSH tunneling, here is the error I got :
channel 3: open failed: administratively prohibited: open failed
To avoid this kind of error, have a look at the SSH daemon configuration file :
/etc/ssh/ssh_config
Add possibly the following line :
root@remote-server:~# echo “PermitTunnel yes” >> /etc/ssh/ssh_config
Then, restart your sshd server :
root@remote-server:~# service ssh restart
or
root@remote-server:~# /etc/init.d/ssh restart


Under Debian, it is not always easy to find the game that matchs what you are looking for.
Goplay is the solution. It provides a GUI which displays a brief introduction and a screenshot for every game available in the Debian repositories.
To install it :
root@localhost:~# apt-get install goplay
To use it :
fool@localhost:~$ goplay &
Here is a screenshot we have for the package 3dchess :



I have recently installed the lastest kernel version from the testing Debian repositories : 2.6.32-1-686
Once downloaded, I must recompile some modules, particularly Virtualbox modules.
root@localhost:~# dpkg-reconfigure virtualbox-ose-dkms
Removing all DKMS Modules
Done.
Loading new virtualbox-ose-3.1.2 DKMS files…
Building for 2.6.32-1-686 and 2.6.32-trunk-686
Building initial module for 2.6.32-1-686
Error! Bad return status for module build on kernel: 2.6.32-1-686 (i686)
Consult the make.log in the build directory
/var/lib/dkms/virtualbox-ose/3.1.2/build/ for more information.
The error message is within the log file /var/lib/dkms/virtualbox-ose/3.1.2/build/make.log
root@localhost:~# cat /var/lib/dkms/virtualbox-ose/3.1.2/build/make.log
DKMS make.log for virtualbox-ose-3.1.2 for kernel 2.6.32-1-686 (i686)
LD /var/lib/dkms/virtualbox-ose/3.1.2/build/vboxdrv/built-in.o
CC [M] /var/lib/dkms/virtualbox-ose/3.1.2/build/vboxdrv/linux/SUPDrv-linux.o
Can’t open perl script “/usr/src/linux-headers-2.6.32-1-common/scripts/recordmcount.pl”:
make[4]: *** [/var/lib/dkms/virtualbox-ose/3.1.2/build/vboxdrv/linux/SUPDrv-linux.o] Erreur 2
make[3]: *** [/var/lib/dkms/virtualbox-ose/3.1.2/build/vboxdrv] Erreur 2
make[2]: *** [_module_/var/lib/dkms/virtualbox-ose/3.1.2/build] Erreur 2
Here is a workaround to get the missing file :
root@localhost:~# apt-get source linux-kbuild-2.6.32
then
root@localhost:~# cd /root/linux-kbuild-2.6-2.6.32/kbuild/scripts && cp recordmcount.pl /usr/src/linux-headers-2.6.32-1-common/scripts/
I reconfigure the package virtualbox-ose-dkms :
root@localhost:~# dpkg-reconfigure virtualbox-ose-dkms
Removing all DKMS Modules
Done.
Loading new virtualbox-ose-3.1.2 DKMS files…
Building for 2.6.32-1-686 and 2.6.32-trunk-686
Building initial module for 2.6.32-1-686
Done.
vboxdrv.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/2.6.32-1-686/updates/dkms/
vboxnetadp.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/2.6.32-1-686/updates/dkms/
vboxnetflt.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/2.6.32-1-686/updates/dkms/
depmod…………….
DKMS: install Completed.
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.
Stopping VirtualBox kernel modules.
Starting VirtualBox kernel modules.
fool@localhost:~$lsmod |grep vbox
vboxnetflt 10854 0
vboxnetadp 5366 0
vboxdrv 117917 2 vboxnetflt,vboxnetadp
This compilation problem has already been encountered :
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=562512


A symbolic link (or symlink or soft link) is a special type of file which contains a reference to another file or directory. If a symlink is deleted, the target file or directory is still there. A symlink can still exists even if its target is deleted. Then, the soft link is orphaned/broken.
To create a symlink :
fool@localhost:~$ ln -s path_to_the_target_file link_name
A hard link refers to the specific location of physical data.
To create a hard link :
fool@localhost:~$ ln target link_name
The hard link points to the same data than the file considered as the target. If you remove a hard link, you remove the data as well.
In the Debian coreutils package, there are other commands for managing soft links and hard links.
Instead of using ln without options, link can do the job :
fool@localhost:~$ link file_name link_name
To see which target file a symlink points to, you can use readlink :
root@localhost:~# cd /etc/rc2.d && readlink S30gdm
../init.d/gdm
The coreutils package is installed by default at the time you have installed Debian.


Oracle Entreprise Manager is a monitoring tool which provides all the information you need about the existing instances, their datafiles, the sessions and much more.
To check whether it is running or not :
oracle@localhost:~$ ps -ef |grep dbconsole |grep -v grep
oracle 31842 1 0 10:31 ? 00:00:00 /opt/oracle/oracle/product/10.2.0/db_1/perl/bin/perl /opt/oracle/oracle/product/10.2.0/db_1/bin/emwd.pl dbconsole /opt/oracle/oracle/product/10.2.0/db_1/$HOSTNAME_$ORACLE_SID/sysman/log/emdb.nohup
To stop it :
oracle@localhost~$ emctl stop dbconsole
To start it :
oracle@localhost:~$ emctl start dbconsole
To check its status :
oracle@localhost:~$ emctl status dbconsole
emctl status dbconsole
TZ set to Europe/London
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
http://$HOSTNAME:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.
——————————————————————
Logs are generated in directory /opt/oracle/oracle/product/10.2.0/db_1/$HOSTNAME_$ORACLE_SID/sysman/log
$ORACLE_SID : contains the value of the Oracle SID.
$HOSTNAME : contains the hostname of the server on which Oracle Entreprise Manager is running.
To use emctl directly, make sure that your $PATH contains the path to Oracle binaries. You can find most of them in $ORACLE_HOME/bin


disown is a Bash builtin which allows you to run a job in the background and log off from your console. The job keeps running while the parent console is closed.
Syntax : disown job_id
To get the job_id, run the command jobs. You will see all the ids corresponding to the processes launched within your console.
nohup is an external command which does the same job.
Syntax : nohup your_command_line &
By default, nohup redirects stdout and stderr to a file named nohup.out.
Both can be used by non-root users.

