Tales from the Gryphon

Miscellaneous blog postings

Manoj's hackergotchi
RSS Atom Add a new post titled:
Monday 18 December
2006
I am now an Ikiwiki user!

Posted in the wee hours of Sunday night, December 18th, 2006

License: GPL

permanent link
Ikiwiki</p>

Well, this is first post. I have managed to migrate my blog over to Ikiwiki, including all the historical posts. The reasons for migration was that development on my older blogging mechanism, Blosxom, entered a hiatus, though recently it has been revived on sourceforge. I like the fact that IkiWiki is based on a revision control system, and that I know the author pretty darned well :-).

One of my primary requirements for the migration was that I be able to replicate all the functionality of my existing Blog, and this included the look and feel (which I do happen to like, despite wincing I see from some visitors to my pages) of my blog. This meant replicating the page template and CSS from my blog.

I immediately ran into problems: for example, my CSS markup for my blogs was based on being able to markup components of the date of the entry (day, day of week, month, etc) and achieve fancy effects; and there was no easy way to use preexisting functionality of IkiWiki to present the information to the page template. Thus was born the varioki plugin; which attempts to provide a means to add variables for use in ikiwiki templates, based on variables set by the user in the ikiwiki configuration file. This is fairly powerful, allowing for uses like:

    varioki => {
      'motto'    => '"Manoj\'s musings"',
      'toplvl'   => 'sub {return $page eq "index"}',
      'date'     => 'sub { return POSIX::strftime("%d", gmtime((stat(srcfile($pagesources{$page})))[9])); }'
      'arrayvar' => '[0, 1, 2, 3]',
      'hashvar'  => '{1, 1, 2, 2}'
    },

The next major stumbling block was archive browsing for older postings; Blosxom has a nice calendar plugin that uses a calendar interface to let the user navigate to older blog postings. Since I really liked the way this looks, I set about scratching this itch as well; and now ikiwiki has attained parity vis. a vis. calendar plugins with Blosxom.

The calendar plugin, and the archive index pages, led me start thinking about the physical layout of the blog entries on the file system. Since the tagging mechanism used in ikiwiki does not depend on the location in the file system (an improvement over my Blosxom system), I could layout the blog postings in a more logical fashion. I ended up taking Roland Mas’ advice and arranging for the blog postings to be created in files like:

 blog/year/month/date/simple_title.mdwn

The archives contain annual and monthly indices, and the calendar front end provides links to recent postings and to recent monthly indices. So, a few additions to the arch hook scripts, and perhaps an script to automatically create the directory structure for new posts, and to automatically create annual and monthly indices as needed, and I’ll have a low threshold of effort blogging work flow for blog entries, and I might manage to blog more often than the two blog postings I have had all through the year so far.

Manoj

Saturday 21 May
2005
Colour theory and colour schemes

Posted mid-morning Saturday, May 21st, 2005

License: GPL

permanent link

No longer having an excuse for not creating my web site (researched a ISP, check; set up machine, check; ran through other items on the to do list; check), I natually had had to create new ones. Thus I embarked on a long process of educating myself about colour theory. It was an interesting journey. I had never understood the horse shoe shaped chart the used for colour calibrations; I have a lot to learn. And all the theory in the world does not make it easier for me to select a color scheme that does not suck.

The pages I ran into fell into four categories; those that talked about Color Theory and Physics, a very scant few that dealt with design, lots of practical web page construction sites that went into detail about color schemes and tutorials, and a bunch of math stuff. Hopefully these shall be useful to someone.

The grand culmination of all this research was a perl script that takes a color in hex notation, and generates a color report — for example. here is a report for #DEE3FF, which is the basis for one of the themes for this page. Of course, the generated page, though very nice in telling me how I can create a color scheme based on my initial choice of a basis color, did not actually help – since the colors initially selected clashed wildly with the graphic at the top. I had to scrap the initial choices and start over, though having the program made the process less painful than it would have been.

I need to polish up the perl script, and flesh out the descriptions of the links it creates, and perhaps add more command line options, or stuff. bling-bling is always important, especially for code.

Manoj

Thursday 10 March
2005
Guessnet: welcome back

Posted Thursday night, March 10th, 2005

License: GPL

permanent link

A while ago, my guessnet setup started messing up, just before a business trip, and I did not have the time to debug the error. After a quick consult on IRC, I installed and configured laptop-net, which worked.

While I had a working package that would let me carry my laptop from home to LUG to office, and various trips with Hotel networks once in a while, I always had to tell the system which scheme to use, since several of the networks used similar IP addresses and topologies (welcome to the world of NAT). I have never been comfortable with the fact that laptop-net did not consider MAC addresses while making its determinations.

laptop-net, on the other hand, is like a combination of ifplugd, intuitively, and switchconf, except better since it is all integrated and works seamlessly. guessnet does seem to work better for me, though, if for nothing else since it can actually determine where the laptop finds itself. I have successfully integrated guessnet in with ifplugd, and made sure that things play nice even with hotplug in the picture. So I am a happy Guessnet camper once again.

Manoj

Wednesday 10 November
2004
Kernelsk modulesk and security

Posted late Wednesday afternoon, November 10th, 2004

License: GPL

permanent link

Now that the tmpfs patch has come out in an official 2.6.9-selinux1.patch.gz, and blaisorblade issued a new SKAS patch, I decided to recompile kernels for my active everyday non server machines, and also update my SELINUX UML page. Of course, not everything goes off without a hitch, and this time it was the fact that I use proprietary binary only drivers (boo! hiss!) that brought me down. Of course, the newer version of the drivers is the one supposed to work with software suspend. I really need to re-examine whether running glxgears really fast at LUGs is worth this aggravation — and the further tainting of my almost-vrms-clean box.

Oh, and at this point, I don’t see any reason not to have SELinux compiled in for all my kernels — while there is a performance hit and a scalability hit when SELInux is enabled, as far as compile-time enabling of SELinux is concerned is what performance hit is imposed by LSM itself. Setting the defaults for the boot-time parameter to 0 allows one to enable SELinux without rebuilding the kernel, while only imposing the overhead of LSM itself otherwise..

(The baseline performance hit seems to be around 7% (although it needs to be evaluated again after the code is tuned), although on some networking benchmarks it is as high as 20% for gigabit networking (no significant performance hit is seen at 100Mbps). Work is being done on both the baseline and networking performance for intensive workloads)

Oh, and what was the problem with the nvidia drivers? Well, I had everything working fine under 1.0.6111 (nvidia-glx and nvidia-kernel-source), but then 1.0.6629 came out, so I tried that. The new nvidia driver now pays a lot of attention to EDID values it now reads, and it turns out my laptop gave out hsync and vsync frequencies far lower than what I was using — and nvidia decided to use the intersection of the ranges; thus deciding the best my laptop’s display could take was 1280x1024. Of course, the native resolution is 1600x1200 (which is what I had been using), so now it tiled a 1280x1024 display across the physical 1600x1200 LCD.

Telling the nvidia driver to ignore EDID in XF86Config-4 did not help, as the driver proceeded to tile the display twice vertically (1600x600 times 2).

In the end, I had to downgrade back to the 1.0.6111 versions (have to downgrade both the kernel module and glx package, since mismatched versions just failed to load the nvidia.ko). I guess no software suspend for the laptop, unless I drop down to the console, and kill xdm. Kinda defeats the purpose, though.

Manoj

Tuesday 27 July
2004
User Mode Linux: not ready for prime timeU

Posted Tuesday afternoon, July 27th, 2004

License: GPL

permanent link

I have been using uml (actually, pbuilder-uml) for a while to build my packages and ensure that the build dependencies were sane. Unfortunately, in sometime in the last month or so, something broke: now uml just hangs with the lines

Initializing stdio console driver
Netdevice 0

Since I have wanted to get back to playing with SELinux, and since Russel Coker has deprecated 2.4 based LSM patches ( kernel-patch-2.4-lsm), I decided to try to compile my own 2.6 based UML, especially since I heard tell on IRC that it was feasible to do so. Thats when the fun started.

Well, it started ok. Google quickly found the user mode linux home page, from where I down loaded the UML patches. People on IRC pointed me to updated host and skas patches for the 2.6.7 kernels. The patches applied, though with some fuzz.

There was some initial confusion (you really need to specify ARCH=um all over, even when configuring cleaning — took me a few minutes of confusion to figure that out). Then the kernel refused to compile. I tried all kinds of different host patches, but to no avail. Finally, I had to go on #uml for help, and I was told to turn off CONFIGHIGHMEM. That got the kernel compiled.

But then I kept getting the hangs while trying to get an initial network connection. Turns out that I had taken the dictates of the HOWTO too literally, which tell you to take the defaults. That is fine for 2.4 uml’s — for 2.6 uml’s, the defaults do not compile in anything. I compiled in all kinds of network methods.

Compile, run, and get a hang trying to get an initial console. Hmm. Go back and compile in input methods. Does not hang now — it just warns it can’t open an initial console (though it pops up xterms all over. This time it is the lack of a devfs that rootstrap needs. Compile in devfs.

And now things segfault in the UML since the libc is trying to get native posix threads library, not yet supported in UML. I tried all kinds of methods trying to set LDASSUMEKERNEL=2.4.17, but to no avail (Look at this thread on the uml devel list.)

I give up. Getting a 2.6.7 UML running is too hard, and I am certainly not a kernel compilation newbie. I gave a go to the 2.4.26 kernel based UML with the latest patches and all (still on a 2.6.7 host with SKAS3), and the uml does not even start. And the 2.4.26 UML would not have SELINUX in it, so my motivation is at an ebb. (or nadir, really).

Manoj

Monday 31 May
2004
Welcome to Manoj's blog

Posted Monday evening, May 31st, 2004

License: GPL

permanent link

This has been a long time coming; I’ve wanted to set up something like this ever since I saw Alan Cox’s diary. Now that Judy has expressed an interest in keeping a family blog, there was no excuse for further procrastination (not that that often stops one). Of course, exactly because there was no excuse for procrastination, I proceeded to procrastinate; I had to find a mechanism of determining pleasing color schemes which was better than trial and a lot of errors.

Manoj