Sunday, January 15, 2006

partition LABEL problem and making cp recurse infinitely

Today was an eventful day, in the sense that many problems got solved. The one I spent my whole morning on was a typical silly mistake of mine. Nothing interesting, just mis-reading my own past email.

When I was trying to get a domU up, I was getting a file system corruption error something, the one where the kernel give you Ctrl+D option and asks root password, so that you can fix the file system. I don't have the error message right now, but at the boot time it was doing "fsck.ext3 -a LABEL/1" and it was not finding any disk having this label. Some googling made me check my /etc/fstab. It showed a garbled line for swap drive. The line looked like:
"LABEL=bClsid<8d>Ôèÿÿÿvk swap swap defaults 0 0" (in vi)
"LABEL=bClsid�vk swap swap defaults 0 0" (in cat)

Such garbled text was enough to blame that line for my file system problem. So I thought on the lines of fixing its label. I found tune2fs -L , and set the label on my booting partition to this. But that didn't help. I also thought that this Label thing gets set if you make it a root device (as per my understanding. But now I understand having a partition as root means to have only its mount point as a root). Eventually one google result made me understand the problem. The first line of fstab was:
LABEL=/1 / ext3 defaults 1 1
So it was trying to fsck the root file system, but by assuming that it has LABEL=/1. So I just changed the line from LABEL=/1 to /dev/ and it all worked fine.

The other funny experience was with cp. Yesterday I was copying a whole partition of one build host to my desktop linux machine for running it as a domU. Today when checked I saw it had filled the whole of my 75G drive. To my amazement I saw that it was a /usr/bin/mh directory which had 'mh' directories recursively. After playing around for sometime, I found that mh was a link to '.' (to that directory itself). So I have witnessed that cp is dumb about such softlinks (at least only with the options I had tried -r and -p). It kept on copying the same directory instead of the symbolic link.

Saturday, January 14, 2006

Re-setup of xen

After I screwed my laptop last week while installing Ubuntu Lite, I lost all my previous installation of Xen. So while rebuilding my laptop, I installed RH FC4, and now on weekend when I tried launching xen domUs, it started giving me mount errors.
"mount: error 6 mounting ext3"

I made one mistake. When you want to reproduce any working system, you should set all the parameters same as they were in your past working system and should not try anything new. I started to boot from LVM volumes this time, which I had never tried before. So it made me believe that the error was because of trying booting from LVMs.

But when I tried from another physical partition, which used to work before, I found it also giving same error.

I tried fsck'ing, reinstalling all file systems, and then deleted all the extra partitions and created and reinstalled RHFC4 again on them. Even this didn't solve the problem. At last as it turned out, the 'root' parameter in the xm config file had to be set to the drive from which I was eventually loading OS. I was using it as /dev/hda1 while my domU OS was being loaded from /dev/hda3. So changing this actually solved the problem, and I could boot my domU.

To my surprise, I had noticed this 'root' anomaly before, but changing it did not help that time. Now I don't recall, but it might had to do with LVM being installed on an extended partition at that time. I don't have any clue on this.

Anyway, now the field is clear for new experiments.

Why this blog?

I already have one blog titled 'My Frequency' then why put this blog?

My original intention for blogging was to document all kinds of new technical things I learn. Because hacking takes hell lot of effort in learning new things. But now that I have published that blog's link to all my friends, I don't like to bore them by posting debug information which most of them are uninterested in. Hence I am starting this blog which will hopefully serve my original purpose of blogging. The tile itself is enough warning of things to come.

Besides I don't want to keep my debug posts locally on my machine. This realization came to me when last week a Ubuntu Lite installer CD wiped my entire laptop clean with almost no warning. So I am keeping all my documets on internet from now on. That's the most reliable backup media I guess.

So keep 'tail' -ing this blog!!!

I hope to update this one more frequently.

Cheers!!!!