Wednesday, April 22, 2009

Notice on Gutsy Gibbon Users on Apt-Get Repositories

This is a short note. As we all know, Ubuntu has dropped support for Gutsy Gibbon. As we all know, at that point, your Synaptic will also stop operating. Open your /etc/apt/sources.list and update the Ubuntu URLs to point to: http://old-releases.ubuntu.com.

Here's a sample:
deb http://old-releases.ubuntu.com/ubuntu/ gutsy main restricted

This works for all other older, no longer supported releases of Ubuntu. Bear in mind though, if you want to upgrade distributions, you may have to change the url back to the URLs Ubuntu uses for their support distributions.

Just thought I'd just put that reminder out there.

Sunday, April 19, 2009

Apple eMac and Ubuntu: The Journey into the New World

The Journey into the New World



For many years, Linux has been a part of my computing world and it has been almost impossible to part with it. It is one of the most versatile and customizable operating systems I have ever had the pleasure of using. For sure the Linux user base is not as dominant as other operating systems, but the one thing I have learned through years is that we Linux users have been strong as an online community. This community allows us to roll up our sleeves and solve the challenges in Linux as we encounter them, but never are we alone, nor are we without the knowledge to undertake that challenge.

Before you read on, I would like to remind you this is a real lengthy account of what mostly, I hope, transpired. If you are just looking for help, that comes at the end of this sobby and long, drawn out boring article. Check the Full Monty section.

All it takes is a little push...

Most people who hear Linux often view it as an enigma. A mysterious unknown world that will only be useful to a niche audience. Perhaps there is truth in that criticism, but if you have someone to guide you through this journey, you may find yourself discovering a new and interesting world unfold before you. Some may never see Linux as an option to their personal computing, but you will never know if you never even try. And to try and see it for yourself, sometimes all it really takes is a little push.

I often visit Mixed Martial Arts forums to read view points and get into the countless debates on who is king of the hill and who is king nothing, but what I did not expect was to find someone who wanted to try Linux. Someone who wanted to get his feet wet. For reasons only he knows, he has taken that little push towards a new experience.

I could not say no to a plea for help on embarking this sojourn. How could I ever say no to it? To share, and to give someone a chance to learn a new platform, is one of the things that gives me satisfaction. Soon I realize though, as with all things in life, that this would not be an entirely familiar and ordinary affair...

The journey begins...

Thus our correspondence began. Introducing people to Linux is never a straightforward affair, even more so when all you know about the person is a faceless alias. And unlike helping someone who knows and already has gotten his first leap into Linux, throwing a bone is often never enough.

This person, who fondly calls himself 'Simple Jack', has started to give me the details of what he wanted to achieve. As it turns out, Simple Jack had wanted to dual boot his old Apple eMac with Ubuntu. Since I have never really owned anything Apple-related I knew it was going to be an interesting journey for the both of us. But was he biting off more than he can chew? Half of me was convinced that he may not get it done, the other half, was more hopeful. One thing was certain, deep down in my gut, I was sure as hell going to bloody try and help.

For the most part, installing Linux on the normal x86 architecture has been a streamlined and mostly smooth affair, and I was completely expecting powerpc architectures. And as if I needed a hard gut shot as a reminder, it was anything but that.

I had done a few light readings and he had burnt the PowerPC release of Intrepid Ibex. There, the first obstacle had made itself known. The bloody disc would not even boot! To make matters worse, I could not see what was actually happening save for descriptions Jack had thrown through forum private messages roughly at fifteen to twenty minute intervals. If this was our means of communication, I had hopelessly thought that by the time we get the bloody disc installed, an asteroid would have hit the Earth.

The remarkable thing I realized was that while Jack was seemingly always in his self-deprecating mode, this setback did little to put him down. I was going to do my own research, but he was more than willing to go the extra mile and do his homework (Bravo Simple Jack!). As the saying goes, it does take two to tango.

Our initial setback had taken us from one Ubuntu powerpc Desktop CD to a multitude of live discs all of which turned out to be fantastic failures. As he and I quickly realized, the powerpc machines that Apple concocted had been quite the wild beast, as if Apple had devised it to run amok if it had an iota of non-Apple operating systems.

The initial success...

From readings we had pinned our hopes on Feisty Fawn, ye old Ubuntu release and first of the non-official PowerPC builds by Ubuntu, I think. Thankfully, we had upgraded our communication channels to something more instant (ahem, instant messengers). At that point in time, I had already started thinking of alternatives to Ubuntu and the only one that came to mind was Yellow Dog Linux. It was an unfamiliar release to me, but if there was a last ditch effort, it was going to be from blokes who had been building Linux releases on PowerPC platforms.

Before I delved deeper into that, Jack had reported something that was a little different from the norm I was quickly getting accustomed to. Feisty did boot. And for a disc image that was bloody hell difficult to find, it was well worth this first tiny ray of light!

I knew that there was a light at the end of the tunnel, and that it had not been a train all along. Once Feisty booted, I was back into more familiar grounds. But that machine I was beginning to think of as Apple's Little Devil had more in store for us. The next problem was the graphics display.

From early readings, I had come to note that these are known issues and as Jack's Apple folks mentioned, X and the Mac hardware have always had their share of grief and conflict. We spent at least a few days walking through Linux commandline debugging work, hoping to manually hack that xorg.conf. As usual that little devil refused to give in. I was also realizing that finding articles talking about Apple eMacs and Linux was like finding a needle in a haystack.

Houston! We have a desktop... sort of...

I advised Jack to start asking around for help on the Mac communities he knew. If we were going to resolve this, it was likely to come from someone who knows the hardware more intimately. While we had several links to sample xorg.conf files that supposedly should have worked, none have been that silver bullet I had hoped, and manually dictating what to write on the xorg.conf was in and in itself a time leech sucking away at the short number of hours we had in common from the dreadful timezone differences. At the very least he had now become accustomed to the often feared by the ignorant Linux terminal. So much for being the 'Linux for Humans'.

The response when we laid out our cards before his Mac folks had been interesting. When one of them claimed one of the files looked good, I took a thorough look back at the links and fingered the one that made the most sense.

We were going to have another go at this thing, and I was a bit confident it would work. Jack, who to this day I wonder if he ever gets enough sleep, had enthusiastically reported the second victory we garnered over Apple's little devil. But this would not be an entirely smooth one though.

In many instances, the desktop would freeze upon start up which at first boggled me. Thankfully, the two brief and at that time, not very helpful Ubuntu articles on the PowerPC releases had shown their usefulness. We had managed to pin down our issue as the Linux Enlightened Sound Daemon, which did nothing to enlighten our desktop. Worse, it made sure all we had was a very dull brown screen. To be fair, Ubuntu desktops have always been very brown!

The little devil's last stand...

Oh but the little devil for sure did not like the progress we had made through the week's toils. I thought we had been through the worst but the devil had one final trick up its sleeve.

After getting the desktop up via Live CD, we had started talking of how to go about installing Linux. Jack did not like losing the OS X install, but I did not see any other option as repartitioning the disks was not going to save his Tiger. He was adamant about keeping it and I thought maybe there was something that could be done. Boot camp certainly achieved that when Apple decided to open its gates to other popular operating systems.

As we went through a number of articles and readings the name Intel Macs were starting to irritate Jack, as they were blessed with the Boot Camp capabilities. All the Mac-centric articles on non-destructive repartitioning I have come across had been for these machines that, in my opinion, had helped in making powerpc architecture such a neglected platform on Ubuntu and most other popular Linux releases for that matter.

Finally, we had an agreement. The Tiger must die. Blowing the partitions to kingdom come has always been easy, but trying to set the partitions up for our final step into this install had, expectedly, been many times more complicated.

I was not familiar with the means of which Ubuntu needed to boot into Apple hardware. We had learned, a tad bit late if I may add, that not only was the partition editor in the Tiger Install disc a piece of garbage, but also that we had to work with it and at the same time, figure out what sort of setup Ubuntu would deem usable. It was a battle long drawn out and it was back and forth with articles and different things. So close, yet so far.

While I had learned a few things about what Ubuntu needed, the manual partitioning that I liked to use so much was not cooperative. For some reason, it kept babbling about Apple_Bootloader of which I had no clue. It put us on a merry chase and one that I did not always know where we were heading.

The finale...

I would suppose that at the end of things, Jack had to use a different approach than what I normally like doing. The benefits of thinking outside of the box and having a person not afraid to pull that trigger. Instead of doing that bloody manual install that I kept harping about, Jack had gone through Ubuntu's guided install (of course, after OS X was reinstalled with a smaller partition), which at that point I was not betting any eggs on noting the success rate we had with Ubuntu. But then like magic, the install went through and we had two OS installs on the Apple eMac. It was not the result I had expected, but this entire journey the both of us had embarked had proven to be at the very least interesting and definitely an educational experience for both of us.

From there, I knew there were going to be issues with Ubuntu, especially since it is a fairly out of date version, but it was going to be a more familiar battleground. I firmly believe we had finally mastered that wily little devil. And I think at that point it would be more straightforward to advise what to do.

For Jack, he seems to like Ubuntu. There are a few nagging things but this is just the first step into Linux. I can only hope it proves to be a viable platform for him to be productive and at the same time learn more and have fun with it.

Had I not helped, we may not have achieved this goal, but as important as having a community that helps in Linux there was another important element to this. That is having someone willing to learn.

As a side comment, for a machine noted to have been under the so-called 'New World Macs', it sure seemed to be pretty old, and pretty stubborn. Like a grumpy old man. Take that you little devil!

So why did I have to read all this?

Actually, I do not think you needed to. But if you did, a trite thank you and at the same time an apology for being such a time vampire. The article you just read was really a personal rambling of sort. One that I like to do once in a while. But the true purpose of the writing is just around the corner.



The Full Monty



I have always wanted to use that phrase. And now, you will be spared of the colourful words, at least I try to make it sound like. Let us go through the hardware:

Hardware Overview:

Machine Name: eMac

Machine Model: PowerMac4,4

CPU Type: PowerPC G4 (2.1)

Number Of CPUs: 1

CPU Speed: 700 MHz

L2 Cache (per CPU): 256 KB

Memory: 640 MB

Bus Speed: 100 MHz

Boot ROM Version: 4.4.0f1



eMac Display:

NVIDIA GeForce2 MX

Chipset Model: GeForce2 MX

Type: i2c

Bus: AGP

VRAM (total): 32 MB

Device ID: 0x0110

Revision ID: 0x00b2

ROM Revision: 1105.2

Display Type: CRT

Resolution: 1024 x 768 @ 89Hz

Depth: 16-bit Color

Built-in: Yes

Core Image: Not Supported

Main Display: Yes

Mirror: Off

Online: Yes

Quartz Extreme: Not Supported

Burning Device - NEC DVD RW ND-3520A

Firmware Revision: 1.04

Interconnect: FireWire

Burn Support: Yes (Vendor Supported)

NOTE: Internal Optical Drive is busted. So we had to use his Firewire Optical Drive.

Hard Disk Capacity: 38.29 GB



Feisty Fawn PowerPC Image Download:

http://mirror.linux.org.au/ubuntu-releases/7.04/?C=M;O=A



Supplemental Readings:

Booting from firewire CD drive:

http://ubuntuforums.org/showthread.php?t=320690

Notes on the Graphics Xorg Problems:

Article on xorg.conf: http://www.linux.com/feature/58044

Apple eMac xorg.conf (From the Article Above):

http://homepage.univie.ac.at/georg.koe/XF86Config/XF86Config-4.emac700nvidia.working

NOTE: Be sure to change keyword from "de" to "en" unless you are Deutsch.

Gnome Desktop ESD Problems:

https://wiki.ubuntu.com/PowerPCKnownIssues#Gnome wont load

Specifically, this area:

Sound problems

There is a kernel bug that causes processes play sounds to hang. When Gnome plays its startup sound it hangs. You may hear the first fraction of a second of the sound.

Press CTRL+ALT+F1. Log in at the text terminal, if needed. Type

killall esd

and press enter. Press CTRL+ALT+F7 to return to the desktop. Go to Gnome's Sound Prefs and uncheck the 'ESD' box, this will allow stop the hang in future log ins.

Partitioning Supplemental Reading:

https://help.ubuntu.com/8.04/installation-guide/powerpc/partition-programs.html

http://penguinppc.org/bootloaders/yaboot/doc/mac-fdisk-basics.shtml



Brief walkthrough of what had transpired

I hope this gives you a good idea of what we did and hopefully this will arm you for your own adventure with the Apple eMac.



Booting the Live CD:

  1. When you put in Feisty and attempt to boot, you need to do somethings to boot the Live disc using the firewire drive. Of course at that point you need to have the disc in the drive! When the computer is starting hold down command (apple key) +option+o+f and then type the following:

boot fw/node/sbp-2/disk:,\install\yaboot

  1. When the LiveCD starts, you will not have a desktop but instead a black screen. To get the terminal, press (and hold) CTRL+ALT+F1

  2. We need to kill the esd sound daemon. Type in: $ killall esd

  3. Copy the xorg.conf file from the supplemental readings part to /etc/X11/xorg.conf. (You can use wget to download it, or you can type it in its entirety if you're a glutton for pain). $ cp xorg.conf /etc/X11/xorg.conf

  4. We need to restart gdm. Do the following

    1. To stop gdm. $ sudo /etc/init.d/gdm stop

    2. To start gdm. $ sudo /etc/init.d/gdm start

  5. In case there are prompts that pop up, all we want is the desktop, use that to determine any decision it asks from you. I seem to remember something like that. To forcibly go back to the desktop, press CTRL+ALT+F7.

  6. The desktop should be up on Live CD.



Partitioning Notes:

We unfortunately did not take enough notes down to definitively say what had happened but we can sort of make some vague guidelines.

  1. You need to wipe clean the disk. We used Ubuntu's installer to erase all the partitions.

  2. On Apple's disk utility, we create three partitions, one for Apple OS X's swap and then the other partitions for Ubuntu and OS X. By my best guess, it should look like something like this:

    • 2.8~ GB swap partition

    • 17.7~ GB Apple HFS (for Ubuntu, I think)

    • 17.7~ GB Apple HFS (for OS X, I think)

    • Bear in mind that by the end of all this we will have two swap partitions, one for Apple OS X and the other for Ubuntu.

  1. Install OS X and be sure to select the partitions you are going to use for installing!

  2. Install Ubuntu immediately after OS X (To boot from Live CD, check above)

  3. Use Ubuntu's Guided Install. It does not seem to like the manual partitioning and we could not get the Apple_Bootloader partition to get recognized. So this was what worked.

  4. By the end of the install our disk setup looked like this:

    • /dev/hda1 - partition map (31.5 KB)

    • /dev/hda2 - (28 KB) - AppleDriver

    • /dev/hda3 - (28 KB) - AppleDriver

    • /dev/hda4 - (28 KB) - AppleDriverATA

    • /dev/hda5 - (28 KB) - AppleDriverATA

    • /dev/hda6 - (256 KB) - AppleFW

    • /dev/hda7 - (256 KB) - AppleDriverIO

    • /dev/hda8 - (256 KB) - ApplePatches

    • /dev/hda9 - Apple_Bootstrap (977 KB) --> not created by the OS X installer , maybe by Ubuntu's Guided Install. Required by Yaboot.

    • /dev/hda10 - (2.8 GB) HFS --> Apple Swap partition. In OSX, Swap - diskOs10

    • /dev/hda11 - Ubuntu install - (17.0 GB) Detected as Apple_UNIX_SVR2

    • /dev/hda12 - OS X - (17.6 GB) --> 17.56 GB. In Mac OS X - diskOs12

    • /dev/hda13 - swap (806.5 MB) --> Ubuntu's swap. Detected as Apple_UNIX_SVR2

    • /dev/hda14 - (128 MB) free

    • /dev/hda15 - (8 KB) free



Hopefully, this helps you install Ubuntu on the Apple eMac. If this helped you dual boot, then fantastic! And good luck! Never give up!