Subject: howto: install w/o cable.
To: None <port-cobalt@netbsd.org>
From: Ted Unangst <tedu@stanford.edu>
List: port-cobalt
Date: 10/01/2001 16:54:18
I finally got it working, and think this might be a slightly easier way to
install.  I used a qube, but if someone has a raq in a rack, it might be
hard to get a serial cable to it.  Here's a somewhat step by step
procedure for the archives, or maybe the FAQ if someone gets around to
copying it.  (In pseudo-shell commands.  Use common sense and don't copy
quite literally.)

Prepare netboot host:
1.  mkdir /nfsroot
2. ftp ftp.netbsd.org/.../{base.tgz, etc.tgz, e2fsprogs.tgz}
3.  tar xfzp base.tgz; etc.tgz; e2fsprogs.tgz
4.  cd dev; MAKEDEV all
5.  cd etc; edit rc.conf to enable multiuser boots, inetd, telnet,
dhclient.  add secure lines to ttys.  edit fstab to
10.10.10.10:/nfsroot    /       nfs  rw 0 0
6.  mkdir /nfsroot/boot
7.  copy a gzipped kernel that was compiled with this 'patch'
-config          netbsd        root on ? type ?
+config          netbsd        root on ? type nfs
you can get one at http://heorot.stanford.edu/tedu/netbsd.gz
8.  name it the right thing.  for qube2: vmlinux_raq2800.gz
9.  edit /etc/dhcpd.conf.  you'll need at least the following:
subnet 10.10.10.0 netmask 255.255.255.0 {
range 10.10.10.125 10.10.10.135;
option routers 10.10.10.10;
}
host qube {
hardware ethernet 0:10:e0:0:f6:9b;
fixed-address 10.10.10.130;
filename "/vmlinux.gz";
option root-path "/nfsroot";
}
10.  edit /etc/exports and add:
/nfsroot -maproot=root 10.10.10.130
11.  enable nfs and dhcpd on host server.  reboot or whatever.

12.  netboot the qube.  hold down 2 left-right buttons.
13.  hopefully, all has gone well and you should be able to bring it up
and telnet in.  use tcpdump to check.

14.  run fdisk -u wd0.  make a small linux partition. and a large netbsd
one.
15.  run disklabel -i -I wd0.  configure to suit.
16.  mke2fs -r 0 -O none /dev/wd0e.
17.  newfs /dev/wd0a and so on.
18.  mount /dev/wd0a /mnt
19.  cp or tar everything onto mnt.
20.  cd /mnt/etc and edit files so that it doesn't try to netboot anymore.
change fstab, setup ifconfig files if needed.
21.  umount /mnt; mount /dev/wd0e /mnt
22.  mkdir boot.  get another, normal, kernel.  one from ftp.netbsd.org
works fine.  install in boot as vmlinux.gz or whatever.
23.  reboot.

Everything should now come up.  You have a netbsd system installed on your
qube/raq.

Major gotchas:  /etc/ttys must have secure added.  enable telnet.  check
various names of the kernels.  I got burned so many times because the
machine booted, but I left myself locked out.  I think the above should
work out fairly well.  If you can get it to netboot, you're good.  If it
doesn't work self-booting, netboot again and tinker.  Good luck :).  Or
just get a serial cable.

If someone knows some perl, maybe a script could be made that
automatically creates the /nfsroot tree and sets the right values after
prompting the user.  Shouldn't be too hard, and will make installation
much easier.

On a side note:  My qube2 hard locked several times when I was untarring
the sets.  It also crashed *every* time I created the boot directory on
ext2fs partition.  Maybe I have a bad disk? See previous email too.
Anyone else experience problems when writing to disk?

Seeya

Ted


--
"The brave men who died in Vietnam, more than 100% of which were
black, were the ultimate sacrifice."
      - M. Barry, Mayor of Washington, DC