April 2013 Archives

Wed Apr 17 18:04:05 EST 2013

Use an OpenPandora as a Boot Device

I recently bought myself an OpenPandora. It's a surprisingly well-made device, given that it's a massive volunteer effort, and unlike pretty much every other arm-based handheld or tablet on the market, it's not locked down for no good reason. Having a full GNU/Linux system lets it do some really interesting things - it can expose one of its two SD cards as a USB mass storage device. The obvious thing to do is to put SYSLINUX on it and use it to boot other systems. Here's how I prepared an old 4GB SDHC card. Pretty much all the commands require root, so go and run `sudo -i' now.

The card was automounting at /media/sd, so the first thing to do is unmount (but not eject) it so we can mess with partition tables and such:

# umount /media/sd

It's currently partitioned with a single partition that fills the entire card. Great. Let's make it bootable. Those following along should double-check they're targeting the right /dev nodes:

# fdisk /dev/mmcblk0
Command (m for help): a
Partition number (1-4): 1

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.

Well, force the re-read then:

# partprobe

Now I want to relabel it "bootcard" instead of "sd". You may need to install dosfstools:

# dosfslabel /dev/mmcblk0p1 bootcard

Then I remounted the card, grabbed version 4.06 of SYSLINUX (the latest version, 5.01, doesn't have working keyboard input on my machine) and installed it to the block device, along with its MBR code. Note that these commands are being run from different directories of the syslinux distribution. Note that if you don't make the "boot" directory first, you get a stupidly cryptic "/dev/mmcblk0p1: No such file or directory" error:

# mkdir /media/bootcard/boot
syslinux-4.06/linux# ./syslinux -i -d /boot /dev/mmcblk0p1
syslinux-4.06/mbr# dd conv=notrunc bs=440 count=1 if=mbr.bin of=/dev/mmcblk0
# echo "say Hello from SYSLINUX">/media/bootcard/boot/syslinux.cfg

And that was that. With the Pandora connected to my laptop in SD-Mass-Storage mode, SYSLINUX loads. Choosing boot images and setting up fancy menus are left as an exercise for the reader.

EDIT: I have prepared a background image that looks nice with the SYSLINUX vesamenu, based off the logo on the OpenPandora Wiki:

OpenPandora SYSLINUX wallpaper

This extract from my syslinux.cfg sets up the wallpaper and a pleasing colour scheme to match:

UI vesamenu.c32
MENU TITLE Pandora BootCard
MENU COLOR border 34;40 #00000000 #000000000 std
MENU COLOR title 1;36;40 #ff00b0fe #00000000 std
MENU COLOR tabmsg 1;33;40 #90ffff00 #00000000 std
MENU COLOR sel 33;40 #ffba7e00 #00000000 std
MENU COLOR hotsel 1;33;40 #ffffff00 #00000000 std
MENU COLOR unsel 34;40 #ff00425f #00000000 std
MENU COLOR hotkey 36;40 #ff0092c8 #00000000 std

Posted by Jack Kelly | Permanent link | File under: openpandora

Thu Apr 11 16:52:11 EST 2013

Religion for Atheists

Despite the lack of recent posts under this tag, I have still been reading. It's just that it's all either been for my courses or unremarkable. I just finished reading Alain de Botton's Religion for Atheists. Despite being fascinated by ritual and structure, I found it thoroughly disappointing. (Aside: if you want to read a rant, it seems the book was torn to shreds some time ago.)

Probably the most boring question you can ask about religion is whether or not the whole thing is “true.”

That is the book's opening sentence and premise, and it is phrased very poorly. Whether or not Aesop's Fables actually happened has no relevance to their use as a tool for moral instruction. The truth value of a religious proposition is very relevant for someone deciding how to live their life, but much less important when looking at the social effects of its rituals and traditions. To an atheist reader (clearly the target audience; it says so in the title), it sounds suspiciously like de Botton is quite comfortable with taking sophistry as a substitute for reason. Which, sadly, is exactly what he does.

de Botton has been taken to task for glossing over religion's failings and evils, and for portraying secular society as a soulless husk that needs a dose of religious-style perspective, ritual and tradition. I cannot fault him for the former; to demand that he covers the good and ill of religion is like demanding that anti-vaccination gets equal coverage in the press. But the latter? If creating this grey fantasy world wasn't necessary to sell his book, people would ask why he has glued his eyes closed.

He complains that secular society lacks a body of art that reinforces virtue and prepares us to handle the worst parts of living. I am sorry for de Botton. Sorry that in his world Bill Watterson never drew Calvin and Hobbes, Captain Picard never made a speech and Fred Rogers never sat down as neighbour to generations of children. Sorry that in his world nobody saw the Earth rise or the Pale Blue Dot and struggle to come to terms with their place in the universe. He asserts that the fixed schedule of saints' days gives opportunity to contemplate each saint's works or virtues. Perhaps. But in the context of the book, it implicitly claims that secular societies should have such a calendar defined by either a government, a corporation or his made-up atheist church. All are poor options and all are unnecessary. During their syndicated runs, both Star Trek and Calvin and Hobbes were scheduled repetitions of ideas to make you think. Every year people gather online to discuss and remember Fred Rogers.

He makes some interesting points about religious observances adding additional structure to people's lives, using traditions like the Jewish Bar Mitzvah as an example. It is true that there are few thought-provoking secular rituals in modern society. Birthdays might count, but they're merely a celebration of life. University graduation ceremonies carry the weight of ancient traditions, but even they have been watered down. I remember one of the staff joking that he was "academically naked" at my graduation because he took the lectern without his hat. The only profound rituals that I can personally recall are those that commemorate war, like the ANZAC Day Dawn Service and Remembrance Day. As fascinated as I am by ritual, I cannot see how any new ones would see wide acceptance. The religious have their own perfectly serviceable set, and the non-religious seem to be doing fine without them.

A couple of his ideas are have merit. Secular retreats, possibly modeled after monastic traditions, would be a very interesting experiment. It is not surprising that people want to escape the constant background noise and intrusions of modern life. Mindfulness meditation is often discussed and recommended online in a form stripped of its religious baggage. I'd be very interested in a restaurant that features enforced random seating, forcing people who'd never ordinarily meet to talk to each other. In the menu you'd find discussion prompts alongside the list of dishes, helping you to break the ice as you break bread. Unfortunately, he turns his pen to morality and starts heading downwards again.

Most of his discussions of morality suggest a paternalistic system, an adult-sized "sticker chart" where some superior force tracks and measures one's faults and virtues. But who should do that? Certainly not a god, because that contradicts the premise of the book. Not another human, because the privacy implications are too horrible to contemplate. The only adult who can monitor an one's own conduct like that is the person themselves. Actual charts are a fairly extreme measure (although Ben Franklin claimed that the exercise left him "a better and a happier man"), but reflecting on one's past conduct needs only a little time.

Continuing his plan to infantilise adults, de Botton draws parallels between children talking to their plush toys and believers praying to their god, to various saints, or to Mary in particular. The conclusion he draws is that everyone should be able to cry "mummy" to the universe. No. The answer for a secular world is for humans to be strong for each other, and to have counselling and other mental health services in place. Not an altar with a saint's jawbone or a picture of madonna and child. Besides, we should be doing the opposite of infantilising adults: we should be raising the bar for children, especially adolescents, and giving them the means to earn self-respect and the respect of society. Why are programs like sail training and Outward Bound effective? Because students are forced to physically, mentally and emotionally master unfamiliar environments instead of merely trickling through the school system, despite the best efforts of under-resourced teachers.

And then there are points where he goes from the absurd to the insidious. In a discussion about branding, he suggests with a completely straight face that a corporation could productively extend its brand to political parties or schools. He completely forgets that the established corporations that could do this sort of brand expansion exist to make money. Not to raise good citizens. Not to impart a moral education. To make money. If corporations had that level of direct influence over education and government, we'd end up in a Brave New World before very long.

He forgets that a sound argument is sound regardless of how it is delivered, and claims that the university lecture would be considerably improved if it was given in the style of the Pentecostal and Baptist preachers of the southern US. If you step in front of a crowd and claim that down is up, having the crowd call back "amen, teacher" doesn't make you any less wrong.

In summary, the book contains a kernel of an interesting idea, buried under a slag heap of false logic, written by an intellectually dishonest author. It claims to draw on the world's great religions, but mostly concerns itself with Catholicism and makes token reference to other schools of Christianity, Buddhism and Judaism. Islam is conspicuously absent, at a time when tension between it and the west recommends it as a prime candidate for study. Sikhism is similarly missing, and both have many more adherents than Judaism. If de Botton wants to gaze longingly at the rituals, art and architecture of Catholicism, he should stop writing books and pass through the Rite of Christian Initiation of Adults.

Posted by Jack Kelly | Permanent link | File under: rants, readings