Re: I documented 10.1 installation onto a blue and white G3:

Chris Tucker <[email protected]> Sat, 22 Mar 2025 18:16:16 -0700
Newsgroups gmane.os.netbsd.ports.macppc
Message-ID <CAPsZW0h=VUPAsb1gCbhn9Br_ZL4c6xo-yMME1ZXS1vFq36Z84A@mail.gmail.com>
Here's the contents of "config.plist" for the UTM settings that run
MacOS 9. Might offer some clues:

<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version=3D"1.0">
<dict>
<key>Backend</key>
<string>QEMU</string>
<key>ConfigurationVersion</key>
<integer>4</integer>
<key>Display</key>
<array>
<dict>
<key>DownscalingFilter</key>
<string>Linear</string>
<key>DynamicResolution</key>
<false/>
<key>Hardware</key>
<string>VGA</string>
<key>NativeResolution</key>
<false/>
<key>UpscalingFilter</key>
<string>Linear</string>
</dict>
</array>
<key>Drive</key>
<array>
<dict>
<key>Identifier</key>
<string>2</string>
<key>ImageType</key>
<string>CD</string>
<key>Interface</key>
<string>IDE</string>
<key>InterfaceVersion</key>
<integer>0</integer>
<key>ReadOnly</key>
<true/>
</dict>
<dict>
<key>Identifier</key>
<string>0</string>
<key>ImageName</key>
<string>Mac OS 9.1.qcow2</string>
<key>ImageType</key>
<string>Disk</string>
<key>Interface</key>
<string>IDE</string>
<key>InterfaceVersion</key>
<integer>0</integer>
<key>ReadOnly</key>
<false/>
</dict>
</array>
<key>Information</key>
<dict>
<key>Icon</key>
<string>MacOS9.1.icns</string>
<key>IconCustom</key>
<true/>
<key>Name</key>
<string>Mac OS 9.1 (config only)</string>
<key>Notes</key>
<string>Mac OS 9.1

To configure, use the CD/DVD drop-down to select a retail Mac OS 9.1
CD image.  ISO, CDR and uncompressed DMG are accepted formats.

Then boot from the image, install onto the existing virtual HD, and
shut down the guest VM.  Edit this configuration, select the top IDE
drive, and click Move Down.  Save and boot into your new OS.

Some extensions may not be compatible with the emulator.  You can
disable them by holding space during boot and using Extension Manager
to turn them off.

If the VM won=E2=80=99t start, your device may not support the audio sampli=
ng
rate used by the emulator. You can disable sound and try
again.</string>
<key>UUID</key>
<string>4D6EFE89-3FF4-4110-8E05-7FE7A930FE6D</string>
</dict>
<key>Input</key>
<dict>
<key>MaximumUsbShare</key>
<integer>3</integer>
<key>UsbBusSupport</key>
<string>Disabled</string>
<key>UsbSharing</key>
<true/>
</dict>
<key>Network</key>
<array>
<dict>
<key>Hardware</key>
<string>tulip</string>
<key>IsolateFromHost</key>
<false/>
<key>MacAddress</key>
<string>C6:F8:CC:03:A4:E2</string>
<key>Mode</key>
<string>Emulated</string>
<key>PortForward</key>
<array/>
</dict>
</array>
<key>QEMU</key>
<dict>
<key>AdditionalArguments</key>
<array>
<string>-g 1280x720x32</string>
<string>-cpu G3</string>
<string>-usbdevice keyboard</string>
</array>
<key>BalloonDevice</key>
<false/>
<key>DebugLog</key>
<false/>
<key>Hypervisor</key>
<false/>
<key>MachinePropertyOverride</key>
<string>via=3Dcuda</string>
<key>PS2Controller</key>
<false/>
<key>RNGDevice</key>
<false/>
<key>RTCLocalTime</key>
<true/>
<key>TPMDevice</key>
<false/>
<key>TSO</key>
<false/>
<key>UEFIBoot</key>
<false/>
</dict>
<key>Serial</key>
<array/>
<key>Sharing</key>
<dict>
<key>ClipboardSharing</key>
<false/>
<key>DirectoryShareMode</key>
<string>None</string>
<key>DirectoryShareReadOnly</key>
<false/>
</dict>
<key>Sound</key>
<array>
<dict>
<key>Hardware</key>
<string>screamer</string>
</dict>
</array>
<key>System</key>
<dict>
<key>Architecture</key>
<string>ppc</string>
<key>CPU</key>
<string>default</string>
<key>CPUCount</key>
<integer>1</integer>
<key>CPUFlagsAdd</key>
<array/>
<key>CPUFlagsRemove</key>
<array/>
<key>ForceMulticore</key>
<false/>
<key>JITCacheSize</key>
<integer>0</integer>
<key>MemorySize</key>
<integer>256</integer>
<key>Target</key>
<string>mac99</string>
</dict>
</dict>
</plist>

On Sat, Mar 22, 2025 at 5:52=E2=80=AFPM Chris Tucker <[email protected]> wr=
ote:
>
> I just picked 256M coz that's what I have on my real machine :)
> haven't tried other settings. I'm not sure what the RAM max is on this
> sort of older Mac hardware is ... I suspect Qemu may fail if you set
> the RAM higher than what these old Macs actually support ... not sure.
>
> Yes Mac99 machine in the drop-down menu is what I have.
>
> I just tested the mouse on MacOS 9 and with USB set to "disabled" it
> captured the mouse OK after I pressed the "capture input devices" icon
> in UTM. (icon depicts a mouse cursor with rays emanating from it in a
> circle.)
>
> I've not tried mouse use on NetBSD/X11 in Qemu on PowerPC emulation. I
> imagine it works since it works on MacOS 9.1.
>
> Yes sungem iirc didn't work for me, which is why I tried tulip which did =
work.
>
> Speed of the system seems to be quite reasonable, considering it's
> emulating PPC on an M1 with a "single core." With this sort of
> emulation, I'm more impressed it works at all, much less that it runs
> speedily or not. haha.
>
> On Sat, Mar 22, 2025 at 5:35=E2=80=AFPM Andrew Randrianasulu
> <[email protected]> wrote:
> >
> >
> >
> > =D0=B2=D1=81, 23 =D0=BC=D0=B0=D1=80. 2025 =D0=B3., 03:24 Chris Tucker <=
[email protected]>:
> >>
> >> Hello, I am not familiar with netbsd-current and I've never installed =
it.
> >
> >
> >
> > I suspect there might be regression, but not sure if it surfaces always=
, or only on my machine. I see qemu was used for development recently, but =
all my (netbsd/macppc cdrom/iso) builds fail in same way very early.
> >
> >
> >>
> >> I was able to install 10.1 on Qemu (UTM) using one of the config files=
 here:
> >> https://github.com/adespoton/utmconfigs
> >>
> >> If I recall correctly, I used one of the Classic MacOS 9.1 UTM config
> >> files there. This link:
> >> https://github.com/adespoton/utmconfigs/blob/main/Mac%20OS%209.1%20(co=
nfig%20only).utm.zip
> >>
> >> But I had to play around to actually get that to work: Try opening
> >> that config file, then additionally make the following changes to it.
> >> I got the following to work on my Macbook Air M1 running UTM:
> >>
> >> (Make sure have the netbsd 10.1 (or your netbsd-current) ISO "loaded"
> >> in the UTM drive)
> >>
> >> System menu in UTM prefs for the macos 9.1 config file:
> >> cpu: default
> >> cpu cores: 1
> >> RAM: 256megs
> >
> >
> > It dails for me at 270 mb of ram and up on any supported qemu machine .=
... :( 256, 257, 258 and below works ...not sure why.
> >
> >
> >>
> >> Qemu menu:
> >> QEMU Machine Properties: via=3Dcuda
> >
> >
> >
> > I guess this mean -M mac99 machine ....
> >
> > Does mouse cursor works ok for you in this (no usb) configuration? In N=
etBSD or MacOS? It does not for me until I add -icount shift=3D1 but then e=
verything becomes perceptibly slower ....
> >>
> >>
> >> Input menu:
> >> USB support: Disabled
> >>
> >> Network menu: Emulated Network Card: tulip
> >
> >
> >
> > sungem (default) does not work for you too?
> >
> >
> >>
> >> Then try booting it with something like boot cd:,\ofwboot.xcf netbsd
> >>
> >> On Fri, Mar 14, 2025 at 9:18=E2=80=AFPM Andrew Randrianasulu
> >> <[email protected]> wrote:
> >> >
> >> >
> >> >
> >> > =D1=81=D0=B1, 1 =D0=BC=D0=B0=D1=80. 2025 =D0=B3., 05:31 Chris Tucker=
 <[email protected]>:
> >> >>
> >> >> Hope you don't mind that I post it here, in case someone else finds=
 it
> >> >> to be helpful.
> >> >>
> >> >> https://github.com/capagh/NetBSD10.1-B-W-Mac
> >> >>
> >> >> How to install NetBSD 10.1 on a Blue-and-White Macintosh PowerPC G3
> >> >
> >> >
> >> > Thanks for this writeup, I tried to build iso-image out of NetBSD -C=
urrent for mappc using slightly modified instructions, but sadly it does no=
t boot on qemu? Dies early .....
> >> >
> >> > If you have time can you check if -current kernel bootable on real G=
3?
> >> >
> >> >
> >> >>
> >> >> Direct questions or comments to capa150 at gmail.com
> >> >>
> >> >> Contents:
> >> >>
> >> >> Background story
> >> >> Performing a dual-boot MacOS/NetBSD install:
> >> >> How to build an install kernel and a regular kernel for NetBSD 10.1=
/macppc.
> >> >> Preventing caps-lock from freezing a blue-and-white G3
> >> >> X11 with the blue-and-white
> >> >>
> >> >> There are several ways to install NetBSD 10.1 on a Mac. This text
> >> >> describes two of the ways -- one is a dual-boot Classic MacOS/NetBS=
D
> >> >> 10.1 system, and the second is a NetBSD 10.1-only system. There are
> >> >> other methods described in the NetBSD install document.
> >> >>
> >> >> What I used for this install:
> >> >> A Blue-and-White Macintosh G3 with a CD/DVD drive.
> >> >> An IDE hard disk attached to a PCI IDE card such as a Sonnet Tempo =
or
> >> >> Acard/Ahard M6280, M6880, M6860 or M6260 (the =E2=80=98M=E2=80=99 m=
eans it is bootable
> >> >> by a Mac. Otherwise it=E2=80=99s for PCs.) I=E2=80=99ve found the m=
otherboard IDE to
> >> >> be buggy.
> >> >> A copy of MacOS 9 on CD/DVD (to partition the drive using MacOS 9=
=E2=80=99s
> >> >> Drive Setup utility.)
> >> >> A copy of MacOS 8.6 (I like 8.6 more than 9. I used Drive Setup on =
9
> >> >> to partition the disk. Then I installed 8.6.)
> >> >> A copy of NetBSD 10.1 on CD/DVD.
> >> >> (https://cdn.netbsd.org/pub/NetBSD/images/10.1/ titled
> >> >> =E2=80=9CNetBSD-10.1-macppc.iso.=E2=80=9D) (Alternately, skip the I=
SO and just install
> >> >> via FTP.)
> >> >> The macOS X application =E2=80=9CQuickFTP,=E2=80=9D available free =
from the macOS app store.
> >> >>
> >> >> Note: I=E2=80=99ve not tried a SCSI disk on my Blue-and White. I su=
spect SCSI
> >> >> would wholly avoid the problems I encountered. Consider using blueS=
CSI
> >> >> or ZuluSCSI as finding a good SCSI drive is difficult these days.
> >> >>
> >> >> This install assumes the Mac has one hard disk. Be sure to back-up =
any
> >> >> important data before proceeding.
> >> >>
> >> >> It=E2=80=99s important to note the Blue-and-White G3 Macs use Open =
Firmware version 3.x.
> >> >> The install process for Macs that use Open Firmware 1.x or 2.x is
> >> >> different and not covered in this document. Refer to the official
> >> >> NetBSD install notes for more.
> >> >>
> >> >> The backstory:
> >> >>
> >> >> Problem No. 1:
> >> >> My Blue-and-White G3 came with an IDE hard drive attached to the
> >> >> motherboard=E2=80=99s IDE slot. I installed NetBSD 10.1 and it seem=
ed to work.
> >> >> But eventually I noticed a quirk: When issued a "shutdown -r now"
> >> >> command, the system will often state:
> >> >>
> >> >> "...
> >> >> About to run shutdown hooks ...
> >> >> Stopping cron.
> >> >> Stopping inetd."
> >> >>
> >> >>
> >> >> And then it hangs. This is an incomplete shut-down, as there are
> >> >> supposed to be more lines after =E2=80=9CStopping inetd.=E2=80=9D B=
ut at other times
> >> >> it would complete the shutdown process. I eventually found the proc=
ess
> >> >> rndctl -- which is called during shutdown -- would cause the comput=
er
> >> >> to sometimes hang. Rndctl is used for entropy-related work.
> >> >>
> >> >> (See NetBSD Problem Report #59014
> >> >> https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=3D59014 =
for
> >> >> more on this problem.)
> >> >>
> >> >> I determined the problem is caused by the CMD IDE controller chip t=
he
> >> >> blue-and-white uses. This controller is known to be buggy, accordin=
g
> >> >> to the Wikipedia entry on it. https://en.wikipedia.org/wiki/CMD640
> >> >>
> >> >> I resolved the rndctl problem by using a Sonnet Tempo IDE PCI
> >> >> controller card instead of the motherboard controller. Which led to
> >> >> ...
> >> >>
> >> >> Problem No. 2:
> >> >>
> >> >> Although I resolved the rndctrl problem, I gained a new problem.
> >> >>
> >> >> When booting off the Tempo, the Mac would report hundreds of errors
> >> >> when running NetBSD, such as: "wd0: aborted command, interface CRC
> >> >> error" and =E2=80=9Cwd0c: error reading fsbn.=E2=80=9D
> >> >>
> >> >> I believe the problem is due to the netbsd kernel accessing my UDMA
> >> >> IDE hard disk in UDMA mode 6 (ATA/133), but the Blue and White G3
> >> >> specifications indicate the Mac is designed for UDMA mode 2 (ATA/33=
).
> >> >>
> >> >> The Mac can't handle the higher speed and thus complains profusely.
> >> >>
> >> >> I resolved this problem by compiling two custom kernels -- one for
> >> >> installation, and one for regular use. Both are the same as the
> >> >> default kernels except they limit the IDE drive mode to UDMA mode 2=
.
> >> >> (I also changed the console text color to green text on a black
> >> >> background, with white text for kernel messages -- default is black
> >> >> text on white background. Nothing else has been changed.)
> >> >>
> >> >> (See NetBSD Problem Report #59078
> >> >> https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=3D59078 =
for
> >> >> more.)
> >> >>
> >> >> Performing a dual-boot MacOS/NetBSD install:
> >> >>
> >> >> 1. Insert the OS 9 install disc into the Mac. Hold down the =E2=80=
=98C=E2=80=99 key to
> >> >> boot from the CD.
> >> >>
> >> >> 2. Open the =E2=80=9CUtilities=E2=80=9D folder on the disc. Launch =
=E2=80=9CDrive Setup.=E2=80=9D (The
> >> >> version of Drive Setup that comes with OS 9 is required. Older
> >> >> versions will not work, according to the NetBSD install document.)
> >> >>
> >> >> 3. For this example install, three partitions will be used. One for
> >> >> MacOS, one for NetBSD root and usr, and one for NetBSD swap. Select
> >> >> the drive to be initialized then click =E2=80=9CCustom Setup.=E2=80=
=9D  Set
> >> >> =E2=80=9CPartitioning Scheme=E2=80=9D to three partitions. The top =
partition will be
> >> >> for MacOS. It should be at least 400 megabytes in size but you can
> >> >> make it larger if you like. Set the =E2=80=9CType=E2=80=9D to eithe=
r =E2=80=9CMacOS Standard=E2=80=9D
> >> >> (HFS) or =E2=80=9CMacOS Extended=E2=80=9D (HFS+).
> >> >>
> >> >> 4. Select the second-from-top partition. This will be your NetBSD r=
oot
> >> >> and usr partition. Make this partition as large as possible, while
> >> >> keeping some space free for swap. Set the =E2=80=9CType=E2=80=9D to=
 =E2=80=9CA/UX Root.=E2=80=9D
> >> >>
> >> >> 5. Select the third-from-top partition. This will be your swap driv=
e.
> >> >> It should be the same size as the amount of RAM available. =E2=80=
=9CType=E2=80=9D
> >> >> should be set to =E2=80=9CA/UX Swap.=E2=80=9D
> >> >>
> >> >> 6. There may be a small amount of space at the bottom of the partit=
ion
> >> >> map labeled =E2=80=9CExtra.=E2=80=9D This is OK.
> >> >>
> >> >> 7. Click =E2=80=9COK=E2=80=9D followed by =E2=80=9CInitialize.=E2=
=80=9D Quit Drive Setup.
> >> >>
> >> >> 8. Rename your new Mac drive if you like. Run the MacOS installer (=
I
> >> >> have also installed MacOS 8.5/8.6 for a dual-boot system. However y=
ou
> >> >> must use the newer MacOS 9 Drive Setup application to initially
> >> >> partition the drive, not the version of Drive Setup that comes with
> >> >> 8.5/8.6.)
> >> >>
> >> >> 9. Reboot into the new MacOS. Quit the MacOS Setup Assistant. Inser=
t
> >> >> the NetBSD 10.1 disc. Drag =E2=80=9Cofwboot.xcf=E2=80=9D to the Mac=
=E2=80=99s hard drive.
> >> >>
> >> >> Here are the two kernels limited to UDMA mode 2:
> >> >>
> >> >> netbsd-INSTALL
> >> >> netbsd
> >> >>
> >> >> Download netbsd-INSTALL and move it to the MacOS drive.
> >> >>
> >> >> QuickFTP Server, running on my MacBook Air, was a helpful tool for
> >> >> this installation. I connected my blue-and-white G3 to the local ar=
ea
> >> >> network and set the TCP/IP control panel to DHCP. I then used Inter=
net
> >> >> Explorer on the G3 to access the files from QuickFTP, using the IP
> >> >> address displayed on QuickFTP. (example =E2=80=9Cftp://10.0.0.55=E2=
=80=9D into the
> >> >> Internet Explorer address bar.) I right-clicked (or control-click)
> >> >> each file and saved it to the base level of the Mac=E2=80=99s drive=
.
> >> >>
> >> >> QuickFTP uses this default path to host files, but it can be change=
d:
> >> >> /Users/chris/Library/Containers/QuickFTP/Data/
> >> >> For this document, I changed this to /Users/chris instead, as it=E2=
=80=99s
> >> >> easier to access.
> >> >> Set a username, password, and read and write access on QuickFTP.
> >> >>
> >> >> Both ofwboot.xcf and the modified installer netbsd-INSTALL files mu=
st
> >> >> be in the base level of the Mac=E2=80=99s drive, not in any subfold=
er.
> >> >>
> >> >> 10. Reboot the Mac and hold down command-option-O-F to boot into Op=
en
> >> >> Firmware. The NetBSD install  document describes how the Open Firmw=
are
> >> >> bootloader works. It can be tricky to figure out, and the exact
> >> >> command varies depending on the hardware available. Experimentation=
 is
> >> >> pretty much mandatory. Here=E2=80=99s the command my G3 uses:
> >> >>
> >> >> 0 > boot /pci@80000000/pci-bridge@d/Ultra-Tek100P@3/sd:,\ofwboot.xc=
f
> >> >> netbsd-INSTALL
> >> >>
> >> >> The boot process should begin. You should see a line about the hard
> >> >> disk on the screen, so make note of the drive name. In my case the
> >> >> drive is =E2=80=9Cwd0.=E2=80=9D
> >> >>
> >> >> When asked, accept =E2=80=9Cvt100=E2=80=9D as terminal type.
> >> >>
> >> >> 12. Select =E2=80=9C(S)hell=E2=80=9D when asked.
> >> >>
> >> >> 11. Optional: type:
> >> >>
> >> >> # disklabel /dev/wd0
> >> >>
> >> >> to see some cool partition information. Make note of the letter
> >> >> assigned the partitions. On my install, =E2=80=9Ca=E2=80=9D is assi=
gned to 4.2BSD
> >> >> (root/usr) and =E2=80=9Cb=E2=80=9D is assigned to swap. (Do not use=
 disklabel for any
> >> >> other purpose as it will wreck your partitions.)
> >> >>
> >> >> 12. Type:
> >> >>
> >> >> Create a NetBSD filesystem on partition =E2=80=9Ca,=E2=80=9D mount =
it, and create an etc folder:
> >> >> # newfs /dev/wd0a
> >> >> # mount /dev/wd0a /targetroot
> >> >> # mkdir /targetroot/etc
> >> >>
> >> >> (The official NetBSD install notes say to mount this partition as /=
mnt
> >> >> but this will cause an error later during the install, so use
> >> >> /targetroot.)
> >> >>
> >> >>
> >> >> 13. Create an fstab file: Type the following (I used tabs to keep
> >> >> everything tidy, but you can also use spaces.):
> >> >>
> >> >> # cat > /targetroot/etc/fstab
> >> >> /dev/wd0a / ffs rw 1 1
> >> >> /dev/wd0b none swap sw 0 0
> >> >> ptyfs /dev/pts ptyfs rw
> >> >>
> >> >> Press the return key at the end of the ptyfs line, followed by ctrl=
-d
> >> >> to save the file.
> >> >>
> >> >> Unmount the filesystem:
> >> >>
> >> >> # umount /targetroot
> >> >>
> >> >> 14.(optional) Type =E2=80=9Cpdisk /dev/wd0c=E2=80=9D (=E2=80=9Cc=E2=
=80=9D here represents the entire
> >> >> drive) to learn more about partitions.
> >> >> Type =E2=80=9Cp=E2=80=9D to print the partition table. Do not run a=
ny other command.
> >> >> Make note of the leftmost numbers associated with the partitions as
> >> >> you=E2=80=99ll need this to boot from Open Firmware later on. In pa=
rticular,
> >> >> note the number associated with the HFS/HFS+ partition and also wit=
h
> >> >> the AU/X Root partition. Type =E2=80=9Cq=E2=80=9D to quit.
> >> >>
> >> >> 15. Actually install NetBSD! Type =E2=80=9Csysinst=E2=80=9D to run =
the installer. Do
> >> >> NOT select option =E2=80=9Ca=E2=80=9D as this will demolish the par=
titions. Instead
> >> >> select option =E2=80=9Cc: Re-install sets or install additional set=
.=E2=80=9D then
> >> >> =E2=80=9Cyes=E2=80=9D then =E2=80=9Cb: wd0 ...=E2=80=9D then =E2=80=
=9Ca: Full installation=E2=80=9D (or as desired)
> >> >> then =E2=80=9Ca: CD-ROM / DVD=E2=80=9D (or as desired.)
> >> >>
> >> >> Note: If you use networking, be sure to specify =E2=80=9C100baseTX=
=E2=80=9D instead of
> >> >> the default =E2=80=9Cautoselect=E2=80=9D so ethernet functions corr=
ectly.
> >> >>
> >> >> 16. You=E2=80=99ll  now be asked to set up entropy. The way I did i=
t is with
> >> >> option =E2=80=9Cc: Load raw binary random data.=E2=80=9D
> >> >>
> >> >> In Terminal.app on my M1:
> >> >> % dd if=3D/dev/random bs=3D32 count=3D1 of=3D/Users/chris/random.tm=
p
> >> >>
> >> >> Select =E2=80=9Cb: Download via ftp=E2=80=9D
> >> >> Select =E2=80=9Ca: bm0=E2=80=9D (onboard ethernet)
> >> >>
> >> >> When you see Sysinst show this message:
> >> >> =E2=80=9CNetwork media type (empty to autoconfigure) [autoselect]:=
=E2=80=9D
> >> >> Do not hit return to accept =E2=80=9Cautoselect=E2=80=9D, as this d=
oes not work.
> >> >> Instead type in:
> >> >> 100baseTX
> >> >>
> >> >> Then =E2=80=9CYes=E2=80=9D to perform autoconfiguration.
> >> >> Type in a hostname as desired.
> >> >> Feel free to leave domain blank.
> >> >>
> >> >> To configure FTP, enter fields for Host, User and Password (same as
> >> >> what QuickFTP uses) as necessary and start download.
> >> >>
> >> >> Now you=E2=80=99ll be back at the sysinst main menu.
> >> >>
> >> >> Do not reboot yet. Sysinst installed the regular default kernel and
> >> >> that needs to be replaced with the kernel modified for UDMA mode 2.
> >> >>
> >> >> Select =E2=80=9CExit Install System=E2=80=9D
> >> >>
> >> >> Mount our new system and rename the default kernel:
> >> >> # mount /dev/wd0a /mnt
> >> >> # cd /mnt
> >> >> # mv netbsd netbsd.original
> >> >>
> >> >> Download the modified kernel:
> >> >> # ftp 10.0.0.220
> >> >> ftp> get netbsd
> >> >> ftp> quit
> >> >>
> >> >> Modify permissions to match original:
> >> >> # chmod 755 netbsd
> >> >> # cd /
> >> >> # umount /mnt
> >> >> # reboot
> >> >>
> >> >> When you hear the chime, hold down command-option-O-F again to get
> >> >> into Open Firmware. Boot off the modified regular kernel:
> >> >>
> >> >> 0 > boot /pci@80000000/pci-bridge@d/Ultra-Tek100P@3/sd:,\ofwboot.xc=
f netbsd
> >> >>
> >> >> 16. NetBSD will state /etc/rc.conf isn=E2=80=99t configured. Hit re=
turn to
> >> >> accept /bin/sh. Type:
> >> >>
> >> >> # export TERM=3Dvt100
> >> >> # mount -uw /
> >> >>
> >> >> Now edit the rc.conf file:
> >> >>
> >> >> # vi /etc/rc.conf
> >> >>
> >> >> A short lesson in how to use the vi text editor:
> >> >> Vi has two modes: command mode and edit mode.
> >> >> In command mode, use the arrow keys (or the HJKL keys) to move the
> >> >> cursor around.
> >> >> In command mode, use =E2=80=9Cx=E2=80=9D key to delete text.
> >> >> Press =E2=80=9Ci=E2=80=9D key to enter insert mode. Now you can edi=
t text.
> >> >> Press =E2=80=9CESC=E2=80=9D to exit insert mode and return to comma=
nd mode.
> >> >> Press =E2=80=9CESC=E2=80=9D followed by =E2=80=9C:wq=E2=80=9D to wr=
ite the file to disk and quit.
> >> >>
> >> >> Edit rc.conf to make these changes and additions:
> >> >>
> >> >> rc_configured=3DYES
> >> >> dhcpcd=3DYES
> >> >> wscons=3DYES
> >> >> hostname=3Dnetbsd (or whatever name you prefer)
> >> >> ifconfig_bm0=3D=E2=80=9Cmedia 100baseTX mediaopt full-duplex=E2=80=
=9D
> >> >>
> >> >> Esc :wq to write the file to disk and quit vi.
> >> >>
> >> >> Set filesystem to read-only (so fsck doesn=E2=80=99t complain), and=
 exit to
> >> >> resume booting:
> >> >>
> >> >> # mount -ur /
> >> >> # exit
> >> >>
> >> >> The boot process will continue.
> >> >>
> >> >> Login as root (no password yet.)
> >> >>
> >> >> Add a password for root:
> >> >> # passwd root
> >> >>
> >> >> 19. Create a normal user (e.g. johndoe) and a home directory for th=
at
> >> >> user, and add that user to the superuser group:
> >> >> # useradd -m -G wheel johndoe
> >> >>
> >> >> Give the user a password:
> >> >> # passwd johndoe
> >> >>
> >> >> All done.
> >> >>
> >> >> To reboot:
> >> >> # shutdown -r now
> >> >> To shut-down and power-off:
> >> >> # shutdown -p now
> >> >>
> >> >> If you wish to boot into MacOS, boot without holding command-option=
-O-F.
> >> >>
> >> >> ------
> >> >>
> >> >> How to build an install kernel and a regular kernel for NetBSD 10.1=
/macppc.
> >> >>
> >> >> This section is optional, as I=E2=80=99ve already made the two kern=
els
> >> >> available for download. However, if you=E2=80=99d like to build tho=
se kernels
> >> >> yourself, the steps are listed here:
> >> >>
> >> >> For this example, two computers are used: a blue-and-white G3, and =
a
> >> >> Macbook Air M1.
> >> >>
> >> >> Install UTM (Qemu) on the M1. Create an emulated amd64 machine and
> >> >> install NetBSD 10.1. (Running NetBSD for Arm would be more sensible
> >> >> for M1, but I couldn=E2=80=99t get it to install, hence the choice =
to emulate
> >> >> amd64 instead.)
> >> >>
> >> >> In UTM preferences, set the number of cores to 8 (for M1).
> >> >> Create a regular user in group wheel.
> >> >> Enable dhcpcd with (as root):
> >> >>
> >> >> # /etc/rc.d/dhcpcd onestart
> >> >>
> >> >> OBTAINING SOURCES
> >> >>
> >> >> Build sources as described here:
> >> >> https://www.netbsd.org/docs/guide/en/chap-fetch.html
> >> >>
> >> >> (as root):
> >> >> # mkdir /usr/src
> >> >> # chown chris /usr/src
> >> >>
> >> >> exit to return to regular user.
> >> >>
> >> >> Grab the source files (no need for xsrc.tgz, as I=E2=80=99ll be usi=
ng this
> >> >> emulated machine for compiling only.):
> >> >>
> >> >> $ ftp -i ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-10.1/source/sets/
> >> >> ftp> get gnusrc.tgz
> >> >> ftp> get sharesrc.tgz
> >> >> ftp> get src.tgz
> >> >> ftp> get syssrc.tgz
> >> >> ftp> quit
> >> >>
> >> >> You should now have four *.tgz files in your home directory.
> >> >>
> >> >> Extract all them all:
> >> >>
> >> >> $ for file in *.tgz
> >> >> > do
> >> >> > tar -xzf $file -C /
> >> >> > done
> >> >>
> >> >> This will take a while.
> >> >>
> >> >> CROSS-COMPILING
> >> >>
> >> >> Since I=E2=80=99m using amd64 to create macppc/powerpc kernels,
> >> >> cross-compilation is required.
> >> >>
> >> >> https://www.netbsd.org/docs/guide/en/chap-build.html#chap-boot-cros=
s-build-kernel
> >> >>
> >> >> Although the instructions call for placing sources in ~/cvs/src, I
> >> >> chose to keep them in /usr/src instead.
> >> >>
> >> >> $ mkdir ~/obj
> >> >> $ cd /usr/src
> >> >>
> >> >> Build the tools:
> >> >>
> >> >> $ ./build.sh -U -O ~/obj -j8 -m macppc -a powerpc tools
> >> >>
> >> >> where  the 8 in -j8 is the number of cores on your system.
> >> >>
> >> >> After a while, this process will print a summary of results.
> >> >>
> >> >> Configure the kernel:
> >> >>
> >> >> $ cd /usr/src/sys/arch/macppc/conf
> >> >>
> >> >> The configuration file titled INSTALL is the one with the RAM disk =
for
> >> >> installation. Copy the original and work on the copy:
> >> >>
> >> >> cp INSTALL INSTALL2
> >> >>
> >> >> Use your preferred editor with INSTALL2.
> >> >> Change the line:
> >> >> wd*  at atabus? drive ? flags 0x0000
> >> >> to
> >> >> wd* at atabus? drive? flags 0x0aac
> >> >> and save the change.
> >> >>
> >> >> This will limit the drive to UDMA mode 2 (ATA/33) which is the driv=
e
> >> >> specification for the blue-and-white G3. See the man page for wd fo=
r
> >> >> more information.
> >> >>
> >> >> Build the install kernel as a =E2=80=9Crelease.=E2=80=9D This, appa=
rently, also builds
> >> >> the Unix utilities required on the installer.
> >> >>
> >> >> $ cd /usr/src
> >> >> $ ./build.sh -U -j8 -O ~/obj -m macppc -a powerpc kernel=3DINSTALL2=
 release
> >> >>
> >> >> (Running on an Apple M1 cpu, this task will take around 12 hours to=
 complete.)
> >> >>
> >> >> https://www.netbsd.org/docs/guide/en/chap-inst-media.html
> >> >>
> >> >> There will be a newly-created install kernel with the changes for U=
DMA
> >> >> mode 2 in the directory ~/obj/distrib/macppc/floppies/md-kernel/.
> >> >>
> >> >> However, this new file isn=E2=80=99t titled =E2=80=9CINSTALL2,=E2=
=80=9D but simply =E2=80=9Cnetbsd-INSTALL.=E2=80=9D
> >> >>
> >> >> Transfer this file to the base level of the hard drive of the Class=
ic
> >> >> MacOS machine.
> >> >>
> >> >> In my case, how I did this was to sftp the file from my UTM machine=
 to
> >> >> the M1 host OS. From the ~/obj/distrib/macppc/floppies/md-kernel/
> >> >> directory:
> >> >>
> >> >> Transfer files from the emulated amd64 machine to my M1 Mac=E2=80=
=99s OS:
> >> >> $ sftp [email protected]  (change the address as necessary)
> >> >> sftp> put netbsd-INSTALL
> >> >> sftp> quit
> >> >>
> >> >> netbsd-INSTALL is now in the M1=E2=80=99s home directory (which is,
> >> >> co-incidentally, also QuickFTP=E2=80=99s working directory.)
> >> >>
> >> >> On the blue-and-white, running Classic MacOS, point Internet Explor=
er
> >> >> or Netscape to ftp://10.0.0.220 and right-click netbsd-INSTALL to s=
ave
> >> >> the file to the base level of the hard disk.
> >> >>
> >> >> COMPILE THE REGULAR KERNEL
> >> >>
> >> >> The installation kernel is ready, but we need a regular kernel as w=
ell.
> >> >>
> >> >> https://www.netbsd.org/docs/guide/en/chap-kernel.html
> >> >>
> >> >> On the emulated amd64:
> >> >>
> >> >> $ cd /usr/src/sys/arch/macppc/conf
> >> >>
> >> >> $ cp GENERIC GENERIC2
> >> >>
> >> >> Use your preferred editor with GENERIC2.
> >> >> Change the line:
> >> >> wd*  at atabus? drive ? flags 0x0000
> >> >> to
> >> >> wd* at atabus? drive? flags 0x0aac
> >> >> and save the change.
> >> >>
> >> >> $ cd /usr/src
> >> >> $ ./build.sh -U -j8 -O ~/obj -m macppc -a powerpc kernel=3DGENERIC2
> >> >>
> >> >> A summery will tell you where the new kernel (called =E2=80=9Cnetbs=
d=E2=80=9D) is located.
> >> >>
> >> >> Copy this from the UTM machine to the home directory on my M1:
> >> >>
> >> >> $ cd /home/chris/obj/sys/arch/macppc/compile/GENERIC2/
> >> >> $ sftp [email protected]
> >> >> sftp> put netbsd
> >> >> sftp> quit
> >> >>
> >> >> It=E2=80=99s now ready to be copied to the blue-and-white G3 (see e=
lsewhere).
> >> >>
> >> >> ----
> >> >>
> >> >> Preventing caps-lock from freezing a blue-and-white G3
> >> >>
> >> >> On my B&W G3 I noticed the caps-lock key would sometimes -- but not
> >> >> always -- cause the computer to freeze. Unplugging the USB cable wo=
uld
> >> >> un-freeze the machine, but also cause strange behavior on the conso=
le.
> >> >> As such, I found it useful to simultaneously ssh into the B&W from =
my
> >> >> M1 Air while messing around with caps-lock so I could more easily
> >> >> reboot the machine.
> >> >>
> >> >> The keyboard in question is a late-1990s Apple M2452.
> >> >>
> >> >> My =E2=80=9Csolution=E2=80=9D was to map the caps-lock key to the l=
eft shift key.
> >> >> Therefore I have two left shift keys, and no caps-lock. But at leas=
t I
> >> >> don=E2=80=99t accidentally freeze my Mac any more.
> >> >>
> >> >> Edit /etc/wscons.conf.
> >> >> Underneath the line that begins: =E2=80=9C#mapfile
> >> >> /usr/share/wscons/keymaps/pckbd.sv.svascii=E2=80=9D
> >> >> add a new, uncommented line:
> >> >> mapfile /usr/share/wscons/keymaps/pckbd.caps.shift
> >> >> and save the change.
> >> >>
> >> >> Then:
> >> >> # cd /usr/share/wscons/keymaps/
> >> >> # vi pckbd.caps.shift
> >> >>
> >> >> and add one line to this file:
> >> >> keysym Caps_Lock =3D Shift_L
> >> >>
> >> >> Save and reboot. Caps will now map to shift.
> >> >>
> >> >> X11 with the blue-and-white
> >> >>
> >> >> Here=E2=80=99s a functional xorg.conf file for the Mac with a ATI R=
age 128 PCI card.
> >> >> It=E2=80=99s probably nowhere near optimal. 3D acceleration is not =
enabled.
> >> >> Let me know if you know how to enable acceleration.
> >> >>
> >> >> Place this text as /etc/X11/xorg.conf
> >> >>
> >> >> Section "ServerLayout"
> >> >> Identifier     "X.org Configured"
> >> >> Screen      0  "Screen0" 0 0
> >> >> InputDevice    "Mouse0" "CorePointer"
> >> >> InputDevice    "Keyboard0" "CoreKeyboard"
> >> >> EndSection
> >> >>
> >> >> Section "Files"
> >> >> ModulePath   "/usr/X11R7/lib/modules"
> >> >> FontPath     "/usr/X11R7/lib/X11/fonts/misc/"
> >> >> FontPath     "/usr/X11R7/lib/X11/fonts/TTF/"
> >> >> FontPath     "/usr/X11R7/lib/X11/fonts/Type1/"
> >> >> FontPath     "/usr/X11R7/lib/X11/fonts/75dpi/"
> >> >> FontPath     "/usr/X11R7/lib/X11/fonts/100dpi/"
> >> >> EndSection
> >> >>
> >> >> Section "Module"
> >> >> #Load  "dbe"  #action
> >> >> #Load  "extmod"  #action
> >> >> Load  "dri"
> >> >> Load  "dri2"
> >> >> Load  "glx"
> >> >> Load  "shadow"
> >> >> EndSection
> >> >>
> >> >> Section "InputDevice"
> >> >> Identifier  "Keyboard0"
> >> >> Driver      "kbd"
> >> >> Option    "Protocol" "wskbd"
> >> >> Option    "Device" "/dev/wskbd"
> >> >> EndSection
> >> >>
> >> >> Section "InputDevice"
> >> >> Identifier  "Mouse0"
> >> >> Driver      "mouse"
> >> >> Option    "Protocol" "wsmouse"
> >> >> Option    "Device" "/dev/wsmouse"
> >> >> Option    "ZAxisMapping" "4 5 6 7"
> >> >> EndSection
> >> >>
> >> >> Section "Monitor"
> >> >> Identifier   "Monitor0"
> >> >> VendorName   "Monitor Vendor"
> >> >> ModelName    "Monitor Model"
> >> >> #HorizSync     58-62 #action
> >> >> #VertRefresh   75-117 #action
> >> >> #Option "VGA-0" "VGA monitor"  #action
> >> >> Modeline "1024x768" 78.75  1024 1040 1136 1312  768 769 772 800 -hs=
ync -vsync
> >> >> Modeline "1024x768" 78.75  1024 1040 1136 1312  768 769 772 800 +hs=
ync +vsync
> >> >> EndSection
> >> >>
> >> >> Section "Monitor"
> >> >>     Identifier    "LVDS monitor"
> >> >>     Option "LVDS" "LVDS note"
> >> >> EndSection
> >> >>
> >> >> Section "Device"
> >> >>         ### Available Driver options are:-
> >> >>         ### Values: <i>: integer, <f>: float, <bool>: "True"/"False=
",
> >> >>         ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
> >> >>         ### <percent>: "<f>%"
> >> >>         ### [arg]: arg optional
> >> >>         #Option     "NoAccel"             # [<bool>]
> >> >>         #Option     "Dac6Bit"             # [<bool>]
> >> >>         #Option     "VGAAccess"           # [<bool>]
> >> >>         #Option     "ShowCache"           # [<bool>]
> >> >>         #Option     "SWcursor"           # [<bool>]
> >> >>         #Option     "VideoKey"           # <i>
> >> >>         #Option     "PanelWidth"         # <i>
> >> >>         #Option     "PanelHeight"         # <i>
> >> >>         #Option     "ProgramFPRegs"       # [<bool>]
> >> >>         #Option     "DMAForXv"           # [<bool>]
> >> >>         #Option     "ForcePCIMode"       # [<bool>]
> >> >>         #Option     "CCEPIOMode"         # [<bool>]
> >> >>         #Option     "CCENoSecurity"       # [<bool>]
> >> >>         #Option     "CCEusecTimeout"     # <i>
> >> >>         #Option     "AGPMode"             # <i>
> >> >>         #Option     "AGPSize"             # <i>
> >> >>         #Option     "RingSize"           # <i>
> >> >>         #Option     "BufferSize"         # <i>
> >> >>         #Option     "EnablePageFlip"     # [<bool>]
> >> >>         #Option     "AccelMethod"         # <str>
> >> >>         #Option     "RenderAccel"         # [<bool>]
> >> >> #Option "NoAccel" "off"  #action
> >> >> #Option "UseFBDev" "on"  #action
> >> >> #Screen 0 #action
> >> >> #Option "ForcePCIMode"    "True"  #not used re manpage but in autog=
en
> >> >> #Option "Display" "CRT"  #not used re r128 manpage but x.org disagr=
ee
> >> >> Identifier  "Card0"
> >> >> Driver      "r128"
> >> >> BusID       "PCI:0:16:0"
> >> >> EndSection
> >> >>
> >> >>
> >> >> Section "Screen"
> >> >> Identifier "Screen0"
> >> >> Device     "Card0"
> >> >> Monitor    "Monitor0"
> >> >> Option  "DPMS"
> >> >>
> >> >> DefaultDepth  24
> >> >>
> >> >> SubSection "Display"
> >> >> Viewport   0 0
> >> >> Depth     1
> >> >> EndSubSection
> >> >> SubSection "Display"
> >> >> Viewport   0 0
> >> >> Depth     4
> >> >> EndSubSection
> >> >> SubSection "Display"
> >> >> Viewport   0 0
> >> >> Depth     8
> >> >> EndSubSection
> >> >> SubSection "Display"
> >> >> Viewport   0 0
> >> >> Depth     15
> >> >> EndSubSection
> >> >> SubSection "Display"
> >> >> Viewport   0 0
> >> >> Depth     16
> >> >> EndSubSection
> >> >> SubSection "Display"
> >> >> Viewport   0 0
> >> >> Depth     24
> >> >> EndSubSection
> >> >> EndSection
> >> >>
> >> >> Section "DRI"
> >> >>     Mode 0666
> >> >> EndSection