Friday, May 30, 2008

Backup your installation using simple tools (dd, partimage)

recently I came to know about very simple but useful tool 'dd' which can be used to a lot of amazing stuff. Here is an anazing tutorial

there is a project called partimage, that is specifically meant for backing up and restoring your partitions.
partimage home - http://www.partimage.org/Main_Page
backup drive using ubuntu live cd - http://www.psychocats.net/ubuntu/partimage

Now, I have backed my ubuntu and windows installations...

Monday, May 26, 2008

unit test code coverage using gcov

You can get a detailed and useful report on code coverage of your unit tests using the tool gcov.
It is very simple to setup and use.

useful links:
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/gcc/gcov.html
http://gcc.gnu.org/onlinedocs/gcc-3.1.1/gcc/Gcov.html

Friday, May 23, 2008

list files in .rpm package file

You may want to list the files that will be installed by an rpm package
rpm -qlp will do it.

Monday, May 5, 2008

partition using gparted on ubuntu live cd

When you buy a laptop, you mostly get it with windows installed. (Monopoly you see...;) ) . So if you want to install Linux without loosing the existing windows, then you have to resize the existing partition. Well, you can do this using partition Magic. But when I tried, I kept getting one error consistently, it looked something like this: " error 1161 bad system file name" .

what next?

Ubuntu Live CD has a tool called gparted which can be used to do this.
If the disk does not have bad sectors, you can simply resize by dragging the slider in gparted.
I had to use ntfsresize first to resize the ntfs filesystem before using gparted to resize the partition.
So boot the live CD. run ntfsresize to resize your filesystem, use gparted to resize your partition.
you can as well create other partitions to install linux here itself.

The resizing is a bit tricky. You need to first resize filesystem using "ntfsresize" and then the partition with gparted. So search the web and find the right instructions to do this

useful link...
http://www.nishants.net/articles/ntfsresize.htm

New ubuntu installation with all softwares from a previous installation

I am using ubuntu Gutsy on my (office)desktop. Recently got a Lenovo T61 at office. Now I want all packages that I installed on my desktop ( which I installed as and when I needed ) to be installed on laptop also. So here is how I did it (by googling of course).

Get the list of all packages installed on your machine using this command:
$ dpkg --get-selections > sw.list

on new machine:
copy sw.list first. Then use following commands to install all these packages.

$ cat sw.list | sudo dpkg --set-selections
$ dselect

Links on internet:
http://ubuntuforums.org/showthread.php?t=261366
http://www.cyberciti.biz/tips/linux-get-list-installed-software-reinstallation-restore.html