« Blog Home

§ Adventures with Ubuntu 9.10 on G4 Yikes!

I have an Apple G4 Yikes! (or PCI Graphics) that I've loved for years.  I ran Jaguar, then Panther, and it currently runs Tiger well enough to suit me.  I got a G5 a while back, so this box got sort of retired, until I picked up some contract work doing websites.  Since I had a whole new set of emails, chat sessions, VOIP, invoices, etc., etc., I turned on my trusty Yikes! and devoted it to all of that stuff for that job.

When I stopped working that contract, my poor old G4 started getting lonely again.  So, the other day I thought maybe I should use it to try Linux again.  I've looked at Linux a number of times through the years, for various reasons, including on old Macs, but never quite got sucked in to being a convert.

"I keep hearing good things about Ubuntu," I thought, "so I think I'll try it; this'll be fun!"

That depends on your definition of fun...

(If you don't want the gory details, cheat by going to the summary.)

Now the Yikes! logic board is a strange creature, as I knew full well 10 years ago, so I expected that to be part of the fun adventure.

First, I downloaded the Ubuntu 9.10 live CD (for Power PC, of course).  As many have commented, the image is too big to fit on a CD!  I read that someone burned it to a DVD and was able to use it, but I don't have a DVD in this box, so I downloaded the alternate CD.  Ok, ready to go, right?

I found it impossible to boot the CD on this G4.  (More on this later.)  I tried the mini CD, same trouble.  I tried a Debian disk, same thing.  I spent a lot of time trying to get these to work, especially if you count downloading time.  I finally found a post somewhere that categorically stated that it is impossible to boot a Yikes! to Linux on a CD.

I had already been mucking about in Open Firmware (OF hereafter) to try to boot the CD, since holding C or Cmd-Opt-Shift-Delete didn't seem to do much.  (Either one works fine with MacOS or MacOSX CDs.)  I could see that it would just start trying to load the CD and then lock up, so I decided it must be impossible, like the post said.  Incidentally, the discs I burned on my G5 Leopard machine with Disk Utility wouldn't even begin to try; the ones that barely tried were burned in XP.  Maybe Toast or something...

So I tried putting the files on the hard drive and booting to it.  Success!  Oh, er, not quite.  Actually, when I copied minimal files from the alternate CD to the hard drive, yaboot ran all right (Yay!) but after booting for a while I got a kernel panic.  Well, not too strange, really, since I wasn't actually using the right set of files.

So, is there a right set of files to use this way?  I don't know this for sure, but I believe the set on the mini CD would work, but I didn't know that (and I had tried them), so I went searching... and searching...  I don't know how, but I finally stumbled on a file set for the hard drive, but for an older version.  With clues from the download path of those, I managed to find file sets for the current version intended for hard drive or netboot.  Ok, ready to go, right?

Now it booted up to yaboot (I think), then instantly flashed something on the screen (several lines of white text on a blue background low on the screen, and a separate line of black on white farther down) for less than a half second, then to a blank gray screen.  I did this about 10 times, trying different things in yaboot.conf, hoping I could manage to read any of it to try to figure out what was happening, but it was just too quick.  (This is also what happened using the mini CD files on the hd.)  I'm guessing that yaboot was crashing, but I couldn't find any way to troubleshoot it.  I spent a lot of time trying to get this to work; keep in mind I had to try it, reboot into OSX, fiddle with the files, reboot to OF, type intuitive (it's a Mac, right?) things like:

boot ultra1:,\install\yaboot

and so on and so forth.  I'd bet almost anything this could have worked, if I just could have found what little thing wasn't quite right.  Yeah, a lot of time...

Now what?  Hmm, I have a file set for netboot; what about that?  Well, let's see.  Oh, good!  I found i netbooted my mac to install ubuntu.  Sounds pretty easy.  So, let's see.  My G5 is running Leopard, just the regular version, not the server.  I guess on the server edition you can click a couple of buttons and it's ready to go, but all the necessary software is already on the regular edition, too; you just have to set it up using a terminal.  Oh, cool, here we go:  Make Your Regular Mac a NetBoot Server!.  Nope, that's only for Tiger.  Wait, a link in the comments to Admin the Mac: Making a NetBoot Server for Leopard.  Great, this worked like a charm.

Except... after a lot of time, I finally figured out that for OSX to serve up a netboot image, it has to be in some particular format, not just some files in a directory.  It looks like in Linux, if you've got the netboot server stuff set up correctly, you can just access the directory and filename.  I did find a tool to create those OSX netboot images, and I know that the netboot server was working correctly by watching system.log, and I could see that the G4 was trying to boot it (which was impossible, as I knew, since it was a Leopard image).  I never could find a way to make a functional netboot image for anything except MacOS and MacOSX systems, though.  I spent a lot of time on this; I bet it could work, if I could just figure out how the make the netboot image.

Fine.  Now what?  Well, what about tftpd32?  Ah, here we go, this is simple!  Since I've already been toying with this in Leopard, I knew how to check that it was serving up files correctly.  Yes!  Piece of cake!  Ok, ready to go, right?

The G4 could never see it ("The server is not responding").  I didn't know what was wrong; later experience makes me wonder if it wasn't offering bootp.  I don't know if there's a way to do that with tftpd32 or not.  Maybe, for once, I didn't spend enough time trying this option.

Hmm...  Well, maybe I could install a small Linux in VirtualPC just to get a netboot server running.  (Am I starting to sound a bit obsessed with this project?)  So I installed Ubuntu in a VPC machine.  It went fairly smoothly, but took quite a while.  I had intended to install a minimal system (i.e., no X server), and I thought I told it to, but I ended up with a whole desktop system.  It was stuck in 800x600 video mode though, which was annoying but I didn't care since I only loaded it to set up a netboot server.  Remember?

So, now to setting netboot up in Ubuntu.  Let's see, install tftpboot, easy enough.  Hmm, why doesn't it actually run?  Ah, I have to tell it where the files are, there we go.  Hmm, why doesn't it actually run?  Oh, I haven't actually put the files into the directory yet, so there's nothing to serve, so it (quite reasonably) doesn't start up.  Ok, now it's working.  Again, I can verify that it actually does serve up the files to my G5.  But... yes, been there, done that... the G4 can't see it ("The server is not responding").  Grrr.  Ohh - Preparing Files for TFTP Net Booting says there must be a bootp server, not just tftp.  Now I don't know anything about bootp (aside from a certain incident in the woods when I was young...  ok, not true, but I couldn't resist).

Time for more configuration file editing... in this tiny window!  I can't stand it!  So, a little detour to get a reasonable screen resolution in this VPC window.  Here we go:  Installing Ubuntu 8.04 Hardy Heron in Virtual PC 2007.  Hmpf.  Try this:  Installing Ubuntu 8.04 Beta under Virtual PC 2007.  Well, nothing works.  Interspersed in the comments, there and elsewhere, people kept saying to use VirtualBox instead.  Now, aside from this insane current project, that's something I should take a look at sometime, so I went ahead and downloaded it.  After spending (ahem) a lot of time on this, I - you know where I'm going, don't you? - installed VirtualBox, figured out how to use it, installed Ubuntu... again.  I must say, Ubuntu installed and runs much, much faster in VirtualBox than in VPC.  I'm looking forward to trying Windows systems in VirtualBox; I've been satisfied with VPC, but you never know until you try.  A project for later, since it's not required for my current obsession project.

Ok, so I'm watching Ubuntu download and install for a while.  Among the hundreds of web pages I've been reading and rereading, I was delighted to discover NetBSD/macppc Frequently Asked Questions which is full of OF info I've not found elsewhere.  Somewhere (I can't find the page now, but I think it was at or linked from netbsd.org) I read of someone installing to a beige G3 (if I recall) and a comment about not being able to boot from a CD unless some variables were set in OF.  It turns out that you can't just do:

boot cd:,\\yaboot

or variations which all work for a hard drive, but not for a CD drive - who knows why.  I set these variables:

setenv boot-device cd:,\\yaboot
setenv boot-file yaboot
reset-all

I think that's what I used, anyway; I've changed it since then.  (I now know that the boot-file line is both incorrect and unnecessary.)

So - Zonino!  Jump for joy!  Giggle with glee!  O frabjous day!  Callooh!  Callay!  The installer is running from the CD.  Ok, ready to go, right?

I knew we would soon reach the part where the disks are partitioned, so I reminded myself to be careful that I used the right one.  There are three drives in the G4 and I had cleared out one to dedicate to Ubuntu.  But... that one does not appear as an option in the partitioner!  What the - er, heck?

Ok, shut it down and unplug the other drives, so the only one hooked up is the one I want to use.  Boot up to the installer, Enter, Enter, Enter,...  Now NO hard drives show up!  Ok, shut it down and scratch my head.  Put the hard drive on the same cable as the CD drive, boot it up... no hard drives.  Ok, shut it down and say something anatomical or theological.

When these were sold, they had a CD drive and an optional Zip drive.  The CD is set to master and the Zip to slave.  In fact, in OF, the master on that IDE controller is named cd: and the slave is named zip: (that is, those are the device aliases).  I wonder...  Make the hard drive master and the CD slave.  Boot to OF and change the boot-device to zip:, which is now actually the CD drive.

It works!  It's alive!!  It's installing!

Ironically, while I was trying to find that page with the solution to booting the CD a few minutes ago, I saw another comment that some people had to, yes, put the hard drive on the same cable as the CD, with the hard drive as master and the CD as slave.  However, that comment did not have the boot-device info I have to use.

Anyway, let the installer do its thing.  Reboot into OF.  Change boot-device back to cd:, which is actually the hard drive.  Continue booting and it boots into Ubuntu after some funny messages at the boot: prompt.  Yes!  Yay!

Except... the screen looks awful.  800x600 (oh, no, been there, done that) 256 colors.  Yuk.  This is feeding a 22 inch monitor which ought to be 1680x1050.  So - well, at least I'm already pretty familiar with some pages about this problem.  However, Ubuntu 9.10 does not have an xorg.conf file.  (That's not Ubuntu's idea, by the way.)  But all, and I do mean ALL, discussions about video drivers, resolutions, etc., talk about editing the xorg.conf file.  Well, everything I tried resulted in no gui at all.  Oh, yeah, I spent a lot of time on this.

It would have been considerably less time, if only I hadn't had to spend a great deal of time to discover there are two VERY SIMPLE ways to get to a command shell.  First, even if the gui is broken, you can always switch to a console with Ctrl-Alt-F1 (or F2 - F6).  I knew that, but it didn't work, because what nobody ever tells you is that you have to use the Ctrl and Alt keys on the LEFT of the keyboard.  Since F1 is on the left, I was naturally trying it with right hand Ctrl-Alt, left hand F1.  I don't know, maybe that's only on a Mac keyboard.  The other way is at the boot: prompt.  If you do nothing, it boots the image named Linux.  But if you type "Linux text" at the prompt, it won't run the gui.  It seems like searching for "Ubuntu text mode" should let you find a page fairly quickly that explains this.  I found several pages about run levels in Linux, but Ubuntu's different.

Earlier in the whole process I had removed additional PCI cards, just in case they were interfering with booting or yaboot.  While I was shuffling hard drives, I decided to put them back in, figuring that having them in place during the install might be a good idea.  One of these is a second video card, so I pulled it back out to see if that made any difference.  Nope.

Somewhere along the way, I had let Ubuntu do all of the updates it wanted to.  I don't know what else it could have been, but I suddenly realized that it was now at 1024x768; much better than 800x600, but still only 256 colors.  Anyway, scratching my head (again; no wonder I'm going bald), I decided to try putting the other video card in by itself - who knows?

Ahh, yes, finally.  It looks great, and it actually feels like it's running faster than with the other card.  So I'll just put the other card in as a secondary so I can still have dual monitors in OSX; not sure if I'll care about that in Ubuntu.  Ohh, awesome - Ubuntu now runs on that secondary card only, not the primary!  I don't know why; maybe because that's the one it was originally installed on?  So I spent some time on this, but gave up before too long; I rarely used two monitors on this machine anyway, so I just took out that card.  Ubuntu looks great again.

I had previously, while trying to netboot, changed the boot-command to include several switches (delays and retries).  The funny messages at the boot: prompt included part of that string, so it was obviously being passed on to yaboot.  I did this in OF:

setenv boot-device cd:,\\yaboot
setenv boot-file Linux
setenv boot-command boot
setenv auto-boot? true
reset-all

and now it boots right into Ubuntu!  Yay!  (Remember, cd: is actually the hard drive, as mentioned above.)

However, after playing with yaboot configurations on my good-looking, nicely-running system, I found that letting it take care of things made those OF changes unnecessary; boot-file can be empty and boot-command can be mac-boot.  When you change yaboot.conf, you have to run ybin to install the changes, and it will set boot-device appropriately.

So why was I playing with the yaboot configuration?  Well, once the system was running fine, I put my other hard drives back in (one has Panther, the other Tiger), so I wanted yaboot to let me boot into those if I wish.  I have now - you know what I'm going to say, don't you? - spent a lot of time on this, but I finally figured out that Ubuntu simply can't tell that IDE1 even exists, which at least explains why the installer wouldn't show me disks on that cable.  I kept trying to find the drives, looking for the OF paths; do I need to update fstab manually, or run some device-detection program?  Well, I don't actually care about accessing the OSX disks within Ubuntu, so this isn't much of a problem for me, but yaboot.conf examples typically uses UNIX paths to define where to boot from.  You can use OF paths, and some things, like the bootstrap partition, must be an OF path.  However, the OF paths Ubuntu shows me look different than what you see from within OF itself, so how can I figure out what to use?  I tried everything I could think of.

So how am I going to control which system gets booted?  I guess I'll have to go into OF anytime I want to switch.  Hmm, I could write shell scripts on each system that would update boot-device manually; that way, if a system is running I could control which one will boot up on a restart.  Well, I just (yes...) spent some more time on this, because an idea formed in my head.  I had read the yaboot and yaboot.conf man pages (repeatedly), but I read them once again.  I never had looked at the bootstrap man page though, so I went through that one, too

On the bootstrap man page I saw the old CHRP (Common Hardware Reference Platform) script used before the newer, nifty multi-boot script.  It just ran:

boot hd:,\\yaboot

in OF.  Gee, that looks familiar.  So I finally tried the simple aliases of those OSX drives, which are ultra0: and ultra1:.  It works!  Now I just turn on the G4 and I get a menu for which system I want to boot.  OSX doesn't even have a way to do that.

I can't think of anything else to complain about, so I guess I'm finished.  Darn it, I may have to do some work now...

 

 

 


Summary:  Installing Ubuntu on G4 Yikes!

1.  Get an appropriate image onto a CD, full or mini as you wish.  The mini requires an internet connection through the on-board ethernet port, but you won't have to download hundreds of megabytes of updates after the install.  I had better luck burning on an XP box, but YMMV.

2.  Put the hard drive on the same cable with the CD drive, with the hard drive master and the CD slave.

3.  Hold Cmd-Opt-O-F while starting to get to the Open Firmware (OF) prompt.

4.  At the OF prompt, enter:

setenv boot-device zip:,\\yaboot
reset-all

Yes, zip: is correct; that's really the CD drive.  With any luck, it will boot into the CD installer.

5.  Finish the install.

6.  Theoretically, it should have set up OF correctly and you'll reboot to your new system.  If not, do step 3 and at the OF prompt, enter:

setenv boot-device cd:,\\yaboot
reset-all

Yes, cd: is correct; that's really the hard drive.

7.  If you had to do step 6, go to a terminal or console and run:

sudo ybin -v

(the -v tells it to print some lines telling you what it's doing) to reinstall yaboot correctly.

Enjoy!

Comments

Walid says:

I am in the same process as you. Although I still dual-boot to Windows for my ganimg leisure. My first contact with Ubuntu was way back with 7.04. Abandoned it after 6 months of experiment. Returned with 10.10 having it as a virtual machine using a Win7 host. Migrated all my development projects inside the virtual machine. In 11.04, after acquiring a second HDD, I decided to make the transition to full Ubuntu usage except for ganimg. Now I am happily using 11.10 with Unity, and I am really satisfied with the way Ubuntu has turned out to be. I think that even if it hasn't reached full maturity, it's a solid and very robust OS. Just love it.Good luck with your transition.

October 10th, 2015 at 5:30 PM

noob says:

i have used the all_generic_ide boot parameter to detect the ata controler and the hard drives on that cable but and got the install to complete on those drives but on restart i get a default catch 300 any ideas

October 15th, 2010 at 2:15 PM

Slashback says:

I never have figured out how to access the other hard drives, though not for lack of trying. In my case it was not important as I wanted to have Panther and Tiger on the other drives, and I can always share information via other computers on my network.

However, I have long thought that I should buy a faster hard disk controller if I really wanted to use the Yikes! effectively. I imagine this would change things a good bit, but especially make everything run more smoothly.

Sorry I don't have a solution for you.

October 15th, 2010 at 11:55 AM

noob says:

great blog on the yikes i used it to install lucid on yikes but cant figure out how you got the other drives working some help would be cool

October 15th, 2010 at 9:47 AM

Add your comment

Name:
Email: (Will not be displayed - Privacy policy)
Website:
Comments:
  random image I can't read it!
Give me a different one!
Verify Post: Input the text from the image above to verify this post (helps prevent spam)
 

« Blog Home


“What do you tell them?”
“To be captains of their own fates.”
“Profound.  Who’s going to be the crew?”
John & Claire, Artifact, Gregory Benford