From owner-freebsd-current Sat Mar 20 11:52:14 1999 Delivered-To: freebsd-current@freebsd.org Received: from dingo.cdrom.com (castles95.castles.com [208.214.165.95]) by hub.freebsd.org (Postfix) with ESMTP id AA79D14C2F for ; Sat, 20 Mar 1999 11:52:11 -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 LAA12569; Sat, 20 Mar 1999 11:44:21 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199903201944.LAA12569@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: "Daniel C. Sobral" Cc: =?iso-8859-1?Q?S=F8ren?= Schmidt , mike@smith.net.au, 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 00:38:01 +0900." <36F3C0D9.5ED2C3F4@newsguy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Date: Sat, 20 Mar 1999 11:44:20 -0800 From: Mike Smith Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > The major number passed to the kernel is a product of a lot of > guesswork, because the loader has simply not enough information. I > have added a bit of code to my version of loader so you can use the > variable root_device_major_number to override the major number to be > passed to the kernel. I'm inclined to commit it, but I expect strong > objections from Mike, who wants the right thing done before we go > too far with these hacks. Correct. I'm currently leaning heavily towards a tunable which can be set to = explicitly control the device the root filesystem is loaded from, eg. set kern.rootdev.device=3Dda0s1a 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. Bruce really doesn't like the environment, preferring instead arguments = to modules. This breaks down as soon as you try to set things = automatically (which module needs which arguments?) or load things = automatically as a result of dependancies (how do you pass arguments to = something that's loaded invisibly?). So in this case the code would set kern.rootdev.brand to the magic = number, and the kernel would then search for it. 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. -- = \\ 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