Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Mar 1999 13:51:21 -0800
From:      Mike Smith <mike@smith.net.au>
To:        "Daniel C. Sobral" <dcs@newsguy.com>
Cc:        current@FreeBSD.ORG
Subject:   Re: How to add a new bootdevice to the new boot code ??? 
Message-ID:  <199903212151.NAA01089@dingo.cdrom.com>
In-Reply-To: Your message of "Sun, 21 Mar 1999 05:22:13 %2B0900." <36F40375.624C03D0@newsguy.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903212151.NAA01089>