How to configure brother WiFi scanner

Configure your WiFi Scanner for Brother DCP 7055W


Continue reading


How to create a basic Spring MVC web

How to createa Spring MVC web application using maven. We will start from scratch creating the project with maven, then we will add some depencencies and create the java code. Finally we will build the .war file.

Continue reading

How to compile the linux kernel

Download a kernel source from and let’s suppose that it is extracted in the directory ~/linux-x.yy.zz

Sometimes it can be a good idea to start with a current kernel configuration. You can get this configuration from the text file /boot/config-xx.yy.zz or a compressed version from /proc/config.gz. Copy the text file into ~/linux-x.yy.zz/.config.

Now you can start configuring the new kernel by executing inside the dir ~/linux-x.yy.zz/:

make menuconfig

ThenĀ compile the kernel, the modules and the image:

make bzImage

If everything it’s ok the new kernel will be in ~/linux-x.yy.zz/arch/x86/boot/bzImage. Copy this file to the boot directory in the desired machine:

cp ~/linux-x.yy.zz/arch/x86/boot/bzImage /boot/vmlinuz-x.yy.z

Now you have to compile and install the modules:

make modulesĀ 
make modules_install

This will copy all the firmware and modules to /lib/firmware and /lib/modules/x.yy.z. If you want to change the directory you can do it by defining the INSTALL_MOD_PATH environment variable.

After install all the modules you have to go to /boot directory, create the initramfs and update the grub.

update-initramfs -c -k x.yy.zz

How to create virtualbox by commandline

First create the virtual machine called myVirtualHost and register it:

VBoxManage createvm --name myVirtualHost --register

Then create a hard disk of 10Gbytes:

VBoxManage createhd --filename myhdd1.vdi -size 10240

This will create the file ~/.VirtualBox/HardDisks/myhdd1.vdi

Add an ide controller and the hard disk:

VBoxManage storagectl myVirtualHost --name "IDE Controller" --add ide
VBoxManage modifyvm myVirtualHost --hda .VirtualBox/HardDisks/myhdd1.vdi

You can add more disks with these commands:

VBoxManage modifyvm myVirtualHost --hdb .VirtualBox/HardDisks/myhdd2.vdi
VBoxManage storageattach myVirtualHost --storagectl "IDE Controller" --device 1 --port 0 --type hdd --medium .VirtualBox/HardDisks/myhdd3.vdi 

Now I will give this machine 512Mbytes of RAM:

VBoxManage modifyvm myVirtualHost --memory 512 --acpi on

You have different network options. If you want to give your virtual machine its own IP addpress you have to use the bridged mode:

VBoxManage modifyvm myVirtualHost --nic1 bridged

If you want to use the same IP address than your host machine you can use NAT. In this case you can configure NAT port forwarding to access to some services, for example with these lines you can access the SSH service of our virtual machine by connecting to the port 2222 from your host.

VBoxManage modifyvm myVirtualHost --nic1 nat
VBoxManage modifyvm myVirtualHost --natpf1 "guestssh,tcp,,2222,,22"

To launch the virtual machine and leave it in background you can use one of the following lines:

nohup VBoxHeadless -s myVirtualHost --vnc --vncpass mys3cr3t &
nohup VBoxHeadless -s myVirtualHost --vrde off &

The first one will enable VNC and also terminal server.
The second one will disable both, VNC and terminal server.