Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

pipetogrep

macrumors 6502
Original poster
Jan 27, 2021
349
500
Hi all. I'm setting up this post because I'm tired of Googling around every time I want to dual boot NetBSD and OS X on my iBook G4. Here are the steps I'm using. Adapt it to your needs. Your mileage may vary.

Preparation​

  1. Boot from some an OS X install disk
  2. Run disk utility
  3. Create 3 partitions. Use the default file systems. The NetBSD ones will be dealt with later.
    1. OS X
    2. NetBSD root
    3. NetBSD swap
  4. Install OS X to the OS X partition you created.
  5. Boot into OS X and insert the NetBSD CD.
  6. Copy ofwboot.xcf from the root of the CD to the root of the OS X drive.
  7. Copy macppc/binary/kernel/netbsd-GENERIC.gz from the CD to the root of the OS X drive. Rename it to netbsd.gz.

Installation​

  1. Boot from the NetBSD CD.
    1. Reboot into Open Firmware with Cmd-Option-O-F.
    2. Type boot cd:,ofwboot.xcf netbsd.macppc and press enter.
  2. Drop to the shell
  3. Run pdisk /dev/wd0
  4. Change the types for partitions 3 & 5 to Apple_UNIX_SVR2, using one for root, and swap for the other. Be sure to name the partitions "root" and "swap" as well respectively.
  5. Save a quit the partitioner then exit the shell.
  6. When asked about terminal type accept the default.
  7. Enter "I" for install
  8. Select "Install NetBSD to hard disk"
  9. Follow the prompts until you get to "Available disks". Choose wd0.
  10. Next, select a: Use existing disklabel partitions
  11. Select the partition that has FS type: FFS. Press enter and set newfs to, mount to "yes", and mount point to "/".
  12. Select Partition sizes ok then Yes.
  13. Got through the rest of the netbsd install and then reboot into open firmware again. Then enter these commands to get NetBSD to boot by default.

    Code:
    setenv boot-device hd:,\ofwboot.xcf
    setenv boot-file netbsd.gz
    setenv boot-command ." hello" cr " screen" output boot
    reset-all

OS Switching​

To boot into OS X instead, hold option on boot and select it. Otherwise, let it boot into NetBSD by default.

That's all!
 
I want this, but CD drives in my PowerBooks are broken. Booting from a FireWire flash drive does not work.

Any idea how to accomplish that?
 
Get something like Zalman VE-200?

Well, that is doable, but there must be some way without getting another piece of hardware just for a single use? :)

I managed to install OpenBSD by throwing their boot kernel onto macOS partition and using that. I think it failed with NetBSD when I tried.
 
Ta for this install process description, pipe.
Gonna give it a try on my iBook G4.

I've already had the HD setup with three partitions with Sorbet on the third as the start up.
Not sure if there will be a prob with that reverse order arrangement but I'll just do a re-do with sorbet on the first if need be.

I've downloaded the current ISO (10 ..I think it was.) and my iBooks CD burner still works so will let ya know how it goes.
 
  • Like
Reactions: pipetogrep
Ok - Ive hit a prob at:
boot cd:,ofwboot.xcf netbsd.macppc and press enter.

after which I get a section list
loading .text, done..
loading .data, done..
clearing .bss, done..
NetBSD/macppc openfirmware boot, Revision 1.14
openfirmware running in virtual_mode
open netbsd.macppc no such file or directory.

I cant figure where this file may be.. but Im 72 so human error is highly likely. LOL.

(I did have a small glitch with the iso file with a 'no mountable file systems' but that seem to disappear so burnt the CD with out error..)
 
  • Like
Reactions: barracuda156
Ok - Ive hit a prob at:
boot cd:,ofwboot.xcf netbsd.macppc and press enter.

after which I get a section list
loading .text, done..
loading .data, done..
clearing .bss, done..
NetBSD/macppc openfirmware boot, Revision 1.14
openfirmware running in virtual_mode
open netbsd.macppc no such file or directory.

I cant figure where this file may be.. but Im 72 so human error is highly likely. LOL.

(I did have a small glitch with the iso file with a 'no mountable file systems' but that seem to disappear so burnt the CD with out error..)
  1. Copy ofwboot.xcf from the root of the CD to the root of the OS X drive.
  2. Copy macppc/binary/kernel/netbsd-GENERIC.gz from the CD to the root of the OS X drive. Rename it to netbsd.gz.
Hey there. Please try the steps above.
 
@mortlocli sorry, my mistake. You are booting from the CD and my previous reply would not apply there.

Which model Mac are you doing this on?
 
Yep..I did that, pipe - but to ensure I understood and followed your instruction correctly :

That means copy straight to the drive directly - not into any sub directory or folder so when looked in the drive there are the folders with both those files along side ?
 
It could that glitch at the beginning ' no mountable file systems' with the iso is still causing a prob ??
 
I’m just guessing but shouldn’t the kernel be named netbsd.macppc to match boot cd:,ofwboot.xcf netbsd.macppc?
Im biy of a thicko re some computing stuff - so wot would the kernel file likely be named..so I know wot Im looking for.

Im thinking I should burn a new CD ..but my CD supply is down to two..with no known local supplier.

Haven't got on to it:
Ive been a bit distracted with trying to sort other computing stuff - an Imac that refuses to turn on wifi, and Haiku-os that with an update stopped an atom netbook track pad from working.
 
oh - I must have downloaded the wrong iso - looked in the kernel folder and theres
netbsd-POWERMAC_G5.gz - no sign of netbed.macppc

thats if Im looking in the right place?
oh wait - this is in the macppc/binarykernel/folder - but theres netbsd-Gerneric as well...so guess thats right.
 
success..to some degree.!!

I can now log in to a # prompt.
I guess I now have to learn BSD cli to take it any further?

..message in postfix:
'..empty hostname
unable to use own host name'.

Pipe - I consider this an exploratory attempt..so a redo will be more familiar second time around.

I had an issue with 5. quit partitioner, but when to quit the shell I couldn't - exit, quit, help, etc - unknown.. so did a forced reboot to beginning.
 
@barracuda156 I got the installer to boot from an external FW drive. Here is what I did.
  1. Download the ISO file from http://wiki.netbsd.org/ports/macppc/
  2. Plug in the FW drive.
  3. Get the drives disk number from Disk Utility. On mine it is "disk2"
  4. dd the ISO to the external FW drive. On my system it looked like
    Code:
    sudo dd if=NetBSD-10.0-macppc.iso of=/dev/disk2 bs=1m
  5. Plug the FW drive into the machine to receive NetBSD then boot it into open firmware mode.
  6. Run "dev fw ls". In my case the result was
    Code:
    0 > dev fw ls
    ff9d1040: /node@00b8cc143464243
    ff9d1268:    /sbp-2@4008
    ff9d14e0:      /disk@0
    ok
  7. Use that to assemble the boot path.
    Code:
    boot fw/node@00b8cc143464243/sbp-2@4008/disk@0:,ofwboot.xcf netbsd.macppc
I was able to boot fully into the installer. I have not yet tried doing an install as I want to keep my system as is, but I'll back it up and give it a go soon.
 
where as Ive been having fun trying to get wifi working (I must say Im typing in instruction without knowing wot it means half the time..lol.)

my last attempt is following this:
'
dhcpcd=YES
wpa_supplicant=YES


/etc/wpa_supplicant.conf:


ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel


network={
ssid="myssid"
psk="mypassword"
}'

..at here:

..but with trying different ways, I keep getting a syntax error at the last closing "}":
' "}" unexpected.'

My brain is feeling fried after trying to sort a prob in Haiku-os ..so the error is very likely right under my nose !!! But tomorrows another day ?
 
where as Ive been having fun trying to get wifi working (I must say Im typing in instruction without knowing wot it means half the time..lol.)

my last attempt is following this:
'
dhcpcd=YES
wpa_supplicant=YES


/etc/wpa_supplicant.conf:


ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel


network={
ssid="myssid"
psk="mypassword"
}'

..at here:

..but with trying different ways, I keep getting a syntax error at the last closing "}":
' "}" unexpected.'

My brain is feeling fried after trying to sort a prob in Haiku-os ..so the error is very likely right under my nose !!! But tomorrows another day ?
Remove the single quote after the last curly brace.
Edit: NM. I see now that you were quoting you file. I will take a look a bit later, though.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.