Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Oct 1998 11:23:41 -0700 (PDT)
From:      Doug White <dwhite@resnet.uoregon.edu>
To:        Mike Smith <mike@smith.net.au>
Cc:        current@FreeBSD.ORG
Subject:   Re: BTX + floppy = confusion 
Message-ID:  <Pine.BSF.4.03.9810081106590.18029-100000@resnet.uoregon.edu>
In-Reply-To: <199810080818.BAA02213@dingo.cdrom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 8 Oct 1998, Mike Smith wrote:

> > I have a Phoenix BIOS'd P90 at work running 3.0-981004-BETA with one IDE
> > disk and three SCSI disks.  System is on the IDE disk.  The BIOS won't
> > boot the disk directly (the fdisk table is probaly misgenerated, libdisk's
> > fault probably; it's the same box that reported the odd sysinstall/newfs
> > problems I reported earlier).
> 
> Is this by any chance using a "dangerously dedicated" disk?

It was at one point, but it's sliced now.  I'm sure it's a geometry
goofup (with some old Phoenix silliness mixed in).

> > For fun and games, I built an ELF kernel and built the BTX loader and
> > stuck it in /boot as directed.  I then booted from the floppy and told it
> > to load
> 
> How recent?

Aformentioned 10/04 beta.

> > wd(0,a)/boot/loader
> > 
> > Up pops the minikernel... good so far .. then it complains that
> > it couldn't identify the boot disk.  I hit a key to get the prompt, and
> > get dumped to
> > 
> > disk0a:>
> > 
> > (There's a comment in the btx loader code near the check that explains the
> > situation exactly, it starts with 'If we are booted by an old bootstrap,
> > we have to guess at the BIOS unit number.' Is there a new boot1/boot2 I
> > should feed to my floppy?)
> 
> You can rebuild the old ones, which now set the BIOS unit number 
> correctly, yes.

'disklabel -b fd0' with the provided bootblocks in the beta doesn't do
anything different.  

> > Now the wacky stuff.
> > 
> > 1.  Okay, no problem, I think.  I type
> > 
> > boot disk1a:/kernel
> > 
> > System starts, tries to mount root from fd0a and panics.
> 
> You've hit a difficult corner case here.  You booted the kernel on 
> disk1a, but the current device (which will become the root device 
> unless you have set rootdev) is still disk0a.  This is not intuitive if 
> you're used to the old bootstrap.  It's an interesting semantic issue.

And the fact that these magic variables aren't documented anywhere (except
the source of course) doesn't help.

> Should 'boot' assume that you want to take the root filesystem from
> where you sourced the kernel?  How about in the case where you've loaded
> the kernel and then some other modules; should the root filesystem be
> the current device (or rootdev) at the end of the process, or should it
> be where the kernel came from?  What if the media from which the kernel
> came from isn't there anymore?  What if the kernel load command was
> 
> load tftp:/kernel ?
> 
> Many worms.  Small can.

I see.  (I like the possibility of tftp'ing from the booter :-) )

> > 2.  After looking at the loader source and discovering the 'show' command
> 
> You can type '?' like it prompts you to when it loads... 8)

> > I try to change currdev and loaddev.  I can change currdev using 'set
> > currdev=disk1a:' but trying to change loaddev gives 'operation not
> > permitted'. 
> 
> That's right.  loaddev is where the bootstrap was loaded from.  It lets 
> you say 'load $loaddev/kernel -v' for example.

ok, I figured some variable interpolation was going on.

> > Hm, ok, I try starting the kernel with
> > 
> > boot /kernel
> > 
> > System boots, and I get dumped to single user complainig that 'mount:
> > /dev/wd0s1a: current device does not match mounted device.'
> >
> > I'm stuck in a hole here since I can't convince the system that /dev/wd0a
> > == /dev/wd0s1a.
> 
> That's because it doesn't.  Depending on how recent your 'loader' is, 
> it looks like my idiot test isn't good enough.  It shouldn't let you 
> open diskXa when diskX is sliced.  To get the right results, you ought 
> to have set 

I think you meant to say 'disk1s1a' which does work. 

I found that if I set bootdev=disk1s1a before booting the kernel, it
mounts up fine.  I didn't see a 'rootdev' variable.  

But that idiot test _does_ need to be fixed since I know -questions will
get flooded with people who get stuck in the hole.

> > Okay, guys, go to it. :) Unless someone wants me to preserve the scene of
> > the crime I'm probably going to wipe it clean and install the 1006 BETA
> > tomorrow afternoon (PST) so I can get around this boot floppy silliness.  
> 
> No probs; apart from the not-quite-childproof point in the loader, 
> that's about what's to be expected.  Thanks for the eval!

No problem. I'm going to put the latest beta on and in the process fix the
BIOS booting issue.  Is it in the plan to keep boot2 around so you can
boot the loader from alternate locations, or will its prompt disappear?
Rhe Solaris/Intel booter has only one prompt and as far as I can tell it's
a three-stage booter.

Doug White                               
Internet:  dwhite@resnet.uoregon.edu    | FreeBSD: The Power to Serve
http://gladstone.uoregon.edu/~dwhite    | www.freebsd.org


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?Pine.BSF.4.03.9810081106590.18029-100000>