Macintosh LC 475 |
||||
|
||
Installing NetBSD on an LC 475As far as installation is concerned, I pretty much just followed this Guide to installing NetBSD, but I wanted to have all my notes in one place, hence I wrote this. Requirements:
*I replaced my LC's unsupported 68LC040 with a full '040 InstallingFirstly, you'll want to partition your hard disk if you've not done so already. I have a non-apple SCSI drive, so I used a patched version of HDSC Setup on a bootable system 7 floppy. It is worth noting that the NetBSD files themselves (temporarily) take up 50 MB on the Mac partition. I took 150 MB for the Mac Partition, 50 MB for NetBSD swap and the rest for NetBSD root&usr .
I now had a blank hard disk, so I had to reinstall (as a minimum) 7.5.3, 7.5.5 updates, OpenTransport, Stuffit Expander and iCab. I used iCab to download the following: Place these in a folder called 'Mac':
Place these in a folder called 'BSD':
Extract the Mac files but do not extract the BSD *.tgz files, this will happen automatically during the install. Run the Mkfs program you extracted placed in the Mac folder and select the SCSI disk you partitioned. Select the Root&usr partition and 'CHANGE' it to NetBSD Root & usr, then select the Swap partition and Change it to NetBSD Swap. Click each patition and 'FORMAT' them in turn - this takes a while. Click DONE to exit. It's time to install, start the 'NetBSD/Mac68k Installer' program and choose your SCSI disk. Click File -> Install, then Add all of the .tgz files you placed in the BSD folder and then click 'done'. Go to sleep, wash the cars, cook and eat Sunday lunch or whatever at this point, because this took hours on my LC. When the install Finally completes, choose File -> Build Devices and then quit the installer. Run the BSD/Mac68k Booter. Choose Options -> Booting and tick 'Single User' Click OK and choose Options -> Boot Now (cmd+b). If NetBSD boots, rejoice! If not, and you get an error regarding reading the filesystem here's that bad news: You need to start over from the Mkfs point and reinstall substituting kern-GENERIC.tgz for kern-GENERICSBC.tgz. Otherwise, lets continue.
Choose # export TERM=vt100 # tset vt100 # clear # mount /dev/sd0a
Mount might complain that the file system is dirty - don't worry, this gets taken care of. Now # Use program=YES to enable program, NO to disable it. program_flags are # passed to the program on the command line. # sshd=yes #JS: This enables you to log in through ssh # Load the defaults in from /etc/defaults/rc.conf (if it's readable). # These can be overridden below. # if [ -r /etc/defaults/rc.conf ]; then . /etc/defaults/rc.conf fi # If this is not set to YES, the system will drop into single-user mode. rc_configured=YES # Add local overrides below # JS: The host/domain name are for you to choose. The default route is your # gateway or router. hostname="lc475" domainname="local" defaultroute="172.16.0.1"
Save the file and that's it, reboot by typing, err... Your Mac boots the Mac OS again, so load the NetBSD booter once more. Boot as before, but this time don't set single user mode (just hit cmd+b to boot). The Mac will pause for a looong time while generating the SSH keys - this made me chuckle, since it takes the blink of an eye on a modern PowerPC or x86.
Log in as # passwd Now create a user for yourself (not stocksy!): # useradd -m stocksy # passwd stocksy
Add yourself to the wheel group by doing wheel:*:0:root,stocksy
Type
To set up networking, you need to know what type of card you have. Type sn0 at nubus0 slot e: Macintosh LC Ethernet Adapter sn0: Ethernet address 00:01:98:34:0c:05
We are interested in the first part of each line, in this case sn0. Create a file accordingly, e.g. inet 172.16.0.82 netmask 255.255.255.0
Those of you who have been paying attention will note that we haven't entered any nameserver addresses. Lets do that now by typing domain spruce nameserver 172.16.0.80 nameserver 172.16.0.81 lookup file bind Enter as many nameservers as you (or your ISP) have. Set the domain to whatever you like, but do keep the lookup order as shown. Save the file, reboot into Mac OS and boot NetBSD again. Try pinging/sshing to your Mac, if you can't, go back over the steps and see if you missed somthing. I hate the csh/ksh shells that BSDs have and want to install bash right away. Lets do that. % su - # ftp ftp.gnu.org ftp> cd /gnu/bash ftp> get [latest version] e.g. ftp> get bash-3.2.tar.gz ftp> quit # tar zxf bash-3.2.tar.gz # cd bash-3.2 # ./configure && make # make install # /usr/local/bin/bash
Use Do Stuff
I hate faffing about with the default ftp client, so the first thing I did was get $ su - # ftp ftp.sunet.se ftp> cd pub/www/utilities/curl ftp> get [latest version] e.g. ftp> get curl-7.16.0.tar.gz ftp> quit # tar zxf curl* # rm curl*.gz # cd curl* # ./configure && make # make install
Now I can just retreive stuff with Because I am used to using sudo rather than su-ing to root, I wanted to install this. $ su - # curl -O http://www.courtesan.com/sudo/dist/sudo-1.6.8p12.tar.gz # tar zxf sudo-1.6.8p12.tar.gz # cd sudo-1.6.8p12.tar.gz # ./configure && make # make install |
||