Archive for October, 2006

PartImage for Rearranging Hard Disk Partition Scheme

Sunday, October 22nd, 2006

Some weeks back I got into the situation where I needed to rearrange the hard disk space on my computer and was thinking “there MUST be a tool out there that can help me to achieve this.” So I jumped on the internet and start browsing around. I came across a number of tools and also found a website http://www.thefreecountry.com that can probably be interesting to anybody who is looking for a lot of software links. (mostly free) The main thing I was looking for was a tool that would enable me to not only copy the contents of my hard disk but also maintain the correct permission and ownership settings. Basically I was looking for disk cloning software.

The tool that I finally landed upon that I thought fitted with my objectives was PartImage. I visited the website (http://www.partimage.org/) and read through the documentation to see its capabilities. I found out that to make it more useful, it comes bundled into a collection of tools on a live CD called SystemRescueCD (http://www.sysresccd.org/). Ordinarily I would have used the tools within my already running linux system but I needed something that could actually shift around partitions so that I could get some disk space at the beginning of the hard disk.

I burnt the SysRescueCD and booted my computer. It booted to the command line and I started PartImage. It is at this point that I got some doubts in my head. What if it did not work. With this scare, I immediately backed up the entire contents of my /home and /srv (+ some other files that I felt I should not lose) partitions onto an external hard disk. (this took a couple of hours of moving away and doing some other things by the way)

When all was done, I started PartImage again and the process was as simple as going through two screens where I had to fill in the location that I wanted the images backed up to, the image names and to specify whether I wanted the tool to break up the image into a number of smaller files. (this feature enables backing up the image on multiple CDs for example.) It cloned the disk at a rate of 1.2xGB per minute. I was very impressed with this. I did all the four partitions that I had and then (not very relaxed though) formatted the partitions and reset my entire disk partitioning scheme. My unrest was later justified when I found out that I had wiped out my LFS project partition. This was not entirely a disaster but did leave me with a lot of work to do.

With the disk re-partitioned, I thought “here goes nothing” as I performed the restoration. The restoration complete, I had to reinstall GRUB boot loader. Once that was done the whole system worked like NOTHING had changed. It was sweet music hearing the KDE logon sound.

There were a few catches though;
- I had to change the mount points definitions in /etc/fstab file to make sure they matched with the new partitioned scheme.
- On restore, I had formatted the home partition as ext3 filesystem. It was previously reiserFS. PartImage restored the partition as reiserFS. I guess this makes sense considering some filesystems have special encryption data / schemes that would be lost if restoration was independent of filesystem.
- There was a warning in the documentation about the partitions having to be a similar (or was it same) size as the one that was imaged. Too small I can understand but if a partition is larger it should not be a problem. I did not experiment with this too closely so no concrete answers there.

That was my little experience with PartImage. It turned out to be a very useful tool for me.

Enter the OSS trail

Tuesday, October 10th, 2006

In July 2001, I was a student in between my first and second year. I spend a month of this vacation at the university working on what could have been called a one-man web design team. I was at the time developing the website for the Uganda Martyrs University Students’ Union. Being almost the only student on campus at that time, I had MANY MANY hours free outside of the working time and just as it so happens, I came across a redhat linux 6 (codenamed Hedwig) CD. Out of curiosity I started on what was then a curious game and has now turned out to be a journey. This first installaton was all command line and had a lot of configuration to do versus the installers that are present these days. Definitely comparing that installation to the SuSE linux 10.1 installation that I performed today (11th October) on a quite recent Acer Aspire laptop, things have changed a lot.

The reason for this blog therefore is because of these experiences and my desire to try and put into cyberspace some of the experiences I have had with linux and open source (software and other things.) I decided this after I had quite a nice expericence over the past weekend with a partitioning issue. (but that is for another article.)

After that installation I did not have too much to do with Linux again as there was a shortage of computers at the university and therefore nothing for experiments that could have helped with learning more. At the same time I was short on documentation that would have helped me setup a dual boot system (now a normal thing at the university) back then and avoid the computer technicians in the lab from erasing my linux partition to make sure all computers were running windows.

Two years later, enter a policy in the university about open source software that requires that it be installed on all computers. I remember the first time I actually started the move towards using OSS as a desktop on a more serious note. I had just finished courses at the university for the final year, handed in my project and gone to see my supervisor Victor. I was trying to get into the university to do some work and when I walked into his office he mentioned something about open office. I took a brief look at it on his computer. It looked pretty intuitive but it was only a month later that I actually went ahead and made an installation on my laptop. Being attached to Redhat for sentimental reasons, I installed Redhat 9 but for some reason, after sometime I was captured by the KDE desktop and never looked back.

Just two weeks ago I updated my computers installation to openSuSE 10.1 and had a hell of a time with hustling with broken dependencies etc. That is pretty annoying but now that I have it running smoothly it is such a joy to use. I had a friend from Persia visit my room and asked, “How come your computer responds so fast Mulo?” “LINUX!” was my proud answer!

Now five years since that first installation, I find myself comfortable on the command line and look back at the things I have been involved in; co-authoring a linux computer literacy book, helping to convert anybody who is interested, linux training, organising OSS promotional events in my country. They seem so few and yet it also seems like a lot has happened. Hopefully this blog can keep a better record of events and activities than my mind. Who knows what I shall have to say in retrospect 10 years from now?