Saturday, February 27, 2010

Backup Using dd Command

,
In the linux system, there is a powerful tools named dd that can create an iso image from a CD/DVD, backup and restore your MBR or harddisk. Here's the usages :

  • Full hard disk copy
    dd if=/dev/hdX of=/path/to/image
    dd if=/dev/hdX | gzip > /path/to/image.gz

    X could be a, b, etc depends on your device node. If you have a SCSI device, the nodes are sdX. if means input file and of means output file. In the second example, gzip is used to compress the image if it is really just a backup.
  • Restore backup of hard disk copy
    dd if=/path/to/image of=/dev/hdX
    gzip -dc /path/to/image.gz | dd of=/dev/hdX

  • MBR backup
    In order to backup only the first few bytes containing the MBR and the partition table you can use dd as well.

    dd if=/dev/hdX of=/path/to/image count=1 bs=512

  • MBR restore
    dd if=/path/to/image of=/dev/hdX

    Add count=1 bs=446 to exclude the partition table from being written to disk. You can manually restore the table.

Please note that if you are using kernel 2.6.32.2 or above, there are no more hdX device node. They are replaced by sdX.
Read more →

Friday, February 26, 2010

The ldd Linux Command

,
If you want to know what are shared library used by each program/application, you can use ldd command. For example : ldd inkscape. The command will issue a message like this :
                 linux-gate.so.1 =>  (0xffffe000)     
        libgtkmm-2.4.so.1 => /usr/lib/libgtkmm-2.4.so.1 (0xb7d7c000)
        libgiomm-2.4.so.1 => /usr/lib/libgiomm-2.4.so.1 (0xb7d1a000)
        libgdkmm-2.4.so.1 => /usr/lib/libgdkmm-2.4.so.1 (0xb7cd4000)
        libatkmm-1.6.so.1 => /usr/lib/libatkmm-1.6.so.1 (0xb7c91000)
        libpangomm-1.4.so.1 => /usr/lib/libpangomm-1.4.so.1 (0xb7c65000)
        libcairomm-1.0.so.1 => /usr/lib/libcairomm-1.0.so.1 (0xb7c45000)
        libglibmm-2.4.so.1 => /usr/lib/libglibmm-2.4.so.1 (0xb7bf1000) 
        libxslt.so.1 => /usr/lib/libxslt.so.1 (0xb7bbb000)             
        libz.so.1 => /usr/lib/libz.so.1 (0xb7ba7000)                   
        libxml2.so.2 => /usr/lib/libxml2.so.2 (0xb7a71000)             
        libsigc-2.0.so.0 => /usr/lib/libsigc-2.0.so.0 (0xb7a6b000)     
        libgtkspell.so.0 => /usr/lib/libgtkspell.so.0 (0xb7a64000)     
        libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0xb76d8000)
        libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0xb764f000)
        libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0xb7635000)       
        libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0xb75d1000)       
        libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0xb75a9000)
        libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0xb7591000)
        libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0xb7587000)
        libcairo.so.2 => /usr/lib/libcairo.so.2 (0xb7519000)                 
        libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0xb74d8000)         
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7461000)           
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb7438000)       
        libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb73fe000)     
        libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0xb73fb000)     
        libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb73f7000)     
        librt.so.1 => /lib/librt.so.1 (0xb73ed000)                           
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb731a000)           
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb72d9000)                 
        libgsl.so.0 => /usr/lib/libgsl.so.0 (0xb712a000)                     
        libgslcblas.so.0 => /usr/lib/libgslcblas.so.0 (0xb70f4000)           
        libpng.so.3 => /usr/lib/libpng.so.3 (0xb70b3000)                     
        libgomp.so.1 => /usr/lib/libgomp.so.1 (0xb70ab000)                   
        libpopt.so.0 => /usr/lib/libpopt.so.0 (0xb70a4000)                   
        libaspell.so.15 => /usr/lib/libaspell.so.15 (0xb6fec000)             
        libMagick++.so.2 => /usr/lib/libMagick++.so.2 (0xb6f7a000)           
        libMagickCore.so.2 => /usr/lib/libMagickCore.so.2 (0xb6b9e000)       
        libgc.so.1 => /usr/lib/libgc.so.1 (0xb6b5d000)                       
        liblcms.so.1 => /usr/lib/liblcms.so.1 (0xb6b29000)                   
        libpoppler.so.4 => not found                                         
        libpoppler-glib.so.4 => /usr/lib/libpoppler-glib.so.4 (0xb6afc000)   
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb6a14000)               
        libm.so.6 => /lib/libm.so.6 (0xb69ee000)                             
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0xb69e0000)                 
        libpthread.so.0 => /lib/libpthread.so.0 (0xb69c8000)                 
        libc.so.6 => /lib/libc.so.6 (0xb6868000)                             
        libX11.so.6 => /usr/lib/libX11.so.6 (0xb674d000)                     
        libdl.so.2 => /lib/libdl.so.2 (0xb6749000)                           
        libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb6728000)                 
        libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0xb66d7000)           
        libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb66ce000)             
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb66b6000)                     
        libXau.so.6 => /usr/lib/libXau.so.6 (0xb66b3000)                     
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb66ae000)                 
        libenchant.so.1 => /usr/lib/libenchant.so.1 (0xb66a4000)             
        libXcomposite.so.1 => /usr/lib/libXcomposite.so.1 (0xb66a1000)       
        libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0xb669e000)             
        libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb6699000)               
        libXext.so.6 => /usr/lib/libXext.so.6 (0xb668a000)                   
        libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0xb6687000)           
        libXi.so.6 => /usr/lib/libXi.so.6 (0xb667e000)
        libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0xb6677000)
        libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0xb666e000)
        /lib/ld-linux.so.2 (0xb80ca000)
        libMagickWand.so.2 => /usr/lib/libMagickWand.so.2 (0xb6559000)
        libtiff.so.3 => /usr/lib/libtiff.so.3 (0xb6505000)
        libjasper.so.1 => /usr/lib/libjasper.so.1 (0xb64b8000)
        libdjvulibre.so.21 => /usr/lib/libdjvulibre.so.21 (0xb6319000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb62f9000)
        libXt.so.6 => /usr/lib/libXt.so.6 (0xb62a6000)
        libIlmImf.so.6 => /usr/lib/libIlmImf.so.6 (0xb61e3000)
        libImath.so.6 => /usr/lib/libImath.so.6 (0xb61de000)
        libHalf.so.6 => /usr/lib/libHalf.so.6 (0xb619b000)
        libIlmThread.so.6 => /usr/lib/libIlmThread.so.6 (0xb6194000)
        libIex.so.6 => /usr/lib/libIex.so.6 (0xb6180000)
        librsvg-2.so.2 => /usr/lib/librsvg-2.so.2 (0xb614d000)
        libgsf-1.so.114 => /usr/lib/libgsf-1.so.114 (0xb6117000)
        libbz2.so.1 => /lib/libbz2.so.1 (0xb6106000)
        libSM.so.6 => /usr/lib/libSM.so.6 (0xb60fe000)
        libuuid.so.1 => /lib/libuuid.so.1 (0xb60fa000)
        libICE.so.6 => /usr/lib/libICE.so.6 (0xb60e2000)
        libpoppler.so.5 => /usr/lib/libpoppler.so.5 (0xb5f19000)
That means the inkscape requires those libraries. With this information, at least you will more careful if you want to remove a library from your system. More about ldd information can be obtained by running this command : ldd --help or man ldd.
Read more →

Thursday, February 25, 2010

Vitamin C is Important for Vitality

,
Nowadays, almost everyone in my office got an influenza or cough. Now it seems i will get it too, since the weather is often too bad and the air conditioner in my office sometimes is too cold. I'm very much needed vitamin C for my vitality. Vitamin C contains antioxidant, pro-oxidant that supports our immune system. The daily vitamin C requirement for our body is 90 mg per day and no more than 2000 mg. 
That's my little share about vitamin C and remember it's always better to prevent a disease than treat it. Have a good day! :D
Read more →

I'm Confused About Converting Excel to DBF with Massive Records

,
This morning, i have to compare many of students marks in the campus where i work. I have to do all of that because of a data disaster.. :(( I have to query it from MS SQL Server and then export them to an excel file. After that, I must covert it again to DBF format using foxpro by importing the excel file. But it's very difficult to convert form excel to DBF format because it contains more than 100.000 records. In excel erlier than 2007, the maximum amount of the records are less than that. So, i need to use excel 2007, but foxpro only allow import from excel 95/5.0. arrghh.. What should I do?? I'm very confused about that you know....
Read more →

Have a Breakfast is Important for Our Brain

,
Breakfast is proved to be good for our brain. In the morning, our brain need some sugar that come from the food. After have a breakfast, it's good to consumes a banana too because it contains much sugar. Eating vegetables are also very good to regenerate our brain cell. I'm very glad because I'm used to eat them all. :D
Read more →

Wednesday, February 24, 2010

Updating Shared Library Path

,
After someone compile and then install a shared library for an application on linux system, the most common problem is the shared library don't load properly. For example, usually you will get an error message like this :

error while loading shared libraries: libqt-mt-so.3: cannot open shared object file: No such file or directory
It means the LD_LIBRARY_PATH is not updated yet, because you install the library manually from the tarball/source using ./configure, make and make install. You can solve this problem by running ldconfig as root. Remember to always run this command after manually installing a new shared library on your linux system.
Read more →

Tuesday, February 23, 2010

Beginning DNA Research

,
Today I get a little experience about biotechnology information. One of my friend in my office will do some research about DNA. So, she download a massive gen and protein data from the National Center for Biotechnology Information(NCBI) in order to collect DNA sequences. The amount of data is over 200 million. O.o
I know it's not an easy appointment but i hope in the future she can find something new and useful information from her research.
Read more →

I Think VLC Player 1.0.5 is Wonderful

,
Instead of great media player such as Mplayer or SMPlayer, VLC is great too! :D. I think this VLC is better than the previous version. It's also supports large number of video format and has a full support under linux systems. You can get this great player by clicking here.
And for Slackware user like me, you can easily build and install it with slackbuild script on your system, complete with all codecs and needed or optional library by visiting this repository.
Read more →

Technorati Widget Temporary Unavailable

,
This morning when i want to customize my blog by adding technorati widget, obviously the widget is temporary unavailable. So, i must wait the technorati's team to make it available again. oww...
Read more →

Monday, February 22, 2010

Vadrum meets Mario 3

,
Hello folks, i want to show you this amazing video. Probably many people already know this person, because he is so famous now. Yes, his name is Andrea Vadrucci, an amazing Italian drummer. He has produce many drum videos from video game soundtracks, a song, or even from cellphone ringtone in the medley. And this is his best drum video i think. Enjoy it! :D
Read more →

Moving to The New Boarding House...

,
Next month i will move to the new boarding house in Alpukat street, Tanjung Duren, West Jakarta. So, within this week i have to move all of my stuff first. This activity will use much of my energy, considering i have to work at my office first in the morning until evening before i do it. huff... I hope in that new place i can have a better "new life", new friend and new spirit.  :D
Read more →

I wondered what Pat's team do...

,
Since January 31, 2010 until now(February 22, 2010), Slackware -current changelog hasn't been yet updated, whereas usually there are several update almost everyday. I wonder what is Pat and his team doing at this time. mmm.. Whether that means slackware 13.1 almost ready to released? hohoho.. actually i really can't wait it... :D
Read more →

Hello World!

,
Hi all, i really miss to write something in my blog after a long long time i didn't do it at all. I hope i can continue it so i can share my knowledge to you or maybe get feedback from you, so i can learn something too. From now on, i will write my post in english because i want to learn english and google translate will become my best friend. :LOL:
Read more →