NetBSD/macppc | build.sh | kernel | models(NetBSD) | models(ki.nu) | Tsubai San | Starting | (English) | sysinst | X11 | kernel | Install in English | mozilla | make build | Open Firmware | sup | StarMax (Diary) | Diary | Links | NetBSD at ki.nu | NetBSD links | ki.nu 全文検索

Starting NetBSD on PowerPC (in English)

(Japanese version to click)

Index | Invoke OF | Open Firmware | Making floppy | Booting floppy | Disklabel | Binary/sets | makedev | Installboot |

NetBSD-1.4 includes macppc. You may find that is more usefull than described here. ftp://ftp.netbsd.org/pub/NetBSD/ NetBSD-1.4/macppc/INSTALL.html

This document describes the way how to install NetBSD on Macintosh or its clone (so called macppc), with PowerPC of 603e, 604e and having PCI bus machine. At the time (1998/12/21), sysinst was not ready. Then we needed following steps.

(Ancient way, not using sysinst), but you may need this when sysinst is not working.

But starting from 1999/01/19 version, sysinst may be available. If you have the Macintosh with internal Ethernet port, the installation may be comprehensive and simple.

(Modern way using sysinst)

The information on this page is NOT the way with sysinst, but the classical method without sysinst.

If you have problem using sysinst, such the case with Tanzania board, PCI Ethernet board with DEC 21x41 chip, you may still need the information here.

A little bit outdated instruction in English may be found at http://www.matematik.su.se/~tege/macppc.txt

Index | Invoke OF | Open Firmware | Making floppy | Booting floppy | Disklabel | Binary/sets | makedev | Installboot |

Life with Open FirmWare

Open Firmware is standarized as IEEE 1275 ( You may need userid/password combination to look at the inside of document ). The price of printed material may be found at http://standards.ieee.org/catalog/bus.html#1275-1994 All the PowerMac and clone with PCI bus have Open Firmware implemented. Booting NetBSD/macppc is done from this OF.
Open Firmware and Boot Variables
http://www.linuxppc.org/userguide/of.html
linux-ppc/INSTALL
Japanese version by Murata San. 2. Booting Linux with Open Firmware.
http://www.y-min.or.jp/~nob/linux-pmac/INSTALL-j.html#part2
Draft for IEEE 1275
ftp://playground.sun.com/pub/p1275/coredoc/1275-1994/
Unofficial OpenFirmware Web Page ( by CodeGen, Inc.)
http://www.openfirmware.org/
The OpenFirmware Source
http://www.firmworks.com/
auto-boot?
if pause at OF or not. My setup is always
auto-boot?          false 
With this setup, Open Firmware promt always comes up and then
by typing following
bye              -> MacOS
boot             -> default boot 
                    (using boot-device,boot-file setup)
boot fd:0        -> floppy boot
boot scsi/sd@4:0 -> booting SCSI id = 4  disk
I could switch various booting
printenv
show current and default value for OF variables.
Sample of printenv command
setenv
set OF variable. Sample to set is
setenv auto-boot? false
booting
For example, type boot scsi/sd@3:0 to boot from disk of SCSI-Id = 3 )
or you may be set following two variables to just type boot.
boot-device
boot-file
BootVars is the utility to setup these OF variables on MacOS. The sample URL for bootvars-1.3a.sit.hqx is:
ftp://top.cis.syr.edu/users/fadushin/bootvars/
In recent linux boom use BootX (http://www.linuxppc.org/bootx.html). But I am afraid NetBSD-macppc does not have the similar utility. If you have problem booting ide disk of G3 machine, you may read http://members.aol.com/mgssuchino/Ga/ and found Multibooter for Rhapsody tool. Actual Multibooter may be found at ftp://ftp.apple.com/developer/macosxserver/UsefulStuff/ Multibooter1.0d13.sit
communicating via ttya (modem port)
In some case convenient, other case you may not need at all for this serial port communication. But if you really starting at very first time, all the session (work) may be logged on other computer if you use serial port console. The clock speed is at 38.4k.

With regular modem cable, Flow controll is activated and RTS (pin 4) on Macintosh side is always low and it is connected to CTS (pin 5) at computer side. This disables to input from computer. You may get following connection.

      Mac side             other computer
(low) RTS     4      +-->   CTS   5            
                     |
      CTS     5   <--+---   RTS   4
Getting Open Firmware directly.
At power on Macintosh, type command + option + O + F gives Open Firmware prompt with input=ttya, output=ttya ( This needs another dumb terminal or emulating computer connected with 38.4k bps speed ).
If you got screen blank out ( and no response at all )
If your Macintosh (or clone) get no reponse with blank out screen, even after power cycle, try type bye first even you won't see anything on black screen.

If you have no luck, then at power on, type type command + option + P + R. If you here double (starting) sounds, it means all PRAM are restored to default, and MacOS should comes up. (This may result Ethernet setting also cleared to localtalk.)

Index | Invoke OF | Open Firmware | Making floppy | Booting floppy | Disklabel | Binary/sets | makedev | Installboot |

Making boot floppy

1.4 release
ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-1.4/macppc/installation/floppy/
Som older version including 19990220
ftp://ftp.netbsd.org/pub/NetBSD/arch/macppc/floppy/
ftp://ftp.jp.netbsd.org/pub/NetBSD/arch/macppc/floppy/
Even older version
http://www.ceres.dti.ne.jp/~tsutsui/netbsd/boot.fs.gz
The format of target floppy is: 80 * 36 * 512 = 1,474,560 bytes

You may have three choice to making boot floppy. Either of these should work. Using Suntar on MacOS is, I believe, the easiest way.

  1. on Macintosh use (SunTar(*) )
    some note at using suntar
    ftp://ftp.jp.netbsd.org/pub/NetBSD/arch/macppc/floppy/ README.rawdisk

    or my Japanese instruction

  2. Macintosh(Disk Copy, on MacOS )
    1. getting Disk Copy 6.1.3 (Sorry, following is with Japanese instruction)
      http://ftp-info.apple.co.jp/reference/disk_copy613.html (404 Not Found)
      ftp://ftp.apple.co.jp/pub/AppleJapan/Macintosh/Utilities/Disk_Copy/
    2. getting boot.fs.img (made from Release-1.4, by suntar + DiskCopy)
      ftp://ftp.ki.nu/pub/NetBSD/NetBSD-1.4-boot.fs.img
      boot.fs.img.hqx (These are too old, not recommended)
      ftp://ftp.ki.nu/pub/NetBSD/powerpc-jp/ boot.fs.img.hqx (no compression 1.9MBytes)
      ftp://ftp.ki.nu/pub/NetBSD/powerpc-jp/boot.fs.img.lzh.hqx (MacLHA(*) format 1.5MBytes)
      Get boot.fs.img on MacOS.
    3. Invoke Disk Copy select "Generate floppy" and you will get "Insert 2HD floppy media". Then you boot floppy will be written.
  3. Linux
    dd if=boot.fs of=/dev/fd0 bs=36k
You may find (*) Sun tar/Mac LHA at somewhere in http://ring.crl.go.jp/ring/softlib/publiclib/ringo/apple/net.htm Or at ( asahi-net)

Index | Invoke OF | Open Firmware | Making floppy | Booting floppy | Disklabel | Binary/sets | makedev | Installboot |

Invoke Open Firmware

If your Open Firmware version is 1.05, you may need screen size 640x480 prior to invoking OF. Relate information is at http://www.linuxppc.org/userguide/of105.html

Several ways to invoke,

Index | Invoke OF | Open Firmware | Making floppy | Booting floppy | Disklabel | Binary/sets | makedev | Installboot |

Booting by boot floppy

With the floppy disk you have written by above procedure inserted, type following at Open Firmware prompt,
>boot fd:0
You decide modem port or kbd/screen combinations.
input-device ttya
output-device ttya
OR
input-device kbd
output-device screen
The mixture of ttya/screen may not work.

Index | Invoke OF | Open Firmware | Making floppy | Booting floppy | Disklabel | Binary/sets | makedev | Installboot |

disklabel and newfs

Partition SCSI disk and File system initialization.
We have disklabel for partitioning disk. But it may no be so usefull if vi editor is not available. Instead, preparing /etc/disktab in single user mode, (by cut and pasting to cat > /etc/disktab )
and use following command line. disklabel -w sd0 'Disk Name' My example for disktab is here.

Index | Invoke OF | Open Firmware | Making floppy | Booting floppy | Disklabel | Binary/sets | makedev | Installboot |

Getting binary/sets on your disk

macppc/Release 1.4

ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-1.4/ macppc/ binary/ sets/

macppc/snapshot(New)

ftp://ftp.netbsd.org/ 19990620/binary/sets/
ftp://ftp.dti.ad.jp/ 19990620/binary/sets/
To get network interface to communicate,
ifconfig de0 ip_address ( for DEC 21040 )
ifconfig mc0 ip_address ( internal Ethernet = mace controller)

If you have NFS server ready (on another machine), it will be
mounted by 
 mkdir /nfs
 mount ip_address:/export/yyyy /nfs

To use CD-ROM, 
 mkdir /cdrom
 mount -t cd9660 /dev/cd0a /cdrom 
You read iso 9600 format CDROM.
(In above example, the name /nfs, /cdrom are arbitrary)

Then you get your target disk ready at /mnt directory,
for example,  
  mount /dev/sd0a  /mnt
  mkdir /mnt/usr
  mount /dev/sd0d  /mnt/usr 

and you will open the tar files onto that volumes. 
 cd /mnt
 gunzip -c etc.tgz | tar xpf - 

For the minimum requrement to boot NetBSD, you need 
etc.tgz, base.tgz, kern.tgz but even if you open (load)
everything (without X11), you only need about 80MBytes.
From
macppc/19990620     etc.tgz   games.tgz kern.tgz  man.tgz   
                     misc.tgz  text.tgz
                     base.tgz  comp.tgz  
 
for i in /mnt/usr/tar_files/*.tgz
  do
   echo $i
   gunzip -c $i | tar xpf -
   done

Index | Invoke OF | Open Firmware | Making floppy | Booting floppy | Disklabel | Binary/sets | makedev | Installboot |

MAKEDEV

Make device file as decribed below.
cd /mnt/dev
./MAKEDEV all
This may take time, like one or two minutes, be patient.

Index | Invoke OF | Open Firmware | Making floppy | Booting floppy | Disklabel | Binary/sets | makedev | Installboot |

Installboot

cd /mnt/usr/mdec
cp ofwboot /mnt/   # copy boot file onto / of the target disk
sync; sync; sync   # once should be enough but three times for the safety
./installboot -v /mnt/ofwboot bootxx /dev/rsd0a
The name ofwboot copied in above example is arbitrary. You can use any name for that. You may get detailed explanation once you have NetBSD running machine at, /usr/share/man/cat8/*/installboot.0

create /etc/fstab

prepare /mnt/etc/fstab, adjust scsi id, if necessary.
/dev/sd0a   /      ffs  rw 1 1
/dev/sd0b   none   swap rw 0 0
/dev/sd0d   /usr   ffs  rw 1 2
/dev/sd0g   /var   ffs  rw 1 3


booting

sync;sync;sync;reboot
> boot scsi/sd@3:0

Or in case internal scsi drive,
> boot scsi-int/sd@3:0
(These are just examples, don't hung on them too much.)

Others

After booted in multi user mode,
You may still get single user mode because /etc/rc.conf is not modified. Change following line to =YES after you have changed required lines.
rc_configured=NO
Other changes required to run correctly is listed

From now on, the information should not be tied to macppc, but NetBSD generic. Refer generic information at http://www.netbsd.org/
English mailing list for macppc. http://www.jp.netbsd.org/MailingLists/index.html#port-macppc


Last update03/12/08 10:52:55
Count.cgi(since 1999/05/01)