Subject: Re: upgrading a floppyless i386 box from 1.4.2 to 1.5_ALPHA
To: Zach Fine <zach@xdsl014.serv.net>
From: Laine Stump <lainestump@rcn.com>
List: netbsd-help
Date: 09/23/2000 19:34:23
Zach Fine <zach@xdsl014.serv.net> writes:

> So I'm wondering if it's possible to boot my iopener into NetBSD
> 1.4.2, download all the sets for 1.5_ALPHA, untar them into the proper
> locations, and then reboot into 1.5_ALPHA? Would I start with the
> 1.5_ALPHA kernel or should I install all of the other sets first?
> Would I run the risk of ending up with a partial installation and a
> kernel and system binaries from different distributions that won't
> talk to one another?

If it weren't for the switch from a.out to ELF between 1.4.2 and
1.5_ALPHA, this wouldn't be nearly as problematic, but it's still not
so bad. I upgraded several machines every step from 1.2.1 to 1.4.1
without booting from floppy (and did a 1.4.1 to ELF -current in the
same way). So you can do it, but you'll just need to be sure that you
always have binaries available for the version of kernel you're
running, and keep track of where those binaries are at the moment. Try
something like this:

  1) untar all of 1.5_ALPHA into a different directory on the disk
     (including a 1.5 kernel) , then move each chunk of it over to the
     partition it will be on in the end (eg, put the 1.5 /usr in
     /usr/new/usr, and all the stuff that will be in the root
     partition in /new). Make sure you do the untar as root with a
     umask of 0.

  2) Do your best to edit /new/etc/* to fit your machine's
     configuration.

  3) Boot into single user mode, and mv /* to /old, and /usr/* to
     /usr/old/*, (except for the "new" directories), then /old/bin/mv
     /new/* to / and /usr/new/* to /usr. Make sure you have a 1.5
     kernel along with the other stuff in /.

  4) You should now be able to boot, and 1.5 will come up. It's
     probable there will be things you missed in the new /etc, so you
     might get plopped into single user mode, but you'll be able to
     mount / and /usr, and at least run vi to edit stuff until it works
     properly.

  5) Either put your old /usr/lib into /emul/aout/emul/usr/lib, or
     rebuild all your local applications using 1.5.

  6) Eventually you'll be confident enough that everything worked to
     nuke /old/* and /usr/old/*.

Two other pointers: 1) After you've moved the directory containing the
shared libraries, you can only use statically linked binaries (ie,
stuff from /bin and /sbin, but not from /usr/bin and /usr/sbin) - make
sure you don't need to do anything that requires shared libs while the
machine is in its "inconsistent" state (and don't unplug the power!),
2) If you lose track of where all programs are, even the "ls" command,
you can still get a listing of the current directory with "echo *",
since echo is a shell builtin command - I've used that to find my way
out of a hole before.