Monday, March 12, 2012

Installing Debian Linux on PPC Part I - Pre-Installation

[4/24/15: Updated for Jessie 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, Lubuntu, and Ubuntu MATE--but I'm going straight to the source and installing Debian. In fact, I'm gonna go for a custom install using Openbox as my window manager for a faster, leaner system, and also because this kind of build-from-the-ground-up approach is a great way to learn Linux. So let's get to it!

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

The first thing to do is backup your data because you'll be reformatting your 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 (or Disk Utility if you're booting an OS X disc). Next, select your hard drive from the list and click "Initialize...", then click "Custom Setup..."

How many partitions to create for dual-booting? At least two, but I'm choosing three, one for Debian, one for Mac OS 9, and one as a sharing partition (if you intend to install Debian alone, you can choose 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 sharing partition I can access 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 sharing partition easily writable between both systems (Somewhat related, there's this Lifehacker tutorial on symlinking your OS X home folder into your Linux home folder for shared access on the same computer).

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" for the filesystem type (I suppose it doesn't matter which type since you'll be deleting that partition in the Debian installer later). Then set the sizes of your OS 9 and sharing partitions and choose HFS Plus for 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 with 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 will conflict with the Linux bootloader.

Once I was done, I had three partitions, 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). 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 gives you rock-solid stability, Testing is a bit more adventurous, and Sid is the bleeding edge, may-make-your-system-fry choice. The Stable branch netinstall ISO can be found on this page, and the Testing installer can be downloaded here (for both, choose the ISO ending in "...powerpc-netinst.iso"). If you have to ask how to install Sid, you probably shouldn't be using Sid.

The only thing left is to burn a disc or make a USB stick. People say to burn 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 is 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

23 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. no wifi even though I have installed all b43 related stuff
    i have bcm4360 rev 3

    ReplyDelete
    Replies
    1. Hmm. Does "sudo iwconfig" return anything?

      Delete
  11. Does not work on a iMac g5 .
    After the install I get a black screen.
    I get only nouveau errors . Debian is total shit . Waste of time.explain in detail what to do to get a full working GUI .

    ReplyDelete
  12. Get only a black screen with Debian on a iMac g5 ! Very frustrating . Waste of time.i have nvidia geforce fx 5200 .debian does not support it !get only nouveau errors.what wrong with it?

    ReplyDelete
  13. Hi, to start; your blog is THE BLOG to get Debian on ppc machines running!
    But i have choosen to go with Debian LXDE (openbox was a mess) and this is running very nice on a Powerbook G4 Aluminium.
    Everything works except two annoying things:
    1. On boot, screen is black, so everytime i have to push the brightness keys to see Lightdm and login.
    2. Super key swap isn't working after reboot.

    For the two i have tried .Xmodmap, Xlsession, sys and so on, searched the internet like crasy.

    This are no big problems for such old machine and sure for me, but i am preparing this computer for my mom and on her age it's too difficult to handle this. But she's willing to try Linux. ;-)

    I know old post, but i hope you can help.

    ReplyDelete
    Replies
    1. Hi,

      Sorry I waited so long to approve your comment. I get email alerts for new ones, but I didn't see yours for a few days.

      The black screen problem is a bug I couldn't find a way around (other than pounding the brightness keys).

      If you already tried the below method for super key swap, then I don't know what the problem could be. It worked for me after reboot.

      https://wiki.debian.org/PowerPC/FAQ#Can_I_.22reverse.22_my_Command_and_control_keys_like_on_a_Mac.3F

      Delete
  14. There is info out there you just have to look for it! I have a 2 g4's one with kubuntu and one with lubuntu and everything works even wifi

    ReplyDelete
  15. Thomas de MontaigüeFebruary 22, 2019 at 6:23 AM

    Hi Dan!
    I'd like to use a PowerMac G4 Cube as an owncloud server. First step is installing Debian 8 (Jessie) but I do not see any powerpc flavor there:
    http://www.debian.org/distrib/netinst
    I guess now it links to Debian 9.

    Do you know a place to download Debian 8 powerpc install image from ?

    ReplyDelete