Capitalism, libc6 and sysrescuecd
This is going to be a long post about different things I experienced the last week. Firstly, last week’s post about high-speed broadband (which is going to take years if not decades looking at the scenario I see), I got some abusive mail about ‘probable/possible copyright violations’ by some people. For me, it has been a somewhat difficult to keep a level head as I have two conflicting views of the same. On one hand I support the whole CC-Zero and the license derivatives of the same, I also support ‘piracy’ as many a times I see that piracy actually boosts a potential product’s place in the market, both in the short-term as well as medium to long-term. Articles like these and many more underscore the point that piracy can help generate excitement about your product. What this also makes a question is how many authors, game designers help in pirating as they know its going to help them in the long-term. At least one casual game series, ‘Virtual Villager’ owes quite a bit of a success to piracy as people tried it out, recommend their peers and a whole cycle follows without zero advertising expenses to either the developers or/and the publishers. A more interesting turn of events happened when HBO Asia showed the cult documentary ‘Capitalism: A Love Story‘ . This was the second or the third time I had seen the documentary, the first two times on a friend’s lappy. I have to say its a pretty interesting documentary and while people on both sides of the story would have extreme ideas, I think the main story was lost. I would have loved it much more if he didn’t go into just ‘The Great Train Robbery‘ or whatever notion of just he had, but followed it up with worker co-ops and various other alternative views of working and prospering on which he put hardly a minute or two of his whole 2+ hour movie/documentary. The documentary is good because it’s very relevant to also how lot of people (including me) feel the state of the government in India as well. Both the National Parties, the UDF (United Democratic Front Alliance) and the NDA (National Democratic Alliance) are pro-big business and the ‘Left’ Government (CPM/Marxist) over 34 years in West Bengal has practically got all the development stopped. While this is of course, a very simplistic narrative, the truth is neither of the options seem to have an imaginative plan of going ahead. What could have been an alternative theme of seeing worker co-op succeeding with competition could have had a different tale to tell but that was not to be. The NDA seems to be in a dis-array and the UDF (the government of the day) on the other hand seems to be more paralyzed than ever happy to have the status quo as it is . Overall bad taste in the mouth and call me a cynic but I do not think a change in government would change a thing, simply because the thinking, the ideologies as far as business and government goes is almost the same. While watching the same I was reminded of the 2003, ‘The Corporation‘ and a few other documentaries. In fact, it was fascinating to again re-watch ‘Bowling for Columbine‘ which was shown on World Movies which again tends to be introspective in nature. Apart from anything else, I wished if some of our film-makers had the courage and were able to raise money to make something similar. We have so many myths almost about everything in life but yet everybody seems to be so happy (or if not happy, happily frustrated) with the status quo with nobody wanting to change, or if change than a surfacial change would do.
Anyways, my personally trying moment came week when I was upgrading my distribution. The libc6 upgrade broke my distro. I realized something was off as all the packages had stopped working. While the instinct was to use the Squeeze DVD and install from scratch, held on to it for a day. From another lappy saw the relevant bug-report and knew what had to be done. I first tried pushing the break=init rw command in my kernel parameters
but that only got me till the initramfs prompt, unfortunately though I was not able to access either the command link or the directories of lib and lib64. The UUID is nothing but the long alphanumeric code so that partitions are known as explained in the Debian Wiki. Luckily for me, I had just downloaded a sysrescuecd about 4 odd months back and it booted without an issue (although there was a lot of latency even though I have a 2 GiB of RAM). For those who came in late, the sysrescueCD is nothing but a live CD/DVD with some rescue tools in-built. One can think of it as the Ubuntu Live CD/DVD with some rescue tools built-in. Anyways got to a root prompt. Re-booted again and pressed ‘Enter’ while booting to get the options. As I had installed the AMD64 build I knew I wanted to use the 64-bit kernel and not the default 32-bit kernel. Anyways, did that and ran the
$ cat /proc/partitions
major minor #blocks name
8 0 488386584 sda
8 1 51199123 sda1
8 5 51199123 sda5
8 6 102398278 sda6
8 7 102398278 sda7
8 8 102398278 sda8
8 9 20213760 sda9
8 10 53709824 sda10
8 11 4866048 sda11
Luckily again, I suspected that sda9 is most probably the debian root partition although it easily might not have been. I would have liked to see the listing with labels intact but I dunno if there is a nicer compact way to have the same view with just an additional column for labels. That would have just made the whole thing so much easier. Anyways so what I did was the following :-
$ mkdir /noname
Just made an empty directory under root. The name could be anything, for this instance just used /noname .
Then mounted the sda9 partition under this empty directory.
$ mount -o loop /dev/sda9 /noname
then changed to the directory and scanned the directory :-
$ cd /noname
/noname $ ls
Then simply did :-
$ ln -s lib lib64
$ umount /noname
$ shutdown -r now!
While the first one simply does a symbolic linking (akin to a shortcut in Windows speak). The second one simply committed the change to disk and made sure it’s not just in computer memory. It sorta makes sure that the change is done. The third was unmounting the partition /dev/sda9 and this was done so that the partition is clean. The last one was doing a nice shutdown so nothing else goes amiss. On the next boot, while I did get to a $ prompt neither X worked (by default) neither did networking did.
On a subsequent reboot everything went right by itself otherwise would have had to use
$ sudo /etc/init.d/networking restart
or go one step further restarting the dhclient Luckily, my guess was right. IF it had been a 2 TB or more SATA 2 HDD or even if I had more partitions and Debian was not the last distribution it would have taken me quite sometime in the current scenario to find it out. Hence it would be nice if the cat /proc/partitions can give more info. The other way would have been to see /etc/fstab but those who might have seen any /etc/fstab file they see it’s quite messy and has a lot of details which otherwise is not required at least in this use-case. I would have liked no loved if I had the labels column as well as human-readable byte figures in MB/MiB and/or GB/GiB. That’s about it for now.
Update:- Forgot to mention about parted which actually does the job a bit better than cat /etc/proc/partitions but still is not good enough.
Taken from a friend’s desktop on his running system :-
$ sudo parted -l
Warning: Unable to open /dev/hda read-write (Read-only file system). /dev/hda
has been opened read-only.
Error: /dev/hda: unrecognised disk label
Model: ATA ST3500418AS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 52.4GB 52.4GB primary ntfs
2 52.4GB 500GB 448GB extended lba
5 52.4GB 105GB 52.4GB logical ntfs
6 105GB 210GB 105GB logical ntfs
7 210GB 315GB 105GB logical ntfs
8 315GB 419GB 105GB logical ntfs
9 419GB 440GB 20.7GB logical ext4 boot
10 440GB 495GB 55.0GB logical ext4
11 495GB 500GB 4983MB logical linux-swap(v1)
Now while the above is good or better than the deary /etc/proc/partitions one still wants/needs the additional label column. If that could be added to it then nothing like it.