Monday, March 12, 2012

Installing Debian Linux on PPC Part I - Pre-Installation

(UPDATED for Wheezy Stable)

I've been meaning to do this for awhile, so I've finally gotten around to giving you my thoroughly complete guide to installing Linux on your old iBook, Powerbook, Mini, or Power Mac. This will be an epic told in five parts: Pre-Installation, Installing the Base System, Installing the GUI, Configuring Stuff, and Bugs & Quirks. There are a few distributions out there that already do much of the work for you--MintPPC, Ubuntu, and Debian's default desktop install. But I thought I'd put up a guide for a more custom install, in this case using Openbox as the desktop environment, for low memory systems or if you just want to build your system from the ground up. But even if you're planning to go with Debian's default desktop or MintPPC, you should still find the info here useful and hopefully it'll save you from some serious hair pulling. So let's get to it!

For this install I will be dual-booting Debian and Mac OS 9 on an iBook G3 with 256 now 640 MB of RAM. If you want to dual boot OS X, the same basically applies, and also, though this guide will be laptop-centric, most of the steps here apply to desktops, too.

The first thing you want to do is backup your data because you will be erasing the hard drive in order to repartition it. After you've backed everything up, boot your computer with an OS 9 (or OS X) installation disc by inserting it and pressing the "c" key. Then, find the Utilities folder and run Drive Setup (Disk Utility if you're booting from an OS X disc). Next, select your hard drive from the list and click "Initialize...", then click "Custom Setup..."

Now, how many partitions do you want? At least two, but I'm choosing three, one for Debian, one for Mac OS 9, and one as a sharing partition (if you only intend to install Debian alone, you can just set up one partition). The reason for three? Though your Mac partitions are visible in Linux, your Linux partition is not in OS 9. So I like to have a shared partition that I can use to access my media files from both systems. Also, OS X's journaled filesystem will only mount as read-only in Linux, and mounting Linux partitions in the OS X Finder can be a pain, so again, you may prefer having a shared partition easily writable between both systems (somewhat related, there's a tutorial on sharing the same home folder between Linux and OS X here Scratch that. I noticed there were hidden folders in my OS X home folder that could conflict with hidden Linux folders of the same name. Try this symlinking method instead.).

Back to Drive Setup, I'm choosing three partitions, then choosing their sizes and filesystems. The first (top) partition on the table must be your Debian partition. Choose the size, then choose "Unallocated", or really it doesn't matter which filesystem since you're going to erase this partition later in the Debian installer. Then set the sizes of your OS 9 and shared partitions and choose HFS Plus as their filesystems. OS X users running Disc Utility will want to choose "Mac OS Extended (Journaled)" for their OS X partition and "Mac OS Extended" for any OS 9 or sharing partitions. Also, if you're triple booting OS 9 and OS X, put them on separate partitions. If they're on the same one, they'll need the native Mac startup disk chooser to know which to boot, and that'll conflict with the Linux bootloader.

Once I was done, I had three volumes, one unallocated, one for OS 9, and one for sharing data between systems. From there, I initialized the disk and saw the two HFS Plus partitions show up on my desktop. Now you can install OS 9 (or OS X if that's what you're doing). You must install the Mac OS first, before Debian, because Mac system installers don't play well with Linux systems already on disk. Reboot and check that everything works, and now you can proceed to the one step missing from all this--getting the Debian install disc!

So go over to Debian.org and find an ISO to download. There are three branches to choose from: Stable, Testing, and Sid (unstable). Stable is generally for newbies and servers, Testing is for somewhat experienced desktop users, and Sid is the bleeding edge, may make your system fry choice. Usually I install Testing, but since as of this writing Wheezy just turned stable, there's not much difference yet between the Stable and Testing branches, so I'll stick with Wheezy. My preferred installer is the network install disc. It's about 200 MB and burns to a single disc, and it also requires a network connection. Go to the Network Install page and download the powerpc netinst.iso (the Testing netinst.iso can be found on this page).

The only thing left is to burn the disc. People say to burn it at a slow speed since Linux install discs can be fickle, so when in Rome...

One more note, a longstanding bug in the Debian installer messes up Apple driver partitions and will temporarily make your OS 9 partition unbootable (OS 9 only, doesn't affect OS X partitions). There's a simple fix for this, however, that will be detailed in Part V - Bugs & Quirks.

I'll see you in our next episode, "Installing the Base System".

Part II - Installing the Base System
Part III - Installing the GUI
Part IV - Configuring Stuff
Part V - Bugs & Quirks

16 comments:

  1. I've been running Ubuntu on my G5, 1.8gz dual core. It was very easy to install and it's been great for my work machine. However, there's no Dropbox support on PPC. I'm planning to install Tiger on it this weekend. I know I can always go back to Ubuntu if I don't like it.

    ReplyDelete
    Replies
    1. Why don't you install Leopard?

      P.s. Im trying to install Debian in a G4 PowerMac sawtooth 450Mhz/896mb/Geforce2Mx

      Delete
  2. So far I haven't felt like shelling out the money for a copy of Leopard ($130 from Apple and higher than that on EBay lately). I did get Tiger installed and am able to use a VPN and remote desktop for my job. I have workarounds for syncing my iPhone. I just installed Apple Works on it and I am so impressed. The are few applications that load this fast.

    I just don't get Apple. They routinely make good hardware obsolete ( take all those Apple printers left behind by OS X, just because they wouldn't support the old style printer ports.). My boyfriend can run XP on his Emachine and still install current software on it. But my G5 should go to the dump I guess. If you look at the abandon ware sites, those programs will do 99% of the things people use computers for. The sole reason for all this continuous upgrading is to support streaming on the web. Things will get even more interesting when Win8 is being pushed. Lots of folks will rebell on that one.

    ReplyDelete
    Replies
    1. Leopard didn't cost me anything ;0

      Delete
    2. And for the love of god don't throw away your G5!... just wait a few more years... html5 will replace flash, and youll have video streaming just fine, tiger or ubuntu or whatever you want.

      Delete
  3. Dude... I would love to know how this works (or if it even could work)with Xpostfacto? I would like to dual boot tiger and debian wheezy on a g3 lombard...

    ReplyDelete
  4. First time poster here at your blog --- please keep it up! I'm enjoying the reads.

    ReplyDelete
  5. where do u get a installation disc?! >_<

    ReplyDelete
    Replies
    1. You can download the powerpc one under the Small CDs section here:

      http://www.debian.org/distrib/netinst

      You can also buy full installation CDs from vendors found on this page:

      http://www.debian.org/CD/vendors/

      Not all of them have powerpc CDs, though.

      Delete
  6. Greetings:

    I'd like to know what's the most advanced Linux I can use with a PPC machine to revive several hand-me-down old PPC Mac laptops dumped on us. I'd like to revive them without having to (arduously!) replace their dead HD's via booting Linux up by CD. I know there's a MintPPC11 project somewhere but don't know whether they whithered away or whether there're other like projects out there. I'd be awesome to run Puppy or any other Linux on these older machines so if you have any info on such please let me know!

    Thanks!

    Jim in NYC

    ReplyDelete
    Replies
    1. MintPPC is still there and installs Debian Wheezy (Stable) with a Mint-like interface. Over the years, there were attempts to get PuppyPPC going, but they were never completed. I don't know if any work is being done on that right now.

      Delete
  7. Dan,

    I can't thank you enough for writing this comprehensive, accessible and well-written guide. I have sentimental attachment to my old eMac and Linux will help me keep it going strong and secure. I'm a noob (as noob as noob can be), but I'm curious and eager to learn. To get started in the Linux world, I picked up an iBook G4 on eBay for $45 and installed Debian with LXDE (I need to digest your Openbox configuration pages before I dive in there) - it is a great little system to experiment with. So far I'm very impressed even though the iBook is short on RAM (though not for long - gotta love eBay).

    One question - is there a particular user-group site or other online community that you would recommend as a resource? One that might be a touch patient with a noob who has read the man pages but needs some guidance? I would appreciate your opinion.

    Thank you again!

    John M.

    ReplyDelete
    Replies
    1. I can't think of one user group that's about Linux PowerPC as a whole. Rather, there are forums for specific distros, like MintPPC. They're based on Debian and an LXDE desktop that's made to look like a Mint distro. Ubuntu's Apple forums are also worth a look, and the Ubuntu PowerPC FAQ is probably the single best PowerPC resource out there. I wouldn't recommend the Debian forum, though. They tend to attack noobs. It's sad but true.

      As far as general Linux resources, you can get a lot of knowledge from Arch Linux wikis and the Crunchbang forums.

      Delete
  8. Hi Dan,

    Thank you for this terrific write-up. I couldn't have done it without the excellent information you've given here. This is the only place that has detailed install instructions that's put together so a simple person can understand it. I just wanted to let you know that you've prolonged the life of a friend's iBook G3 Clamshell that's now happily, albeit slowly, surfing the web with IceWeasel. It's definitely usable on non-Flash intensive websites. I was able to download an image and import it into a Libre Office document without much fuss. It works great for word processing and reading e-mails.

    After I installed Wheezy on my friend's iBook, I decided to try an install on my own 1.67Ghz Powerbook G4. It's now dual-booting Leopard and after some tweaks, it's running great. Sadly, I've discovered that Flash does not work very well, if at all, on PPC Macs and a lot of the fun sites require it. I think there's going to be a day when I'll no longer be able to run little hacks on Safari to keep it usable for streaming music from Pandora or Rhapsody. When that day comes, I think I'll revisit Linux to see if I can keep this PPC Mac going.

    Thanks again Dan!

    David

    ReplyDelete
  9. ...hmmm, does this "Luddite" word in the title of the blog suggests some future port of AntiX 13.2 "Luddite" to PowerPC_64 architecture... \o/ :) <(")

    drGspot...interesting faceThread...:
    https://www.facebook.com/photo.php?fbid=10203957280348275&set=a.4461493851370.2178403.1110410845&type=1&comment_id=10203960020216770&offset=0&total_comments=11&ref=notif&notif_t=photo_reply
    http://mylinuxexplore.blogspot.com/2013/07/antix-131-luddite-review-superb.html
    http://www.everydaylinuxuser.com/2013/12/give-that-old-computer-boost-with-antix.html
    http://www.linuxzasve.com/antix-13-1-luddite-ne-unistavajmo-stari-hardver

    ReplyDelete
  10. I really appreciated with your content and completely agree with you, here also I was visit a company website which is like you tinteoffice for computer parts and etc.

    ReplyDelete