[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Detailed notes: How to boot and install Debian from a USB stick on a PowerPC Mac




Here are my notes from recently installing Wheezy on a couple of G4 Power-Mac machines, including a G4 "mini".

Comments are welcome!

Rick

-------------------------------------------------------------------------

Your details may vary, such as the device name assigned to your
USB-stick by the OS and the name of the iso file...

Download the PowerPC installer ".iso" file in the normal way from

    http://cdimage.debian.org/cdimage/

You can use a browser, wget, jigdo, bittorrent, or whatever suits your
fancy.  I have used the "businesscard", "netinst", "CD-1", and "DVD-1"
isos successfully.

Copy the iso to the USB stick:

    dd if=debian-testing-powerpc-netinst.iso of=/dev/sdd bs=1M; sync

Be careful! If you get this wrong, you can over-write your hard
disk and lose data. One way of checking is:

    ls -l /dev/disk/by-id/

You may see (among lots of other stuff) a line like this:

    usb-Generic_Flash_Disk_1514C017-0:0 -> ../../sdd

If you have multiple USB sticks plugged in, you will probably have
several of these lines.  You can cross your fingers and guess, or you
can use a heuristic such as: Get the listing before and after plugging
in the stick; then compare the two listings; anything new belongs to
the new stick.

Now, plug the USB stick into a port on the Mac you plan to install.
It's best to use one of the built-in ports, rather than going through
an external hub.  The Open Firmware ("OF") magic to make it boot from
the stick is easier that way.

Boot the Mac while simultaneously holding down the <cmd/Apple>,
<opt/alt>, O, and F keys (It's not easy! Yes, it takes both hands to
do this.  It helps to have a friend push the power button on the Mac
while you have both hands tied up with the keyboard.) When you get to
the OF welcome message you can do as it says, and release the keys.

At the OF prompt, type

    dev / ls

You will get a tree structured list of devices that Open Firmware is
prepared to deal with.  Somewhere in that list will be something like
this:

    /pci@f2000000
      /usb@18
        /disk@1

There will be other stuff interspersed between the three lines you
see, but the indentation tree-structure will be like that shown above.
The addresses (numbers) after the @ will vary from machine to machine.
Just note what's there on your machine because you'll need it in a
minute.

What this is saying is that the machine has a "disk-like" device
connected to a USB port that is in turn connected to a PCI slot on the
motherboard.  Even if your machine is a Mac-mini or a laptop with no
actual PCI card slots, there is a PCI interface chip somewhere on the
motherboard that looks (to the CPU) like a PCI card slot.

Now, at the OF prompt, type:
    devalias

You'll get a long list of device locations and short names (aliases)
for them.  Somewhere in that list will be something like this:
    usb0 /pci@f2000000/usb@18

What that says is that you can use "usb0" as the alias for the USB
port you have your stick inserted in.  It may be "usb1" rather than
"usb0" and if your Mac has lots of USB ports, you may see others as
well.  Pick the alias that matches the tree structure you found above.
Once again, the addresses (numbers) for your machine will probably be
different.

Finally, at the OF prompt type:
    boot usb0/disk@1:2,\\yaboot

What that tells OF to do is this: Go to the second partition on the
USB disk (the ":2") and search for a file called "yaboot".  Load that
file and pass control to it.

And one last time -- this is just an example.  You should tailor what
you type based on what you saw in the previous steps; the addresses
(numbers) for your machine may well be different from the above.

After a few seconds, you will see the familiar welcome message from
the installer.
    "Welcome to Debian GNU/Linux...!"

You may also see a message:
    "WARNING: Bootstrap partition type is wrong: "Apple_HFS"
              type should be: "Apple_Bootstrap"

You can ignore this message.  I'll be submitting a bug report, but as
far as I can tell, it does no harm.

Choose the appropriate installer for your Mac.  Install and enjoy!

Appendix:

Problems I have encountered in the past that may have gone away in
recent releases:

1) Sometimes when the installer searches for the installation CD, for
some reason it gets it wrong.  For example, when I was installing the
Wheezy Beta-1 DVD-1, the installer decided to mount /dev/sdd1 (the
Apple partition map) on /cdrom.  When it did that, it got read errors
trying to copy the .deb files off the "disk".  I had to go to the
<alt>-F2 virtual console to unmount it and mount it properly without
the partition number:

    umount /cdrom
    mount /dev/sdd /cdrom

2) If you have a PCI card installed on your machine to give you extra
USB ports, or you decided to use a USB port on a hub, you may not find
an OF alias for the USB port your stick is inserted in -- suppose, for
the sake of example, that devalias showed "usb0" above pointed to a
different port than we wanted.  It turns out that we don't actually
need an alias; we can always type the full path to our disk.  In this
case, we would type:

    boot /pci@f2000000/usb@18/disk@1:2,\\yaboot

This is longer and more tedious to get right, but it accomplishes what
we need.



Reply to: