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>

Leave a Reply

Your email address will not be published. Required fields are marked *