Category Archives: Leftbrain

HDD problems overdose.

HDD problems love me a lot. Now I have my old HDD getting ‘hot – unplug’ events from nowhere. I’ve no idea why that should come in. This ‘unplugging’ causes a momentary freeze and the drive being reset. Googling did not help too much except that I now know people had problems with getting ‘hotplugging’ to work with the nForce sata (sata_nv driver). The resetting happens quite unpredictably. Smartctl says the disk is OK. Now how do we get a ‘hot unplug’ event without unplugging it. Tried moving the cable around (the SATA cables feel a bit loose) dont know if that is going to help. I’ve not heard the ‘reset-clicking’ in windows though which makes me feel that it might not be the hardware. But then it appeared first without any reason when running 2.6.19.2 (which does not give any detail on whats going). 2.6.22.1 tells me that its a hot unplug event that preceds the hard reset. The good part is that you get to do some learning surrounding this. For me the next good thing in sata is the AHCI (well, actually it is here, just not in my home computer though).

Let me know if you can figure out what is happening from this fragment of kern.log:

... Jul 22 15:22:01 localhost kernel ...
15:22:01 ata3: exception Emask 0x10 SAct 0x0 SErr 0x1810000 action 0x2 frozen
15:22:01 ata3: (ADMA status 0x00000502: hot unplug)
15:22:01 ata3: hard resetting port
15:22:07 ata3: port is slow to respond, please be patient (Status 0x80)
15:22:11 ata3: COMRESET failed (errno=-16)
15:22:11 ata3: hard resetting port
15:22:12 ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
15:22:12 ata3.00: configured for UDMA/133
15:22:12 ata3: EH pending after completion, repeating EH (cnt=4)
15:22:12 ata3: EH complete
15:22:12 sd 2:0:0:0: [sda] 156301488 512-byte hardware sectors (80026 MB)
15:22:12 sd 2:0:0:0: [sda] Write Protect is off
15:22:12 sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
15:22:12 sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled,
doesn't support DPO or FUA

Kerberos and fun

I run a local svn repository and it was adrenaline pumping action the time I discovered you could use the Windows Active directory as a kerbreos KDC for authentication. Some helpful links:

What these leave out (at least when it comes to educating a n00b) is that active directory is needed only for setting up the service principal not necessarily in creating the keytab. I could create the keytab with ktutil on linux with the command:

bash$ ktutil
ktutil: addent -password -p 'serv/yadayada@REALM' -k kvno -e <enctype>
ktutil: wkt xyz.keytab

The info needed here is the password to the user account to which the service principal is mapped, the kvno for the key given by KDC (which you can find using ‘kvno principal’ after getting authenticated). The enctype is the same as the one reported by ktpass while creating (or if you have specified one, then that one) it was des-cbc-md5 in my case. The kvno should match the one sent by KDC (for mod_auth_kerb in apache to work). The Active directory server I was dealing with would increment the kvno if I so much as sneeze while thinking of the user account involved. Looks like its a Win 2003 behavior.

Hard disk woes.

After a month since the first error popped up on dmesg I got a few more error messages. This time the disk was serious. Last Sunday morning when I was planning to experiment with ffmpeg and x264 this comes up. Callup shop. For them I was just another guy and emitted a standard lecture on how to return the Seagate hdd. They wont give me a spare hard disk to copy my stuff temporarily. So I go get another hard disk for backing up (I’ve really lost it, right ?) an SV35.2 (foolishly) which they were selling as 250GB Seagate SATA HDD. What I did not see was that it was cheap because it was cheap and used as on surveillance video storage racks.

When I get home my machine decided to have some fun with me. I’ve got 3 Hard disks and 2 operating systems and one BIOS. The 2 OSes and BIOS decide to give these 3 hard disks 3 different names. Grub (the boot loader) decides it should also try calling the hard disks something different from what BIOS and the OSes do. So they all have fun watching me sweat. After a couple of combinations my linux installation boots up. Now, there is no way I can safely handle plugging and unplugging of HDDs with the upcoming trip to service center and still have linux work without much effort.

Labels

I recollected my RHEL installation at work using volume ‘labels’ to mount partitions. Never thought that would help me. It did. Now I use volume labels to mount partitions. The thing is quite simple:

Use the e2label and reiserfstune programs to add volume label to your current partitions (and mkswap to set a label for swap partition). Use LABEL=<label> instead of device special file names in your fstab. A funny thing that happened was that a tool called blkid uses a cache file (/etc/blkid.tab) to remember the label to block device map. Another funny thing is that putting ‘LABEL=’ on the kernel command line does not seem to work for the (while specifying root). Apparently that was only for Redhat patched kernel to understand how to read the ‘LABEL=’ command.

Thing remaining: After a long time I tried booting my 32 bit installation. It fails to get the console among lot of other with /dev/ devices. It has something to do with udev. Let me try figure it out.

Another cool thing is that udev (I think) now has trees with symlinks that look like :

/dev/disk/by-label/<lablel>
/dev/disk/by-uuid/<uuid>
/dev/disk/by-path/<subsys-bus-unit thingy>
/dev/disk/by-id/<symbolic subsys-bus-unit thingy with product and serial number>

CS Map

aim_basement

aim_basement

Made a little CS map based on the basement of my office compound. The last time I tried making a map (one of my first tries). I could not get the lighting to work. The ‘full-bright’ map that comes out is quite sick (It makes me ‘literally’ sick, when the textures are uniform ones like concrete, asphalt). Yesterday (at last) found that I had not enabled the radiosity calculation. The lit map looks good (as you might have guessed) and I had enough encouragement to spend the remaining part of weekend on the map. It still is to be found whether the map is neutral to both CT and T teams (I’ve a feeling that It gives T team some advantage). It has a huge block as the top of the building (which might slow the map down – but I doubt). There are bad things that turned out from this – I did not do other planned stuff (some buying, some fixing, some cleaning my room), my head got trained for this wierd manner of moving in 3D space (Using shift and space bar for various functions).

Binary XML

Rather funny that binary XML is needed by people. A couple of standards I had come across (DVB-H and T-DMB service metadata) would like to have XML ‘encoded’ in some kinda binary format. The T-DMB people have a binary encoding (pdf) with single byte tags corresponding to a set of XML elements. I’ve always felt the same way as many who think Binary XML is an oxymoron. Let me see if the stuff at w3c can change my mind.