Subject: Revenge of the Install doc
To: None <amiga-dev@sun-lamp.cs.berkeley.edu>
From: William J Coldwell <billc@icecube.cryogenic.com>
List: amiga-dev
Date: 08/07/1994 17:05:20
I'm running out of time to work on this due to my impending 3 week vacation  
which starts this coming Friday.  I want to have the Install doc finished in  
the next couple of days, but need help.

Please review this and make corrections/changes as necessary.  If someone  
would like to flesh out the Upgrading from 0.9c section, that wouldn't be a  
"bad thing(tm)".


Formatting issues can be ignored, I'm only concerned with raw text at this  
time.

Many thanks to those whom have already sent in changes and suggestions.

--- SOF ---
Installing NetBSD-Amiga (4.4BSD)
August 7th, 1994

Abstract:

This document contains the very hastily written instructions for the  
installation the NetBSD-Amiga 1.0 (4.4BSD) release.



NetBSD-Amiga Mailing List: majordomo@sun-lamp.cs.berkeley.edu
EMail: billc@icecube.cryogenic.com
CryoCafe BBS: 1-503-257-4823
IRC: #NetBSD and #Amiga


NetBSD-Amiga Release 1.0 will be available on a QIC-120/150 (DC6120/DC6150)  
1/4" tape from this address for US$30.

NetBSD-Amiga Port
c/o William Coldwell
P.O. Box 16924
Portland, Oregon 97216-0924 USA


SYSTEM REQUIREMENTS
~~~~~~~~~~~~~~~~~~~

Supported STANDARD Amigas*:  A4000/040, A3000, A2500

* These machines are supported right out of the box.  Other configurations of  
Amigas must meet the requirements below.

Configuration Requirements:

	Machine:
		Amiga

	CPU/FPU/MMU:	
		MC68020-CPU/MC68881*-FPU/M68851-MMU
		MC68030%-CPU-MMU/MC68881*-FPU
		MC68040^-CPU-MMU-FPU
			* - MC68882-FPU is acceptable
			% - M68EC030 is not acceptable
			^ - M68EC040 and MC68LC040 are not acceptable

	Memory:	
		4* Megabytes of contiguous FAST RAM or more
			*4M would be a bare minumum, with lots of swapping.

		1 Megabyte of CHIP RAM or more

	Disk:
		HD space:	recommended/with X	absolutely  
needed/with X
		root (/)	15M/15M			10M/10M
		swap		2M for every M ram
		user (/usr)	65M/100M		45M/80M
		local (/local)	anysize you want for your stuff.

		thus recomended size for an 8M system (4M will be less)
		15 + 16 + 65 = 96M, which leaves 24M ados partition.

		Basically, 100 Megabytes of free space or more

	Tape (not required, but can make installation easier):
		Most SCSI tape controllers, including
		Archive Viper,
		Cipher SCSI-2 ST150.

	Disk controller:
		A4000 IDE
		A3000 SCSI
		A2500 SCSI
		A2091 SCSI
		A4091 SCSI-2
		Supra WordSync SCSI
		GVP Series II SCSI
		IVS SCSI
		CSA Twelve Gauge SCSI
		CSA Magnum SCSI
		MacroSystem Development WarpEngine SCSI-2
		
	Supported External Filesystems:
		AmigaDOS
		ISO-9660 (CDROM)

[XXX] MS-DOS?


	Video controller:
		AGA-NTSC/PAL (15/31kHz)
		ECS-NTSC/PAL (15kHz)
		ECS-NTSC/PAL - A3000 Flickerfixer (31kHz)
		ECS-A2024-NTSC/PAL (15kHz/10Hz)
		Noahji (MacroSystem US) Retina
		
	Network controller:
		A2065 Ethernet
		Hydra Ethernet		

	Input device:
		2 button mouse
		3 button mouse
		Joystick
		Keyboard
[XXX] (and how to localize...)

	Ports:
	 	Built-in Parallel (Centronics)
		Built-in Serial (RS232)

Files:
~~~~~~
release/bootfloppy.dms (REQUIRES DMS unarchiver*)
release/base.tar.gz	(required)
release/etc.tar.gz	(required)
release/netbsd.gz	(required)
tools/loadbsd.gz	(required)
release/comp.tar.gz	(recommended)
release/games.tar.gz	(recommended)
release/man.tar.gz	(recommended)
release/misc.tar.gz	(recommended)
release/text.tar.gz	(recommended)

	* This is available at aminet/util/arc/
	Also, the only place I could find gzip for ados was
	tsx-11.mit.edu:/pub/linux/something (needed to unarchive the kernel)

FTP Sites:
~~~~~~~~~~
ftp.uni-regensburg.de  pub/NetBSD-Amiga/release/*
ftp.iastate.edu
wuarchive.wustl.edu (coming soon)
sun-lamp.cs.berkeley.edu: pub/NetBSD/arch/amiga/release/*

Disk space:
~~~~~~~~~~~
	15M for root (/) (or more)
	2 * FAST RAM Megabytes for swap* (i.e., 8M system == 16M swap)
	45M for /usr (add 20M for sys-src, add 35M extra for X) (or more)
		Full source (kernel(sys-src)+binaries) is >80MB.

	*On a 4M system, you might want more than 8M swap, since you will be
	 swapping all the time.

Disclaimer:
~~~~~~~~~~~
The author assumes no responsibility whatsoever for you losing data, time and  
hair.

Full Install:
~~~~~~~~~~~~~

If you have a system that meets the above requirements, and you want to check  
out NetBSD-Amiga, you will need to create some partitions on your  
harddrive(s) for it.  Use the example below as a loose guide.  The main thing  
is that you want to create a ROOT, SWAP, and USR partition of at _least_ the  
recommended sizes.  You will have to take special note to watch the SCSI  
UNIT, as it has relevence on the /dev/sdX number.

IMPORTANT:  READ AND UNDERSTAND THIS, OR YOU WILL BE SORRY LATER
~~~~~~~~~~
Say your system has 3 SCSI devices (note: IDE drives will show up as SCSI  
devices under NetBSD), IDs 0, 3, and 4.  These will now show up as
sd0 (ID 0), sd1 (ID 3) and sd2 (ID 4).  The higher the ID of the device is,  
the higher sd will increment.  Write the IDs to sd# down!  If you NetBSD  
partitions are on the SCSI drive at ID3, then your NetBSD system will be on  
/dev/sd1 - replace any references to /dev/sd0x with /dev/sd1x in the  
examples! 



[XXX]
> /dev/sd6d	/usr	ufs	rw	1	1

  I assume from this that the 52M drive is SCSI id 6?  Did  you have any
AmigaDOS partitions on the same drive?  NetBSD is now assigning the
sd?[defghijklmnop] partitions in the order they are located on the
disk.  This includes any non-NetBSD partitions.  If you had an AmigaDOS
partition on that disk, and the partition was located before the NBU\7
NetBSD partition, /dev/sd6d is going to be that AmigaDOS partition.
Doing a newfs would then scramble the AmigaDOS partition.
[XXX]

{{ NetBSD assigns the /dev/sdX numbers by counting up all your attached SCSI
{{ devices from SCSI ID 0 in order.  For example, say your system has 3 SCSI
{{ devices (note: IDE drives will show up as SCSI devices under NetBSD),
{{ IDs 0, 3, and 4.  These will now show up as sd0 (ID 0), sd1 (ID 3) and
{{ sd2 (ID 4).  Again, as in the example above, it is not the specific SCSI
{{ ID which determines the /dev/sdX mapping, but the ORDER of the device  
ID's.
{{ NetBSD simply maps the first device it finds to sd0, the second to sd1,
{{ third to sd2, and so on.
{{
{{ Write the ID to sd# mappings for your particular system down!  If
{{ your NetBSD partitions were on the SCSI drive at ID3 in the above
{{ example, then your NetBSD system would be on /dev/sd1 - and you would
{{ replace any references to /dev/sd0x with /dev/sd1x in the examples!

[XXX]

{{ same comments as above for all of these.  Plus, there needs to be
<< a description of how minor device numbers map to partitions on a
<< device.  Frankly, I have no clue as to what is going on there, 'cept
<< it looks like Xa is root and Xb is swap.. but suddenly the ADOS
<< partition is Xd and the usr partition becomes Xe?  (where's Xc?)
<< Also, don't root and swap have to be on the same device in the
<< generic kernels?  Some mention of that might be helpful...
<<

[XXX]


Example A4000/IDE Installation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(or How Bill got NetBSD running on a an A4000/single IDE installation)

You will need your 3.0 (or above) Commodore Installation diskettes.
Backup anything important on your IDE drive, as it will be deleted.
You will have 30M available on your IDE to hold the installation files, and  
your Workbench.

Partition your harddrive with HDtoolbox:  Select the IDE drive, and click on  
Partition drive.

*WARNING* This is a permanent thing, so please make sure that if you have
anything important, that you have backed it up on floppies or tape.

Delete all your existing partitions (usually called Workbench and Work) on  
your IDE harddrive, by selecting a partition, and clicking on Delete  
Partition.


[XXX]
**> This seems rather drastic to do, unless you have no other space. I
    would suggest mentioning that the Work: partition could be broken
    into ones for NetBSD or an extra drive could be used. This avoids
    having to reinstall AmigaDOS.
[XXX]
The above will only work if you create yet another AmigaDOS partition, as the  
default Workbench partition is too small to hold the tar.gz files.  Unless  
someone else comes up with a better way. - Bill
[XXX]

You will create 4 partitions.

[XXX]
 Missing in the FAQ-Part of your install-guide is 'Cannot find suitable-
rootfs'-error-message and surroundings (sync-flag or hdtoolbox).
[XXX]

1st partition (AmigaDOS Boot Partition): 

	Click New Partition. Click in the next free area.
	size = 30M
	Partition Device Name = Workbench_x.x
	(In BSD it will map to /dev/sd0d for this example)
	Adv. Options, Click on Change...
	Click File System: until you see Fast File System
	Turn ON Automount this partition, if it is not checked.
	Make sure custom boot code is turned off.
	Leave File system block size at 512 (if you have this option *)
	Click OK.

* If you don't, you will not be able to mount the partition under NetBSD.
[XXX]
  This makes it sound like if you don't have the option to set the file
system block size, you can't mount the partition.  I think you probably
mean if you set the block size to something other than 512 you won't be
able to mount it.
[XXX]

2nd partition (NetBSD ROOT partition):
	Click New Partition.  Click in the next free area.
	size = 15M
	Partition Device Name = BSDROOT
	(In BSD it will map to /dev/sd0a for this example)
	Adv. Options, Click on Change...
	Click File System: until you see Custom File System
	Turn off Automount this partition, if it is checked.
	Identifier: 0x4e425207
	Reserved Blocks, beginning: 0 (same for end)
	Make sure custom boot code is turned off.
	Leave File system block size at 512 (if you have this option)
	Click OK.

3rd partition (NetBSD SWAP partition):
	Click New Partition.  Click in the next free area.
	size = (the size of your contigious FAST RAM) * 2
	Partition Device Name = BSDSWAP
	(In BSD it will map to /dev/sd0b for this example)
	Adv. Options, Click on Change...
	Click File System: until you see Custom File System
	Turn off Automount this partition, if it is checked.
	Identifier: 0x4e425301
	Reserved Blocks, beginning: 0 (same for end)
	Make sure custom boot code is turned off.
	Leave File system block size at 512 (if you have this option)
	Click OK.

4th partition (NetBSD USR partition):
	Click New Partition. Click in the next free area.
	size = remaining free space on the IDE. (46 or more Megabytes)
	Partition Device Name = BSDUSER
	(In BSD it will map to /dev/sd0e for this example)
	Adv. Options, Click on Change...
	Click File System: until you see Custom File System
	Turn off Automount this partition, if it is checked.
	Identifier: 0x4e425507
	Reserved Blocks, beginning: 0 (same for end)
	Make sure custom boot code is turned off.
	Leave File system block size at 512 (if you have this option)
	Click OK.

Double check everything to make sure it's correct, then click on Save Changes  
to Drive.  When you click Exit, your machine will not reboot.  You will want  
to place the Install disk of the Commodore 3.0 (or above) Operating System,  
into your floppy, and install onto the BSDBOOT partition.  You may need to  
boot off of the Workbench disk and Format the BSDBOOT partition, before  
Installing.


ONCE YOU HAVE YOUR PARTITIONS SET UP
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Now, you need to get the required files on to the root directory of the  
AmigaDOS partition.  Use a terminal program, tape drive, or copy them from  
another drive.  Now you are ready to enter a new world.

BOOTING INTO NETBSD
~~~~~~~~~~~~~~~~~~~
AmigaShell> gzip -d loadbsd.gz
AmigaShell> gzip -d netbsd.gz
AmigaShell> loadbsd -b netbsd

It should boot up and ask you which device you wish to boot off of.
Make sure the bootfloppy disk is in the drive, and enter:

fd0

and press return.  This will cause the NetBSD kernel to boot off of the boot  
floppy in DF0:.

newfs /dev/sd0a			(erase it, set it up for NetBSD)

--
"newfs: ioctl(WDINFO): Invalid argument."
This warning is ok, just ignore it.

  The Amiga doesn't write disk labels (and returns an error to indicate
that the attempt to write the label did not suceed).  Any changes to
the disk "label" still have to be done through an RDB editor.
--

newfs /dev/sd0e			(erase it, set it up for NetBSD)
mount /dev/sd0a /altroot	(mount root)
mkdir /altroot/usr		(make usr dir)
mount /dev/sd0e /altroot/usr	(mount usr on sd0e or whatever)

[XXX]
**> The /mnt/xxxx path could be different if you did not put the NetBSD
    files in the root of the AmigaDOS partition.

mount_ados /dev/sd0d /mnt	(mount ados partition)
cd /altroot			(cd to newroot)
tar -zxvf /mnt/netbsd.gz	(extract kernel)
tar --unlink -zxvpf /mnt/base.tar.gz	(extract base)
tar --unlink -zxvpf /mnt/etc.tar.gz	(extract the rest of etc)

==== Optional
|tar --unlink -zxvpf /mnt/comp.tar.gz	(extract gcc and tools)
|tar --unlink -zxvpf /mnt/games.tar.gz	(extract games and fun stuff)
|tar --unlink -zxvpf /mnt/man.tar.gz	(extract man pages)
|tar --unlink -zxvpf /mnt/misc.tar.gz	(extract miscellaneous stuff)
|tar --unlink -zxvpf /mnt/ext.tar.gz	(extract text tools and docs)
=====

cd /altroot 				(cd to the new root)
tar -cf - /dev | tar -xvpf -		(copy device files from floppy)
/altroot/bin/sync		(sync whatever for safety)
/altroot/sbin/reboot		(reboot system)

You'll end up in AmigaDOS again, this time, type:

loadbsd netbsd

You'll end up in single-user mode, at which you can:

mount -uw /		(make root read/writeable)
mount /dev/sd0e /usr	(give us /usr/bin and /usr/sbin commands)
cd /dev			(need to clean up devs)
MAKEDEV all		(rebuild all of the devices)
cd /etc			(cd /etc)
vi fstab		(I hope you know how to use vi).

[XXX]
**> You could have preedited it on the AmigaDOS side and then copied it
    over. Or use cat like in the original NetBSD install documents.

You will want to edit the fstab file to correctly represent your / and /usr  
devices, as well as uncomment and edit the swap.  Once you save this, you  
should then be able reboot and then enter multiuser mode.

/bin/sync
/sbin/reboot

Back to AmigaDOS

loadbsd -a netbsd

Back to NetBSD, this time, automatically entering multiuser mode.

login: root
(no password)

You're in (hopefully).  If all is well, then you should examine the other  
NetBSD-Amiga FAQs to set your system up.


UPGRADING YOUR EXISTING NETBSD-0.9c SYSTEM
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the NetBSD tar.gz files onto a spare area on your system {place}.  This  
also includes a tape drive, if you are going to use one.  NO MORE ROOTFS.GZ.   
That's right. It's history.  Just make sure that you have enough space

[XXX]
**> I have not actually found the RELEASE directory yet, so this question
    may be moot. What about the root bin and sbin? Where are the /usr
    bin, sbin and libs?

Do NOT unarchive etc.tar.gz, unless you are prepared for system specific  
files to be nailed in /etc (group, passwd, etc).

As root:
cd /
tar -zxf {place}netbsd.gz	(extract kernel)
tar --unlink -xvzpf {place}base.tar.gz	(extract base)
tar --unlink -zxvpf {place}comp.tar.gz	(extract gcc and tools)
tar --unlink -zxvpf {place}games.tar.gz	(extract games and fun stuff)
tar --unlink -zxvpf {place}man.tar.gz	(extract man pages)
tar --unlink -zxvpf {place}misc.tar.gz	(extract miscellaneous stuff)
tar --unlink -zxvpf {place}ext.tar.gz	(extract text tools and docs)

You will have to edit your fstab to denote the ID changes (if applicable).
Use disklabel to make sure things are where you think they are.


REPORTING PROBLEMS
~~~~~~~~~~~~~~~~~~
Basically the kernel diags (things like boot messages and register
dumps after panics) are stored in the last page of memory.  These
messages survive reboot so that if you have to get at them you can.
The utility of choice is dmesg.  Which prints this memory out.  Thus
if you get a panic with a register dump, instead of copying it down
by hand you can simply reboot and then redirect dmesg to a file.

Chris.

[send this edited information to the mailing list for help]

SOME HELPFUL HINTS THROWN IN.  MOST HAVE BEEN CUT FROM THE MAILING LIST
=======================================================================
(names have been lost, but thanks to those who gave the answers to us)

A few NetBSD-Amiga WWW servers do exist. The Main one is done by Matthias 

Kirschnick and includes links to other NetBSD information sites.

Matthias Kirschnick's <A  
HREF="http://www.informatik.uni-erlangen.de/tree/Departments/IMMD-IV/Persons/k 
irschni/NetBSD-Amiga/index.html">NetBSD-Amiga-page</A>


> Is there a NetBSD/Amiga Web server out there?  If not, then I may be

Try http://dusk.rz.uni-regensburg.de/. This is a A2000 running NetBSD,
and there's also a section on NetBSD on this machine.

======================================================================
> Right - as distributed, /etc/ttys runs getty on the ite0 Amiga display,
> rather than "console" which would go to the configured console device.

Yes and this is correct. You should enable getty's on whichever devices
you want them on.  The console /dev/console should always be marked as
*off* however.

======================================================================

>I see when I boot the kernel:
>warning found rdb->secpercyl(1098) != rdb->nsectors(74) * rdb->nheads(15)
>warning lp->d_sparespercyl(12) not multiple of lp->d_ntracks(15)

This is fine, this is telling you that your RDB has some conflicting values.   
If the partitions mount under NetBSD, then it's safe to ignore them.  If they  
don't, then use dmesg to copy the values down and give us a yell on the  
mailing list.

======================================================================

> TIMEZONE = 800, DST = 1  is what I  

> thought it should be for me (Portland, OR, +8 GMT), but it tells me that  
the  

> time under netbsd is 7 hours slower than what the Amiga side says... what  
am  

> I missing?

  The TIMEZONE and DST config options set something in the kernel data
(at least I think the TIMEZONE does, but I'm not sure about DST - I
think when I went looking, it was never referenced anywhere).  The kernel
doesn't do anything at all with that data.

  I think there's a something that needs to be set up in /usr/share somewhere
that deals with the timezones.  I've never done it, so my NetBSD time is the
same as AmigDOS - but NetBSD considers that time value GMT, which can cause
confusion at times.  Also, I don't think the stuff in /usr/share is used
until you go to multi-user, so the time would probably be reported  
differently
in single user vs multi user mode.

  The clock read routine just gets the current time from the Amiga clock and
uses that time as-is, with no adjustments.  I had thought about adjusting
it based on the TIMEZONE, but never got around to trying it.  Trying to
handle DST in the kernel isn't as easy to do.

======================================================================

From: spcmilo@hydra.spc.uchicago.edu (David Champion)

Not knowing of any such utility already existing, I came up with this
braindead rexx program to reset system time under ADOS to local so
that I can keep the battmem time in GMT for BSD's sake.  (Well, I like
keeping GMT.)  I call it from s:User-Startup, right after loading
rexxmast:
	sys:rexxc/rx rexx:warpdate.rexx

Obviously, there's much room for improvement, but it does the job well
enough.  Even without  going into detail, it should probably take the
GMT offset on the command line, and my offset should probably be
negative, not positive.  Oh well.

Anyway, thought someone might want it.

/* warpdate.rexx */
/* adjust current time so battclock can keep GMT */

/* CONFIGURE HERE */
/* number of minutes short of GMT */
off = 300

/* STOP CONFIGURING */

/* do not change day by default */
changeday = ''

/* find minutes after midnight */
mins = time('m')

/* adjust minutes */
mins = mins - off

/* if we go back a day, adjust minutes and changeday flag */
if mins < 0
then do
        mins = 1440 + mins
        changeday = 'yesterday'
end

/* if we go ahead a day, adjust minutes and changeday flag */
if mins > 1439
then do
        mins = 1440 - mins
        changeday = 'tomorrow'
end

/* extract new hour from minutes; set minutes to minutes since hour */
hour = trunc(mins / 60)
mins = mins - (hour * 60)

/* update seconds */
tmp = time('m')
secs = time('s')
secs = secs - (tmp * 60)

/* create an amigados 'date' command */
datestr = 'date 'changeday' 'hour':'mins':'secs

/* and change the clock */
address command datestr


[Hall of Fame deleted.]
The Hall of Fame should be a seperate file.
--- EOF ---


--
 William J. Coldwell - billc@iceCuBE.cryogenic.com - Cryogenic Software

------------------------------------------------------------------------------