Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 May 2002 08:10:56 -0700
From:      Julian Elischer <julian@elischer.org>
To:        Jonathan Mini <mini@freebsd.org>
Cc:        Terry Lambert <tlambert2@mindspring.com>, Michael Smith <msmith@mass.dis.org>, Gordon Tetlow <gordont@gnf.org>, hackers@freebsd.org
Subject:   Re: nextboot loader diff
Message-ID:  <3CDBE300.2AED36C2@elischer.org>
References:  <200205091911.g49JBaI3002178@mass.dis.org> <3CDAF1A6.13DB883D@mindspring.com> <20020509151603.F43682@stylus.haikugeek.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Jonathan Mini wrote:
> 

> 
> > Maybe you could ask Archie or Ambrisko to clarify the feature
> > you're trying to replace, and then ask Mike about the code
> > needed to do that?

ehem..
WHO wrote that?
 :-)

My original aim was to allow a system to boot successfully using a 
sequence of possible specifications, assuming that one of the filesystems quoted 
(possibly the first) was so trashed that you couldn't read any files from it.

You also had to have:
1/ a way of setting the boot specification list from the running system.
2/ a simple and unlikely-to-break method of ensuring that if the boot did NOT
succeed, it did something DIFFERENT next time.
3/ the ability to read the specification information regardless of the state
of the first filesystem (e.g. completely trashed).
4/ The ability to specify a filesystem on another planet^H^H^H^H^H^Hdisk.

Unfortunatly  I couldn't get away from having the boot1 on the first
disk, but possibly that could be fixed too. At least the boot1 code is not in 
the filesystem itself and therefore hopefully less likely to be trashed.

My decisions were:
A) make boot0 do the actual load of the spec from block1 immediatly after it 
had read block0.. All teh registers were set up correctly to read the next
block.
block1 is almost alway unused, and if it was used it wouldn't have the correct
magic numbers and would be ignored.

B) If the magic numbers matched..
Copy the first spec string, skipping initial NULLS to above the top of the
stack,
for retreival by boot1 (it could get at it as if it were an argument)

C) ZERO out that string, now the NEXT string is the first string.

D) write the block back using the same registers, while still in boot0.

E) Boot1 retrieved the string from the stack.
..
Julian


> 
> Gordon is working on rewriting nextboot(8) so that it works again. I
> shouldn't have to tell you to RTFM, Terry. ;P
> 
> --
> Jonathan Mini <mini@freebsd.org>
> http://www.haikugeek.com
> 
> "He who is not aware of his ignorance will be only misled by his knowledge."
>                                                         -- Richard Whatley
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-hackers" in the body of the message

-- 
+------------------------------------+       ______ _  __
|   __--_|\  Julian Elischer         |       \     U \/ / hard at work in 
|  /       \ julian@elischer.org     +------>x   USA    \ a very strange
| (   OZ    )                                \___   ___ | country !
+- X_.---._/    presently in San Francisco       \_/   \\
          v



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3CDBE300.2AED36C2>