Booting from usb-storage device


Prepare image on usb-storage

1. the easiest way

$ dd if=ppcrcd.iso of=/dev/sda
but you will not be able to put anything else on such device.

2. prepare mac-partitions

like those:
/dev/sda1 Apple_partition_map Apple      63 @ 1      ( 31.5k) Partition map
/dev/sda2           Apple_HFS PPCRCD 122880 @ 64     ( 60.0M) HFS
/dev/sda3     Apple_UNIX_SVR2 Data   880576 @ 122944 (430.0M) Linux native

  format as HFS
$ hformat -l PPCRCD /dev/sda2


  mount destination and copy all files from CD image:
$ sudo mount -t hfs /dev/sda2 mnt
$ sudo cp -a /path/to/cd/* mnt/
$ sudo umount mnt


  set chrp-script atribute:
$ hmount /dev/sda2
$ hattrib -b :ppc
$ hcd ppc
$ hattrib -t tbxi -c TBXI bootinfo.txt
$ humount


  This way you have rest of disk for use under linux.

3. prapare dos partition


  It must be FAT
/dev/sda1		1	1011	501425	b  W95 FAT32


  Format as vfat
$ mkfs.vfat -n PPCRCD /dev/sda1


  Copy all files as they are to this partition.

NOTE 1:


  As it isn't hfs partition you won't be able to call tbxi to boot, you have to specify file manually:
0 > boot usb1/disk@1:1,\ppc\bootinfo.txt
or directly boot yaboot:
0 > boot usb1/disk@1:1,\boot\yaboot

NOTE 2:


  I don't know does all OpenFirmwares have fat support, you can check if your has typing in OF:
0 > dev /packages ls
or under linux:
$ ls /proc/device-tree/packages
and looking for /fat-files .

Now, how to boot

1. connect usb-disk and reboot

2. press Command-Option-O-F (Apple-Alt-O-F) to enter open firmware

3. look for usb* aliases

0 > devalias

4. check for one with usb-disk

0 > dev usb0 ls
 ok
0 > dev usb1 ls
ff9dc2c0: /disk@1
 ok
0 > dev usb2 ls
 ok

5. boot tbxi script, or yaboot

0 > boot usb1/disk@1:2,\\:tbxi

  where:


  usb1/disk@1 is device path


  2 is partition where PPCRCD files are


  \\:tbxi is chrp-script file