Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Aug 1998 22:13:05 +0000
From:      Mike Smith <mike@smith.net.au>
To:        Alfred Perlstein <bright@www.hotjobs.com>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: fix for boot and possible problem with DEVFS 
Message-ID:  <199808192213.WAA00562@dingo.cdrom.com>
In-Reply-To: Your message of "Wed, 19 Aug 1998 23:42:38 EST." <Pine.BSF.3.96.980819232401.305A-100000@bright.fx.genx.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> ok, here's the problem with booting off a second BSD partition:
> 
> the bootstrap has no notion of "where it was loaded from" it just blindly
> picks the first BSD partition it finds to load the boot2 program or root
> directory info.

That's correct.  The first BSD partition should have a valid bootstrap.

> a simple kludge would be to "brand" an area of this binary before it is
> installed, or perhaps have the boot loader find out?  i'm unsure how to do
> this right now. (PC intern is under a lotta stuff at home)

You could improve the bootloader to prefer an 'active' BSD partition, 
and fallback to the first if one was not found.  I'll take this up with 
Robert Nordier who has some improvements to boot1 (boot beyond 1024 
cylinders, etc.) which we hope to incorporate before 3.0.

> devfs probes the floppie to see if it is bootable, this isn't that great
> and should have some flag to disable that as it sorta makes the machine
> vulnerable to someone sticking a hacked PICObsd disk in (perhaps in a
> public lab)

devfs won't (shouldn't) mount root off the floppy if the kernel was 
loaded off a harddisk.

> also, devfs checks each partition in order, this is urm, basically
> an inconvient way to find a root partition, again, can't something be
> passed though the boot -> kernel -> devfs to tell it where it's actually
> booting from?

The booted slice number is already passed through.  I believe it's 
correctly used.  If this isn't the case, a fix is trivial.  See the 
improved non-DEVFS root location and mounting code.
-- 
\\  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-hackers" in the body of the message



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