Archive for February, 2012

Usb pen drive: formatted and mounted on Ubuntu 11.10

To practise for the LPIC 101 I’ve decided to make a new ext4 file system on a pen drive.

Login as root.

To list all partition on all devices use the following command:

$ fdisk -l

$umount /dev/sdb1

Then format the usb device with the ext4 filesystem.

$ mkfs.ext4 -L usb_laura /dev/sdb1


Creative commons and piracy (self interview)

Loneload is my musical project I’m just making music for passion, as a true escape from the grey working life.
Making my own midi traces, I can quickly make good quality music.
I am a creative person and I find the no-derivates CC license excellent for the kids.
Being creative makes me see clearer about life. Making music I’m just trying to fix the bugs of my existance. I am a very creative person and I’ve found a way to make it.
The world is up to people that want to talk.

So Loneload music will always be free. What I gain from this is a much better menthal health and more friends. Moreover I am improving a lot as a musician and am learning a lot about the Entertainment industry, economics and mankind.
People can find my music on social networks,, by the japanese netlabel bumpfoot, wikicommons.
Ideally the product is for anybody. Licensed for use only. Sale is forbidden.
Even though, my music is free, This is no charity, I’m just growing. As I get reviewed, I can understand more about the deal.

There is a wide access to creative commons music on the web.,, several netlabels, creative commons radios…
Not to be promoted! Just spread and enjoyed! Bands get a change to be known. It’s a good opportunity for new (unsigned) artists,

Piracy kills great commercial music, but Creative Commons download and file sharing are free and legal.
Available music on the web can be:

– commercial
– creative
– promotional free streaming

I think most pirates are students or unemployed people.
But potentially anybody might be a pirate.
I think that i-tunes or amazon stores are awful. An mp3 costs up to 99 cents.
I understand that is great for the very honest pop fans. the ones that only buy the hit single.

Last August, I threw away all the burned records that I had. Some were taken by friends, but most of the were download illegaly.
I’ve grown up by records and the computer has ruined my passion for music somehow.
I can live without what I don’t really need.
I ended up with 300 real records (an average of 15 records in a year).
It’s like doing some shit in the toilet, after eleven years passed with the constant opportunity of making pirate downloading and cd burning.
Most records weren’t among my favorites. I even think I will never buy the records that I really used to like, because I’ve learned them by heart and now you can find free streaming of almost anything on youtube.
I know that it’s awful but it’s not my fault that nobody helped me to fight against this web addiction. Italy is a dreary land, ruled by negligent politicians, my family hasn’t taught me what I still need to exist are most friends of mine are losers, that don’t realize
that it takes a genuine working life to affort leisure and entertainment.

Most reviews were pretty encouraging, appreciating the artist’s determination, the
decision to deliver free downloads and being creative, without following any trend, while
few of them trashed it about vocals and midi programming.
The release passed 1000 downloads in six months alltogether. At the moment I’m
working on a much better second release.

Backing up the Master Boot Record in Ubuntu 11.10

The Master Boot Record (MBR) is a space of 512 bytes that holds the partition table as well as the stage 1 of the boot loader.

Making a backup of the MBR might be useful in case of damage, as the operative system wouldn’t boot.

Therefore, you can make a copy in your home directory typing:

sudo dd if=/dev/sda of=~/mbr.txt count=1 bs=512

If you type:

sudo cat /dev/sda

you can see that /dev/sda is a binary file. However you can see that the backup is a file called “mbr.txt“.

If you need to restore the MBR you can use the following command:

sudo dd if=~/mbr.txt of=/dev/sda count=1 bs=512


“Hello world” kernel module

Make a directory called “helloM” in your home dir and edit the following .C file, called “hello.c”:

/*hello.c – The simplest kernel module.*/

#include <linux/module.h>  /* Needed by all modules */
#include <linux/kernel.h>  /* Needed for KERN_ALERT */

int init_module(void)
printk("<1>Hello world 1.\n");
// A non 0 return means init_module failed; module can't be loaded.
return 0;

void cleanup_module(void)
printk(KERN_ALERT "Goodbye world 1.\n");

To compile this kernel module you need to edit the following “Makefile” (called “Makefile” !):


# We were called by kbuild

obj-m += hello.o

else  # We were called from command line

KDIR := /lib/modules/$(shell uname -r)/build

#KDIR := /home/cynove/src/kernel/linux-source-2.6.31

PWD  := $(shell pwd)


@echo '    Building target module 2.6 kernel.'


$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules


./ *.ko

endif  # End kbuild check

######################### Version independent targets ##########################


rm -f -r *.o *.ko .*cmd .tmp* core *.i

Then, within our working folder, type make, which will process the Makefile and create a module file, hello.ko.

To install the module,type:

sudo insmod hello.ko

To verify the module has output to the log file in Ubuntu 11.10 type:

 tail /var/log/kern.log

You should read the message of the init_module() method, that is “Hello world 1.”

To remove the module, type:

sudo rmmod hello.ko

In the tail of the kern.log you should find “Goodbye world 1.”.

Funny! By these first steps you can make interesting kernel modules!