View Single Post
Old 01 May 2023, 19:39   #1
karloch
Registered User
 
karloch's Avatar
 
Join Date: Mar 2023
Location: Spain
Posts: 11
Post NetBSD/amiga installation guide

Hi Amiga fellows! Several years ago I discovered how current NetBSD versions run on the Amiga with a wide range of supported hardware that makes our computer feels like at home with a modern, current operating system.

While the AmigaOS is one of the biggest benefits of the Amiga computers, there are other operating systems available for our platform. At the time of writing these lines, current Linux kernel and NetBSD versions still -amazingly- work on the Amiga as long as you have a MMU enabled CPU and enough RAM.

Kudos to the team of people of the Linux/m68k, Debian/m68k and NetBSD/amiga community for their work keeping the Linux and NetBSD running on Amiga!

This post is about NetBSD/amiga.

What is NetBSD/amiga?

NetBSD/amiga is the port of NetBSD operating system to the Amiga line of personal computers by Commodore, Amiga International and to the DraCo by MacroSystem. It is a current, up to date UNIX family operating system with an high degree of compatibility with Amiga hardware, multitasking, multiuser and advanced networking features. It comes with a rich set of system utilities, compilers, X11R7 and even games.

In contrast with GNU/Linux, where we have a kernel and different distributions for the userspace, NetBSD developers covers both, the kernel and the userspace under a single distribution. Please, note this is not better or worse than the GNU/Linux approach, just different.

You can watch the following video captured from my Warp 1260 enabled Amiga 1200, running NetBSD.

[ Show youtube player ]

Minimum requirements
  • 68020+68851, 68030, 68040 or 68060 CPU.
  • ECS or AGA chipset. There is also support for a good amount of RTG cards, even a driver for ZZ9000 is being developed.
  • 24 MB of FAST MEM; way more if you plan to run X.
  • 250 MB of HDD available space. The HDD must be connected to a supported storage controller, such as the Gayle IDE, ELBOX FastATA 1200 or one of the multiple SCSI controllers supported.
To get usable speed I recommend as minimum a 68030 at 50 MHz and 32 MB of FAST RAM. You will notice nice performance boost if you jump to a 68040 or a 68060.

Apart from the minimum requirements, you can find a list of Amiga supported devices here.

Networking

I consider networking an essential for any UNIX operating system, and NetBSD is no exception. Apart of several Ethernet controllers, NetBSD supports NE2000 compatible PCMCIA cards. I currently own a D-Link DE-660+ and a Fiberline FL-4680 that work well with both, AmigaOS through the cnet.device and NetBSD.

How to install

Installing a new OS on your Amiga can make you lose the data in your hard drive, follow these instructions AT YOUR OWN RISK; knowing what you are doing is gold, backing up your data is platinum. I really recommend to try the setup on a emulator such as WinUAE before doing it in your real Amiga.

Installation of NetBSD/amiga is not as hard as most people think it is, but it requires some knowledge about Amiga disk partitioning, Amiga CLI and UNIX. The high level steps to perform a install are:
  1. Installation media. You need the install media of the operating system. You can download the files from here or the ISO image. NetBSD supports CD-ROM drives connected to SCSI or ATAPI drives to the Gayle IDE. If you don't have a CD-ROM, you can have the installation files on a Amiga FFS partition or if you have network, using NFS or FTP.
  2. Partition the hard drive. The hard drive is partitioned using HDToolBox following the instructions here. I highly recommend that the swap and the root partitions to be below the first 4 GB boundary. Further partitions can be created beyond this limit.
  3. Write to miniroot filesystem to swap partition. Follow the instructions here. You will need to use the AmigaOS utility xstreamtodev or device-streams included in the NetBSD install files to write the miniroot.fs image file to the swap partition. xstreamtodev doesn't support writing beyond the 4 GB boundary, so make sure your swap partition is within the limit. If you want to retry installation, this step must be repeated.
  4. Boot into NetBSD installation. Reboot your Amiga holding down the two mouse buttons to enter the Early Startup Menu and from the boot options, select the swap partition to boot from it. The NetBSD bootloader should appear, giving you the opportunity to change the boot options; if -A is present, the system will boot in dblPAL or dblNTSC mode (31kHz), but you can remove the parameter to make it boot in PAL or NTSC (15 kHz). Important note for kickstart >= 47.96 (Amiga OS 3.2) users: This step will fail in kickstart >= 47.96, but you can still boot the operating system or the installation with the AmigaOS runbootblock or loadbsd utilities that can be found in the NetBSD install ISO, or at this FTP folder. runbootblock syntax is runbootblock -d<device> -u<unit> -p<rdb-name>, ie. runbootblock -dscsi.device -u0 -pnetbsd-root. This issue was reported here and a patch has been integrated into mainstream, so the problem will be solved in NetBSD 10; it can be seen working in [ Show youtube player ].
  5. Install NetBSD. From here the actual install of NetBSD starts. Follow the on-screen instructions and the install documentation. Be very careful when selecting the partition to format as root and swap for your NetBSD operating system. If you want to install your system using NFS or FTP you will need your ethernet adapter detected and boot and properly configured when install script ask you about IP configuration (no DHCP supported on the install!). Whatever source of installation you choose, you will need to remember the path where the install files are stored. If everything went well you should be able to select packages and file unpack will begin.
  6. Run your new install. After file copy you will find yourself at the installation system command prompt. Write halt to shutdown this system and reboot into your actual install (select your root partition from Early Startup Menu or use runbootblock or loadbsd). When you see the login prompt you will be able to enter using the root account. There won't be a password until you set one with passwd. Congratulations! You have installed NetBSD on your Amiga.
Here you can see a real Amiga 1200 capture fully installing the system from the Internet in the following video:

[ Show youtube player ]

Post-installation steps

Even after successful install of NetBSD on your Amiga, if you are not familiar with the OS you will have a lot of questions: how do I switch to white over black screen? How do I setup the software package manager? How do I start the GUI (X11) in color? Can enable SSH access to my Amiga?...

I have gathered multiple miscellaneous post-installation notes on this GitHub Gist.

A note on CF cards and NetBSD

I found that CF cards that works well in AmigaOS not necessarily work well in NetBSD, as many of them lack ATA commands used by the operating system. This can be checked with the command atactl wd0 identify. If when performing write operations in your storage device you get similar errors to the following ones, then you are likely affected by the issue:

Code:
[   486.702655] autoconfiguration error: wdc0:0:0: lost interrupt
[   486.714186]         type: ata tc_bcount: 41472 tc_skip: 24064
[   486.728095] wd0a: device timeout writing fsbn 5611343 of 5611296-5611423 (wd0 bn 7420703; cn 7361 tn 12 sn 59), xfer 1f30, retry 0
[   499.221228] wdc0:0:0: timeout waiting for DRQ, st=0x50, err=0x00
[   499.241306] wd0a: device timeout writing fsbn 5611296 of 5611296-5611423 (wd0 bn 7420656; cn 7361 tn 12 sn 12), xfer 1f30, retry 1
[   509.830048] wdc0:0:0: timeout waiting for DRQ, st=0x50, err=0x00
[   509.830048] wd0a: device timeout writing fsbn 5611296 of 5611296-5611423 (wd0 bn 7420656; cn 7361 tn 12 sn 12), xfer 1f30, retry 2
[   509.830048] wdc0:0:0: timeout waiting for DRQ, st=0x50, err=0x00
[   509.830048] wd0a: device timeout writing fsbn 5611296 of 5611296-5611423 (wd0 bn 7420656; cn 7361 tn 12 sn 12), xfer 1f30, retry 3
[   512.041365] wd0: soft error (corrected) xfer 1f30
After switching from a CF card to a mSATA drive with a mSATA to IDE adapter the problem was solved. Even if the problem is solved by using a real hard disk, NetBSD/amiga team is working in fixing the issue. Current code at netbsd-current shows improvements when installed on CF cards, but it is still not working as expected.

Have fun with NetBSD on your Amiga!

Last edited by karloch; 02 May 2023 at 01:12.
karloch is offline  
 
Page generated in 0.04528 seconds with 11 queries