Page History
All Pages
Browse Files
Search
You're not reading the latest revision of this page, which is here.

Debian 12 on G4 Macs in 2025

Installing Debian 12 "Sid" on G4 Macs was apparently, at one point, very easy. Unfortunately, that is no longer the case. I remember several years ago installing 10 on my iBook G3 without too much hassle, but definitely some hassle. I happened upon an old ActionRetro video where he installs Debian 12 Sid on an iMac G4, and he described it as having "just worked," so I tried on my newly acquired PowerBook G4, and, well, it was anything but easy.

Acquiring install ISOs

The Debian website is designed to test your sanity. Even googling "Debian Ports 12 powerpc ISO" could not get me to what I needed. I couldn'd find any links to debian-ports in the debian documenatation, anywhere.

You need the cdimage.debian.org ports directory. You have two basic options:

  1. Use the current installer: go to /current and download the powerpc ISO (direct link). This one mostly "just works," IF your hardware is compatible; as of February 4, 2025, a 2004 iBook G4 works, but a 2003 PowerBook G4 does not
  2. Use the stable installer: go to /stable/powerpc and download the ISO (direct link). This one works on the PowerBook G4, and possibly others, but you will need to manually intervene to fix APT.
  3. Use a snapshot installer: the `/snapshots` directory lets you pick a specific version. The newer it is, the fewer updates you will need. Nothing after 2023-06-18 works on the PowerBook G4 12" as of Feb 4, 2025. The latest snapshot is just the /current version.

Booting from USB

You can of course burn the installer to CD, and old Macs are pretty reliable at booting from CD. You can also boot from USB on G4 Macs, though.

From linux, use gnome-disks or dd (or whatever you use) to write the CD image to a USB drive. Boot the Mac while holding Cmd-Opt-O-F to boot into OpenFirmware. Depending on which USB port you plugged into, you will need one of these commands:

boot usb0/disk@1:3,\\:tbxi

or

boot usb1/disk@1:3,\\:tbxi

Does anyone know what tbxi means? email me or something.

Installing

The best sequence of events if you're dual-booting is

  1. Partition disk (1 OS X partition and the rest as empty space, ideally, or make a placeholder Linux partition which we'll delete)
  2. Install OS X
  3. Install Linux, let it create its own partitions

Wifi

Wifi won't work in the installer. As long as you connect Ethernet, then everything works pretty well. I have not worked out how to include the Wifi firmware on an "external disk" for the installer to use - placing it on a second partition on the boot USB does not work, unfortunately. That is all that I tried.

Partitioning

As mentioned, have your OS X/OS 9 partitions already created and the OSes installed. It is best to lave a large unused area on the HD, and then when prompted for partitioning, choose "Manual" and then "Automatically use free space." If you made a placeholder Linux partition, delete it first.

You should end up with:

256MB   HFS     /boot/grub
XXXGB   ext4    /
XGB     swap    swap

It's important to have /boot/grub on an HFS partition.

APT GPG keys

The problem, if you're using an older-than-current installer, is that you won't have the up-to-date APT GPG keys to run apt update. Without the up-to-date keys, the installer breaks when trying to find a package mirror. Theoretically you could install a base system and fix this afterwards, but it's easier to do it now.

When you get to the "Select a Debian mirror" phase of the install, it will ask you to select a mirror from the list by country, or to enter one manually. Don't do either just yet. Switch to a different TTY with Fn-Ctrl-Opt-F2 and then hit Enter when prompted.

You'll need to determine the URL for the up-to-date keys package. Right now, it is http://ftp.ports.debian.org/debian-ports/pool/main/d/debian-ports-archive-keyring/debian-ports-archive-keyring_2025.02.01_all.deb but as you can see the date at the end will increment each month. So you can navigate to http://ftp.ports.debian.org/debian-ports/pool/main/d/debian-ports-archive-keyring/ and look up the right filename.

On the Mac, from your new terminal, run:

1
2
3
4
5
cd /target
wget http://ftp.ports.debian.org/debian-ports/pool/main/d/debian-ports-archive-keyring/<filename you found>
chroot /target
dpkg -i <filename you found>
exit

then hit Fn-Ctrl-Opt-F1 to go back to the installer. Select "enter a mirror manually," use HTTPS if asked, and enter:

ftp.ports.debian.org

Things should work from there.

GRUB

Ah, my old arch-nemesis, the worst part of the modern Linux echosystm, GRUB 2. Of course it sometimes fails to work.

If it fails to install, you can try switching to a new TTY (Fn-Ctrl-Opt-F2/F3/F5/etc) and running

1
mount /dev/sdaX /target/boot/grub               # X is the partition number of your boot partition

and going back to the installer (Fn-Ctrl-Opt-F1) and letting it re-run the GRUB installation.

It may say it failed but still have worked: check tty4 (Fn-Ctrl-Opt-F4) for logs; if you see "Install Success" despite other errors saying it failed, you may be able to boot. When the installer fails but you see "Success" in the log output above, choose "proceed without bootloader" and let the installer finish normally. It should warn you about the lack of bootloader, and tell you the boot command you need, something like "/boot/vmlinux root=/dev/sda5 quiet. You should note that instruction, most importantly the partition number (sdaX).

Manually booting GRUB

If you get GRUB installed, but are presented not with a nice menu but a grub> prompt at boot, do not despair. Hopefully, you know your partition numbers. You will want to run the following commands:

1
2
3
linux (ieee1275/hd,appleX)/boot/vmlinux root=/dev/sdaX quiet
initrd (ieee1275/hd,appleX)/boot/initrd.img
boot

where X is your root partition number.

Boot flag

I am not sure, but it may be necessary for your boot partition to be boot flagged. Boot the install CD, choose Rescue Mode, follow the prompts, choose your root partition, and open a shell in the target partition. Run parted, then:

select /dev/sda
list partitions
toggle X boot
quit

where X is your boot partition number, as listed in step 2