From owner-freebsd-hackers Fri May 10 9:18:52 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp.enternet.hu (smtp.enternet.hu [62.112.192.21]) by hub.freebsd.org (Postfix) with ESMTP id 6280037B411; Fri, 10 May 2002 09:18:33 -0700 (PDT) Received: from elischer.org (3e70d2af.dialin.enternet.hu [62.112.210.175]) by smtp.enternet.hu (8.11.6/8.11.6) with ESMTP id g4AGGUr51044; Fri, 10 May 2002 18:16:30 +0200 (CEST) (envelope-from julian@elischer.org) Message-ID: <3CDBE300.2AED36C2@elischer.org> Date: Fri, 10 May 2002 08:10:56 -0700 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en, hu MIME-Version: 1.0 To: Jonathan Mini Cc: Terry Lambert , Michael Smith , Gordon Tetlow , hackers@freebsd.org Subject: Re: nextboot loader diff References: <200205091911.g49JBaI3002178@mass.dis.org> <3CDAF1A6.13DB883D@mindspring.com> <20020509151603.F43682@stylus.haikugeek.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 > 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