Rebooting 4.2BSD on a 780

John Bruner jdb at mordor.UUCP
Thu Jun 20 01:38:28 AEST 1985


A long time ago, on a PDP-11 far, far away, I had a version of "boot",
a minor kernel mod, and a change to the (at that time) very few
programs which read "/unix" that provided the functionality you seek.

The boot program held the name of its default file [my version of
the V7 "/boot" had a timeout and default file so that it could
be used for "hands off" auto-reboots] in a char array.  A trivial
program could be used to patch "/boot" so that it would default to
any desired filename (from any desired device, unit, starting block).

The kernel contained a char array that the boot program filled with
the boot filename.  [The boot program also provided an (optional)
interactive memory patching facility, principally so that "rootdev"
"swapdev", "swplo", and "nswap" could be changed if necessary.]
A fixed location (I seem to recall using the word at 042) held
the address of the boot-file-name array in the kernel.

Programs like "ps" which read the namelist would first open "/dev/kmem"
(which they usually did anyway), seek to 042 and read one word, seek
to that address, and read the boot filename.  That string would then
be used as the namelist filename (instead of always using "/unix").

I implemented all of this (including mods to some programs such as
"ps") on "my" 11/45 and it worked well.  I could cause "/boot" to
load any kernel file without having to move it into "/unix" first.
(This was especially handy for switching back and forth between
kernels with different swap devices, since we had a very flakey
swap disc).  However, while the other mods to the "boot" program are
(I believe) still in use, the automatic namelist selection was not
accepted on the other machines, and (for compatbility) I eventually
pulled it out of "mine".

I've always wanted to put the features of my PDP-11 boot program
into the 4.nBSD "/boot".  Of course, these days there are a lot
of things that want to open "/vmunix".  Someday when I have a spare
afternoon....
-- 
  John Bruner (S-1 Project, Lawrence Livermore National Laboratory)
  MILNET: jdb at mordor [jdb at s1-c.ARPA]	(415) 422-0758
  UUCP: ...!ucbvax!dual!mordor!jdb 	...!seismo!mordor!jdb



More information about the Comp.unix.wizards mailing list