Wednesday, November 30, 2005

A Trip to Mac OSX on Intel

bootscreen

Its been a long obsession ever since I heard the existence of the x86 port. Unless you've been living under a rock (or an msn umbrella), chances are that you have heard about Apple's decision to dump the powerpc architecture in favor of Intel. You might also have heard that the developer version (was/had been) leaked (by apple?). Anyway, I wanted to get my hands on this baby; not only to satisfy my curiosity, but also to see what the competition was like.

Sure the MacOS X is going to slaughter any short or long horn that will come its way, but could it also hurt some desktop GNU/Linux deployments in the short term atleast?

Well after a couple of unsuccessful attempts, we (yes we!), managed to convert the dmg image to an iso(dvd) image and then burn it. Unfortunately it turned out that MacOSX refused to install after complaining the hardware wasn't supported. After trying several notebooks and desktops, it was obvious that none of the hardware we could find was supported -- or so we thought!

A bit of research on google revealed that this edition indeed required a binary patch to make it work on any machine other than the one Apple had provided its developers with. So after a 143MB or so download, I was left with a binary patch that used a windoze binary patch tool called ppf-o-matic. "Hmm windoze, now where can I find one of those", I thought to myself. Investigation of the tool's website turned up a Mac OS version, which after trying on a friends iBook, failed with a crash. The recently released java version too couldn't cope with 4GB+ iso image. Being somewhat skeptical, I tried the windoze patch tool with wine, the FOSS windoze emulator, to find that it worked great.

Everything was going well - the md5sums matched as published on many howtos. Once the dvd was burned, I tried booting it off to be greeted with a beautiful installer.

installer_welcome Sanjaya helped me with the initial bits of the Mac installation, but it looked like I was going to loose my data - the installer didn't know how to resize my Linux partitions. So I booted off from the Taprobane LiveCD and ran qtparted to resize my partitions. I discovered that wasn't going to work either as QTparted didn't allow it. Just then I remembered a page from the LVM howto about having to manually resize the filesystem before resizing the physical partition.

So I fired up a shell and typed:


resize_reiserfs -s -12G /dev/hda1


which basically said to shrink my reiserfs root (/) partition by 12 GB. Again I ran Qtparted, now hoping to be able to resize the physical device, but again I found that option wasn't available. The alternative left was scary - to use fdisk/cfdisk to delete the partition and recreate it while the data stays in tact! Oh boy! was I heading for disaster and I'd be foolish not to do some sort of back up, which I did.

So without thinking twice, I deleted /dev/hda1 partition and recreated it starting from the same location (beginning of the hard drive) but spanning only 2GB more than the size of the filesystem.

Then I resized the file system to grow back to fill the 2GB gap in the physical file system.


resize_reiserfs /dev/hda1


erase_disk Once again, I rebooted onto the Mac installer and found that it still couldn't install on to the free disk space without removing the current Linux / partition. So once again, I found myself inside the LiveCD trying to fix things from Linux. Again I fired up my shell and ran cfdisk to create the MacOSX partition and set FS_Type_ID to Hex AF (which by the way cfdisk has no idea about).

Now this time when I booted into the Mac installer, it detected the presence of the partition and allowed me to format it without deleting the Linux partitions. From this point onwards, the installation was a breeze.

install install2

After installing, it turns out that the installer hadn't installed any boot loader at the MBR, as I was still left with GRUB. After a trial and error, I discovered that with the installation DVD in place, if I don't press any key then it would boot the installed MacOSX as opposed to running the installer.

By this time there was a small crowd looking over my shoulder at the beautiful and speedy Tiger desktop that lay before our eyes.

desktop It was late, and time to go home (from office) so I rushed home hoping to try to install the OS on my AMD64 barebone. Unfortunately, it seemed the installer cannot detected my SATA hard drive for some reason even though I remember seeing the Nvidia chipset as supported.

Afterwards, which I managed to get working, I also managed to get GRUB to boot MacOS directly on the IBM Thinkpad, without the need to bootstrap via the DVD installer.

After a few hours of using MacOSX x86 version, I admit that I am impressed. Not only of the extremely user-friendly GUI that's covered with eye candy, but also because the OS seems very responsive and feels light-weight even with all those effects. I am not sure what it is - whether its the free & opensource Darwin micro kernel, or the non-free & proprietary x-window like system, it feels fast!

Saturday, November 26, 2005

The Mango party!

Image004

mango_crowdA new distro sweet as Mango was (un)officially launched by our very own Arunan, who is celebrating his B' day today* happens to be one of the youngest Slackers in the LKLUG. The occation, which was held at the newly opened "The Linux Center" or TLC in short, was filled with several LUGers and showered with slices of Mango EVERYWHERE, going fast!

Mango is a new distro that is based on Slackware/Vector (do I hear.. long live Slack????), and contains sinhala and tamil localization as well as several useful packages. Though I would have preferred if he had used Debian/Taprobane instead, I guess a slacker will always be a slacker :) (FYI:he has shown interest in a remastered taprobane with a different undisclosed name)

imacAmong the Mango there was a very noticable Apple. Anuradha's brother Sanjaya, took out his new Apple iBook, hoping no one would notice (specially with all the mangos' around). But boy was he wrong! For the rest of the evening, the Linux center was pretty much a Mac Center :) No one complained, as the Mac OSX is powered by a FOSS kernel and subsystem.

Interestingly enough the key person, Arunan was missing from the event. Most of us waited and waited for him to turn up while some people had to leave ealy. After several hours of waiting (while having fun), he turned up with hands empty. It seems the Mango iso image was too big to fit on to a CD. So I guess, we'll have to wait for the official version or ask for a DVD version. bud_sethu

* Today also happens to be my brother's B' day. If your reading this - Happy B' day malli!

Sunday, November 20, 2005

My quest for the perfect wireless world

So after my unplesent experience with CDMA, and the difficulty of carrying a full fledged phone around all the time (I even took it to Blue waters last week), just to satisfy my online cravings, I decided to take a plunge and upgrade my cell phone.

Those who have seen my old cell phone know how ugly it looks, with bits of colors torn from the cover and the keypad virtually erased (well, ok .... most of gadgets end up looking so), wouldn't second guess that it was about time I upgraded.

After flirting around with the new Nokia 6230i, I decided she was too expensive for my purse, and decided to go with the next best thing – the SE K700i. Thanks to my friend Asanga and his underground contacts, I managed to get a decent price (I think).

Well after charging it for a good 2.5 hrs, which gave me some time to skip through the manual, I got right down to business – with Linux ofcourse.

Since my notebook doesn't have inbuilt support for Bluetooth, I used the IR port instead. Irda is fairly well supported in Linux, except when it comes to enhanced modes that are specific to the IR chip. Unfortunately, my IR chip isn't detected by the findchip tool.

Nevertheless, using IR to emulate a standard COM port is how I generally connect the two. Tools such as irdadump and irdaping are useful when it comes to debugging the connection.

Transferring files to and from was quite a breeze (as usual), using the command line tools such as ircp, irxfer and obexftp. The challenge was connecting via GPRS. Thanks to google, I was able to quickly find details of how to set that up. Even though there are no drivers for my Irda chip, using the irtty_sir module, it turns out, I can still connect, thanks to serial emulation!


Here is the wvdial.conf I used to connect to Dialog


[Dialer Dialog]
Modem = /dev/ircomm0
Baud = 57600
SetVolume = 0
Dial Command = ATDT
Init1 = ATZ
Init3 = ATM0
FlowControl = crtscts
Username = ""
Password = ""
Phone = *99***1#
Stupid Mode = 1


Next I wanted to check if GPRSEasy Connect could do the same and sure enough, by selecting Sri Lanka – Dialog from the drop down provider list (yup, they know we exist!), and selecting SE K700 (700i wasn't in the list – but then again, my software version is old), I was able to easily connect.

gprseasy

So there you have it folks - everything works, and I didn't have to install a single third party driver. GNU/Linux rocks!

Saturday, November 12, 2005

LiveCD from scratch workshop

Just came back from a long day workshop organized as part of the IITC 2005 Conference. Myself, Anuradha and Chamath undertook the almost impossible task of a, "less than a day" workshop, consisting of several integrated interruptions (ie. lunch, tea breaks), to cover a relatively advanced subject, to a relatively inexperienced GNU/Linux user, and still managed to pull it off - somewhat!

Now that I'm done patting our selves in the back, I'd like to say that it was extremely fun :) After all, there is really nothing like going under the hood and getting some "machan (grease)", on a Saturday morning tinkering with Linux. For those who missed it, we had a small crowd (that is too small to mention), but made it much easier to managed and give personal attention to each attendee. Here is a summary of tasks we managed to cover:


  • Presentation on the Linux kernel's boot process, from the BIOS all the way upto the runlevels, both during a normal hard drive boot and during a Live CD boot.
  • Install Taprobane GNU/Linux, using the cfdisk->mkfs->cp -a method
  • Create an initrd using mkinitrd and use it as a prototype to build a modifiable initrd
  • Hack the initrd's /linuxrc script to drop us to a shell and play with a world before the BigBang - /sbin/init
  • Presentation on using Squashfs and UnionFS to provide write support anywhere
  • Creation of a squashfs file system using out live running system
  • Creating the final iso and testing it using qemu


Unfortunately, our iso booted only half way before panicing, by which time we were out of time for debugging. Despite this, I hope, the attendees had a lot of fun, hacking away.

Wednesday, November 09, 2005

More Firefly please...

ff_banner02


Just finished watching the 13th episode of the Firefly, to discover, I've run out of episodes :(. About a month back Suchetha handed me a stack of DivX CDs and insisted that I watch it. The pilot episode was a long 2hr show, somewhat weird and not soo interesting. I was expecting something like Star Trek or Andromeda but this was like a space cowboy movie - where have all the aliens gone?

But as I watched more episodes, skipping days due to a busy schedule (like flying off to Pakistan for one), I was drawned to the characters (specially to one :), j/k). Each episode was some what connected, but had its unique cinematic style.

And now after the 13th and final episode (excluding the pilot), its all over :(. Fox that originally aired it, had pulled the plug! Like many fans, I am left wanting more...But there is a bit more to come, Serenity, the movie named after the ship in firefly, will be released soon on dvd. Till then, perhaps the theme song will remain stuck inside my head.


Theme from Firefly

Take my love.
Take my land.
Take me where I cannot stand.
I don’t care, I’m still free.
You can’t take the sky from me.

Take me out
to the black.
Tell ‘em I ain’t comin’ back.
Burn the land and boil the sea.
You can’t take the sky from me.

Have no place
I can be
Since I found Serenity.
But you can’t take the sky from me.