LiveUSB on PPC
From Gentoo Linux Wiki
Creating a LiveUSB is a good alternate method to creating a LiveCD. A LiveUSB, like a LiveCD, is good for booting a temporary OS to do system maintenance, install a new operating system...
Contents |
[edit] Requirements
Not all PPC machines will be able to boot a LiveUSB. First, a PPC machine must use Open Firmware. Second, the version of Open Firmware must support recognition of a USB disk.
- Needs more accurate info - Please update. I use an original iBook (1999) with the last firmware update I did was iBook Firmware Update 4.1.7. Do models after this boot ok?
[edit] Linux Name of USB Device
The Linux device name is neededof the USB flash drive to partition, copy the ISO... In the Terminal:
And plug in the drive. This should tell what the device name is in Linux.
Mine is /dev/uba but other common names are {Path|/dev/hda}} and /dev/sda.
[edit] Testing if a LiveUSB will Boot
To test whether a LiveUSB will boot on the system, a direct transfer of a Linux distribution's ISO to a flash drive is least complicated. This method will use the entire flash drive and nothing else will be able to be put on it but it is good for testing.
There are several good choices of Linux distros ISOs. I used Gentoo's Minimal Install CD another good choice is the PPC Rescue CD.
dd if=name.iso of=/dev/uba
Skip to Boot from Open Firmware
[edit] Manually Installing ISO
Manually creating a LiveUSB will create an additional partition that will allow files to able to written to.
[edit] Partition the Disk
Initialize the disk with "i" Enter the value the initialization discovers for the block size of the device. These commands setup the partition map but don't actually write to disk.
Changes to the disk will not be written until the write command "w" is executed and confirmed at the end of this process.
Print the partition map with "p". A partition map has already one partition (Apple_partition_map) that is necessary for the drive to be recognized. Now create a partition where the ISO will be installed.
C # create a new partition with type 2p # second partition GentooMinUSB # name of the partition 60M # size of partition, check the ISO size Apple_HFS # partition type
Extra - The rest of the space can be used to store files on.
c # create a new partition without specifying type 3p # third partition 3p # uses remaining free space. Data # name of partition
To write the partition map and quit
w q
Sometimes there will be glitches. If it freezes up on you (it does at times), unplug the USB flash drive and do the process again.
[edit] Format the Partitions
In Gentoo, the hfsutils package is required to format HFS.
Format the partition where to put the ISO on:
Format the remain partition will be stoging files:
Mount the ISO and USB partition and transfer the files:
Unmmount the flash drive:
[edit] Bless the System Folder
This is an archaic Mac definition but it still applies. Open Firmware looks for a file with a special attribute that defines how the system will boot. The file is called the chrp-script and all PPC ISO's have it but you may have to look for it as it can be called anything.
Define the device/partition the chrp script is on:
Define the folder with the chrp script:
Change to the chrp script directory:
Tag the chrp script and unmount:
hattrib -c UNIX -t tbxi :ofboot.b humount
[edit] Boot from Open Firmware
The most difficult aspect with LiveUSB is failure to get the correct yaboot installer paths for usb.
Restart the system with the LiveUSB connected and boot to the Open Firmware prompt (Apple-Alt-O-F).
Type devalias or dev / ls and look through the device information: Find the USB devices and find one with that appends "disk".
Example:
usb0 /pci@f2000000/usb@1/disk1
If the usb devices don't list "disk" then Open Firmware can't see it and won't be able to boot it.
Open Firmware descriptions can vary a lot depending on the computer being used.
The device can be scanned for files on a device/partition to test if it is the correct device (substitute you device here). Also try different partitions if it doesn't show them:
dir usb0/disk@1,\\:tbxi dir usb0/disk@1,\\:tbxi dir usb0/disk@1:1,\\:tbxi dir usb0/disk@1:2,\\:tbxi dir usb0/disk:2,\\:tbxiTo boot use
Also the full string can be used, though the generic name (usb0, usb1...) should do.
boot /pci@f2000000/usb@18/disk1:1,\\:tbxi
If all goes well the LiveUSB will boot.
[edit] Boot Strings That Have Worked
Please state the computer and model and the boot string that works:
Model - String
iBook - boot usb0/disk@1:1,\\:tbxi
[edit] Troubleshooting
A few tips or workarounds that can help install or boot a USB flash drive on PPC.
[edit] Open Firmware Device Name
If having trouble determining the partition or device name in Open Firmware these might help.
[edit] Look at the device tree:
lshw may also help find USB information:
[edit] Patch ofpath
A patch has been written toI've uploaded the patched ofpath to save time locating the older version of yaboot, patching that version, and then adding the ofpath patch.
[edit] Thanks
Thanks guys for the tips. Sodki, in the Gentoo forums kindly pointed me in the correct direction and gave some good insight. And thanks to pxwpxd in the Ubuntu Forums his patch and detailed explanations.