From owner-freebsd-current Sun Mar 21 13:57:29 1999 Delivered-To: freebsd-current@freebsd.org Received: from dingo.cdrom.com (castles212.castles.com [208.214.165.212]) by hub.freebsd.org (Postfix) with ESMTP id F2D7714CD4 for ; Sun, 21 Mar 1999 13:57:26 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (LOCALHOST [127.0.0.1]) by dingo.cdrom.com (8.9.3/8.8.8) with ESMTP id NAA01089; Sun, 21 Mar 1999 13:51:22 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199903212151.NAA01089@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: "Daniel C. Sobral" Cc: current@FreeBSD.ORG Subject: Re: How to add a new bootdevice to the new boot code ??? In-reply-to: Your message of "Sun, 21 Mar 1999 05:22:13 +0900." <36F40375.624C03D0@newsguy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 21 Mar 1999 13:51:21 -0800 From: Mike Smith Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > However Justin's random number comment speaks back to a technique I was > > working on earlier, where such a number would be secreted in the > > disklabel of the disk to be booted. This number would have to be > > generated in a fairly unique fashion (I planned to use the TOD to try > > to keep it from wrapping), and it'd then be passed in in the > > environment or as an argument to the kernel. > > How would that work with netboot or booting from foreign fs, such as > FAT? Netbooting is easy, as we can pass an unmabiguous identifier for the remote filesystem to the kernel (the loader and the kernel share the same context on this). Booting from a FAT filesystem isn't a reality until DEVFS arrives, and at that point we have a pile more options available to us again. I wouldn't be too concerned about that just yet. > If we restrict ourselves to disklabel-carrying fs, an alternative > would be writing the date&time plus a semi-random number (such as > time down to ms) on the disklabel of the disk selected, and passing > this number to the kernel. > > [reads what you said again] > > Unless, of course, that's precisely what you are talking about... Correct. I was looking for a field in the disklabel that I could spam with a suitable number based on the time from the RTC, and I'd then pass that number and the disklabel checksum into the kernel. The only way that this would break would be in the face of tight circumstance and the clock going backwards. > > However, there's another technique which would work quite well, and one > > I'm actually moderately enamoured of (modulo it's ability to confuse > > the heck out of people). > > > > Use the "last mounted on" field to find and mount filesystems. > > Again, same objections... :-) Same solutions. Plus we'd be likely to place some metadata somewhere on a FAT filesystem, so it'd be trivial to put such a field there. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message