Category: Blog

Site moved to Linode

I finally got tired of how slow NearlyFreeSpeech.net is (it’s still a fantastically affordable service – you get what you pay for and more), and moved to a Linode. Setup and migration was dead simple, and I’m really happy with the instance I’m on (and extremely happy about their awesome service). Do feel free to drop me a note if anything on the site doesn’t work for you.

p.s.: This also adds to my count of Gentoo boxen. :)

Pure EFI Linux Boot on Macbooks

My company was really kind to get me a Macbook Pro (the 13.3-inch “5.5” variant). It is an awesome piece of hardware! (especially after my own PoS HP laptop I’ve been cussing at for a while now)

That said, I still don’t like the idea of running a proprietary operating system on it (as beautiful as OS X is ;)), so I continue to happily use Gentoo. The standard amd64 install works just fine with some minor hiccups (keyboard doesn’t work on the LiveCD, kernel only shows a console with vesafb).

The one thing that did bother me is BIOS-emulation. For those coming from the PC world, Macs don’t have a BIOS. They run something called EFI which is significantly more advanced (though I think the jury’s out on quirkiness issues and Linus certainly doesn’t approve of the added complexity).

Anyway, in order to support booting other OSes (=> Windows) exactly as they would on PCs, Apple has added a BIOS emulation layer. This is how Ubuntu (at least as of 9.10) boots on Macbooks. Given that both the bootloader (be it Grub2 or elilo) and the Linux kernel support booting in an EFI environment, it rubbed me the wrong way to take the easy way out and just boot them in BIOS mode. There is a reasonable technical argument for this – I see no good reason to add one more layer of software (read bugs) when there is no need at all. After a lot of pain, I did manage do make Linux boot in EFI-only mode. There is not enough (accurate, easily-findable) documentation out there, so this is hard-won knowledge. :) I’m putting this up to help others avoid this pain.

Here’s what I did (I might be missing some stuff since this was done almost a month ago). The basic boot steps look something like this:

  1. EFI firmware starts on boot
  2. Starts rEFIt, a program that extends the default bootloader to provide a nice bootloader menu, shell, etc.
  3. Scans FAT/HFS partitions (no ext* support, despite some claims on the Internet) for bootable partitions (i.e. having a /efi/… directory with valid boot images)
  4. Runs the Grub2 EFI image from a FAT partition
  5. Loads the Linux kernel (and initrd/initramfs if any) from /boot
  6. Kernel boots normally with whatever your root partition is

Now you could use elilo instead of Grub2, but I found this it to not work well (or at all) for me, so I just used a Grub2 (1.97.1, with some minor modifications) (just adds an “efi” USE-flag to build with --with-platform=efi). While I could make /boot a FAT partition, this would break the installkernel script (it’s run by make install in your kernel source directory), which makes symlinks for your latest/previous kernel image.

Instructions for installing the Grub2 EFI image are here. Just ignore the “bless” instructions (that’s for OS X), and put the EFI image and other stuff in something like /efi/grub (the /efi is mandatory). You can create a basic config file using grub-mkconfig and then tweak it to taste. The Correct Way™ to do this, though, is to edit the files in /etc/grub.d/.

Of course, you need to enable EFI support in the kernel, but that’s it. With this, you’re all set for the (slightly obsessive-compulsive) satisfaction of not having to enable yet another layer to support yet another proprietary interface, neither of which you have visibility or control over.

FOSSKriti ’10 \o/

Three days left to the event I helped start 3 years ago. That’s right, folks, FOSSKriti ’10 is here!

We started this event in 2008 because there was a huge gap between the open source world and academia in India. The aim was to expose enthusiastic students to what the F/OSS world has to offer, how they can participate in the community, contribute, and get that warm, happy feeling in the gut. :) And I’ve met enough people who make me believe that we have been successful in this endeavour.

One complaint we always get is that we are not newbie-friendly. From the beginning, we took an active call to channel our limited resources towards encouraging people to just start hacking and contributing (that’s the important part, remember?), which necessarily meant that if this was your first exposure to the F/OSS world, things could be a bit overwhelming.

This time, the organising team is trying something different. FOSSKriti ’10 will have loosely have 2 tracks. One track is like previous editions of the event – it’s meant for people who are comfortable with coding, possibly already F/OSS hackers. The agenda, I am given to understand, is “Come – Sit – Fork – Code – Share LuLZ.” :) And being privy to what some of the FOSSKriti veterans are planning, I am extremely excited about what this track will bring.

The second track is meant for students who are enthusiastic about F/OSS but need a little more guidance with getting started. There will be talks and workshops to help them get bootstrapped, and hopefully provide them with sufficient resources to take the ball and run. The schedule for this track is already up.

This is not complete, so keep an eye out for updates. Unfortunately, again, I will not be able to make it to the event. :( If you’re a student in India, interested in F/OSS, possibly not too far from Kanpur, this is an event you cannot miss!

(Gst)Discovering Vala

My exploits at Collabora Multimedia currently involve a brief detour into hacking on Rygel, specifically improving the DLNA profile name guessing. We wanted to use Edward‘s work on GstDiscoverer work, and Rygel is written in Vala, so the first thing to do was write Vala bindings for GstDiscoverer. This turned out to be somewhat easier and more difficult than initially thought. :)

There’s a nice tutorial for generating Vala bindings that serves as a good starting point. The process basically involves running a tool called vapigen, which examines your headers and libraries, and generates a GIR file from them (it’s an XML file describing your GObject-based API). It then converts this GIR file into a “VAPI” file which describes the API in a format that Vala can understand. Sounds simple, doesn’t it?

Now if only it were that simple :). The introspected file is not perfect, which means you need to manually annotate some bits to make sure the generated VAPI accurately represents the C API. These annotations are specified in a metadata file. You need to include things like “the string returned by this function must be freed by the caller” (that’s a transfer_ownership), or, object type Foo is derived from object type FooDaddy (specified using the base_class directive). Not all these directives are documented, so you might need to grok around the sources (specifically, vapigen/valagidlparser.vala) and ask on IRC (#vala on irc.gnome.org).

All said and done, the process really is quite straightforward. The work is in [my gst-convenience repository][arun-gst-conv-ks.git] right now (should be merged with the main repository soon). I really must thank all the folks on #vala who helped me with all the questions and some of the bugs that I discovered. Saved me a lot of frustration!

I’ve already got Rygel using these bindings, though that’s not been integrated yet. More updates in days to come.

*Gasp*

It’s been long since I wrote about anything non-specific. I guess it’s a common symptom amongst bloggers from my generation (age jokes will draw ire). For me, it just stopped being so important to say anything, what with every major insight seeming pretty ciichéd and/or obvious by the time I got down to writing it. Can’t you just see the brain cells sizzle away?

As I was wont to do in days gone, let me start with books. I spent a long time re-reading books, sometimes more than once. Seemed to take a lot less effort than reading new books. Ditto movies, when I had enough time to watch them. Of course, bite-sized chunks of TV series were easier to grok as well. With a conscious effort now, I’ve started reading more new stuff, the latest of these being Neil Gaiman’s American Gods. Gripping book, that. Incidentally, if you’ve not read Richard Morgan’s Altered Carbon, you’re missing out on what I am certain is one of the best SF works in recent times. Have been promised access to the remainder of his novels featuring Takeshi Kovacs, so looking forward to that.

On the music front, I sold off my guitar a year and a half ago (the neck warped too often) and now intend to buy a new guitar. Saw a fairly decent and not-too-pricey Granada at Furtado’s, and it’s now somewhere near the top of my acquisition list. As before, my tastes are (a) relatively esoteric, and (b) temporally out of phase. My latest obsession are the Yeah Yeah Yeahs, about whom Rolling Stone has a brilliantly written article that borders on idolation.

Moved to a new house, and unpacking and settling in slowly proceed. All the running around before this and now mean that I still have to establish a proper working environment and discipline. I’ve been trying (with only moderate success) to maintain a reasonably “normal” diurnal cycle. Should be more successful as things settle further.

I’ve got a couple of work related blog posts lined up in my head, but that’ll have to wait for later. I hope this particular post heralds some exercising of atrophied writing muscles.

Good night, world.

GNOME Day @ FOSS.IN/2009

Yes, yes, I know this post is a tad late, but hey, it’s still the right year. ;)

As Srini had announced, Dec 5th was GNOME Day at FOSS.IN this year. We kicked the day off with Shreyas giving a developer’s introduction to GNOME 3.0. This was followed by another well-received talk by Srini on the Mobiln2 UI and Clutter.

By the end of lunch, it turned out our already packed schedule had got some new additions from the other enthusiastic GNOME folks around! The afternoon session was kicked off by Arun ‘vimzard’ Chaganty introducing what newbies need to know to dive into GNOME development. Tobias Mueller followed with a talk about GNOME Bugsquadding. Sayamindu and Dimitris then took the stage for a short L10n talk. Next up was a talk about Anjal by Puthali. Olivier then gave a hackers’ introduction to Empathy/Telepathy, Srinidhi and Bharath did a quick introduction to using the OpenSUSE Build Service.

Wait, I’m not done yet. :) The final session on GNOME Performance was a 4-hit combo with me giving a quick introduction to Sysprof, Lennart introducing mutrace, Krishnan giving a pretty wow introduction to using DTrace to profile GNOME, and Dhaval giving a short introduction to how cgroups could help make GNOME more responsive.

Phew! That was a long and awesome day, with some icing on the cake in the form of stickers and T-shirts. The last were possible thanks to the GNOME Foundation, so a huge thanks to them!

Sponsored by GNOME!

Sponsored by GNOME!

The times they are a-changin’

Yesterday was my last day at NVidia. I’ve worked with the Embedded Software team there for the last 15 months, specifically on the system software for a Linux based stack that you will see some time next year. I’ve had a great time there, learning new things, and doing everything from tweaking bit-banging I²C implementations with a CRO to tracking down alleged compiler bugs (I’m looking at you -fstrict-aliasing) by wading through ARM assembly.

As some of you might already know, my next step, which has had me bouncing off the walls for the last month, is to join the great folks at Collabora Multimedia working on the PulseAudio sound server. I’ll be working from home here, in Bangalore (in your face, 1.5-hour commute!). It is incredibly exciting for me to be working with a talented bunch of folks and actively contributing to open source software as part of my work!

More updates as they happen. :)

It’s pronounced Gwahdec

I’ve been terrible about it, but here’s the big update — I just got back today after spending the last week at the Gran Canaria Desktop Summit, location of the first co-located GUADEC and aKademy. It’s been amazing, and I don’t know where to start. Let’s try the beginning.

The GNOME Foundation has funded a very significant part of my expense for this trip (making it possible at all), so a huge thanks to Travel Committee for giving me this opportunity. :) To summarise …

Sponsored by GNOME!

Sponsored by GNOME!

Shreyas and I reached Gran Canaria early in the morning of Day 1, but were too tired to make it to the first 2 keynotes. We woke up, had breakfast by the beach (the apartment we were in was <100 steps from the beach, and the auditorium was a 20 minute walk down the same beach — photos soon).

We did make it to Richard Stallman’s talk. It was quite generic, not surprisingly about software freedom, and nothing new to most of us. Of note were the great vitriol towards C# and the heathens who use it to create new software and a rather terrible and inappropriate attempt at humour that has been blogged about to death.

I met a huge number of people subsequently, some who’ve been at FOSS.IN before, and many whom I only knew by their online presence. The second half of the day was devoted to a number of Lightning Talks. I was pleasantly surprised to see the amount of work happening on semantic-aware projects. Good stuff.

Way to sleepy to continue making sense. More details on subsequent days, photos and so forth to come soon.

Edit: In the name of avoiding further procrastination, here are the photos.

Of communities and respect

I feel old a lot, these days. It’s been about 17 years since I first sat in front of a computer (and, soon after, realised I’d be sitting in front of them for a very long time to come). It’s been about 11 years since I intrepidly stuck in a Red Hat Linux (before it was called PCQLinux ;-)) CD into my CD-ROM drive and started a voyage that continues to this day. And it’s been about 10 years since I saw the first flame-wars amidst the Indian F/OSS community. Not much has changed in all this time. I am still incredibly passionate about computing, I still love Linux and the F/OSS world for the freedom, and some Indian F/OSS communities still have a tendency to shoot themselves in the foot as soon as it starts to show some promise.

I don’t know what it is about us — perhaps we are inherently political animals, and have some basic need to take an opposing stand. Or maybe there are just enough of us that this automatically happens. Or maybe it’s not even inherently an Indian problem. It’s bound to happen in any group, and is not, in itself, a problem. What is a problem is respect. In any reasonably large group, there are bound to be people who don’t like each other. Sometimes they might even be able bring themselves to have a shred of respect for each other (an extreme that is unfortunately seen all-too-often). What is unforgivable, though, is failure to respect the community.

When you start arguing with someone, on IRC, a mailing-list, or even in person, always remember that by making the flames personal, you are disrespecting the community. By dragging everyone around you into the mud, you are sowing the seed of trouble and strife. You end up forcing people to take a side or walk away, effectively killing the community.

My post here comes from painfully watching this happen too many times. Even more so from watching it happen now. So here’s my request, nay plea — if you’re in the midst of such a tiff, take a moment to see what it’s doing to the community you’re in (I’m assuming we’re well past the “assume good will” stage here — you did start with “assume good will”, didn’t you?). If nothing else, find a way to keep what’s personal separate.

Addendum: If you’re one of the folks who shake their head and walk away when this happens, here’s my plea to you — don’t walk away. Point out to the people responsible that their personal quarrels are not germane to the community, and ask them to take it off the community’s channels of communication. If enough people did this, maybe some sense would prevail.

Note: I’m leaving comments open for constructive discussion.

Note2: In case I come off sounding like I am innocent of all this, these are lessons that I have learned the hard way.

The LiveJournal to WordPress migration

Thought I’d outline a bit of what I did to get all my posts and tags migrated from LiveJournal to WordPress 2.7.1. Note that this information will be redundant soon enough — there’s much better LJ import support in the latest WordPress trunk. It’ll even pull in your ‘Current Music’ and ‘Current Mood’ fields, which I couldn’t do. :-(

Some background first. LiveJournal lets you export your blog posts one month at a time. You can feed these files to the WordPress LiveJournal importer. I’ve been blogging there since December 2003, so that was definitely not an option. Some digging around eventually brought me to ljdump. This is a really nifty tool, even if you just want to back up all your posts. It dumps your data into a large set of XML files, which you can collate with the convertdump.py script for uploading to the WordPress LiveJournal importer.

There was one hiccup here — a lot of the XML files corresponding to my earlier posts (at least) had an extraneous ASCII character 4 at the end of some lines. I had to use a simple for i in /*xml; do sed -i -e s:$'\004':: before using convertdump.py, and things were back on track (sed ftw!). I used the script to make one big XML file with all my posts, and fed it to the LJ importer, and all my posts were in.

But my tags, unfortunately, were not. ljdump happily pulls the tags from LiveJournal, but the importer just ignores them. I found a sort-of patch to fix this, but it seems to be quite antiquated. Based on this and the WordPress importer (that’s the importer that allows WordPress to import from another WordPress blog’s exported output), I wrote my own patch to import LJ tags (against WordPress 2.7.1). Just cd into your blog directory and do a patch -p0 < wp-livejournal-import-tags.patch to use it.

That’s it — I dropped all the old posts (requires a plugin to do it all at one shot), and then imported the big XML file again, and voila!

Trivial as it was, it was great to see how easy hacking the WordPress code was. There’s more to come in days ahead. I hope it remains this easy. :D

Update: Just noticed that the imported comments are not threaded. This kind of blows, because there have been some really long threads on some posts. I guess I’ll wait till the new WordPress goes stable and do a re-import. (file under #suckage)