Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Nov 1998 10:14:05 -0800
From:      Mike Smith <mike@smith.net.au>
To:        Andrzej Bialecki <abial@nask.pl>
Cc:        Mike Smith <mike@smith.net.au>, Christopher Hall <hsw@acm.org>, freebsd-current@FreeBSD.ORG
Subject:   Re: /boot/loader what to set rootdev to? 
Message-ID:  <199811271814.KAA03531@dingo.cdrom.com>
In-Reply-To: Your message of "Fri, 27 Nov 1998 11:13:53 %2B0100." <Pine.BSF.4.02A.9811271108220.16813-100000@korin.warman.org.pl> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > > I said: "is it possible to start from _DOS_ _partition_". Not "from under
> > > running DOS"... see the difference? 
> > 
> > I didn't, no.  Yes, it's possible; you can load the kernel and then 
> 
> You mean: it's possible with current boot1/boot2 to load kernel from
> DOS partition? How? Or, are you saying that /boot/loader is able to do
> that? Then again, how?

The bootloader can read DOS filesystems.  You'll have to work out how 
to get it into memory without starting DOS; either boot a floppy or 
rework boot1/boot2 to read DOS filesystems instead of UFS.

> Thus far all my attempts at using something other than FreeBSD partition
> for $currdev result in nice System halted message.
>
> BTW. Issuing 'set' with no args should behave as 'show' IMHO, instead of
> 'System halted'...

It's *very* easy to track this sort of bug down; look at 
sys/boot/i386/loader/Makefile, and uncomment the "debug me" lines.  
Also uncomment the '-g' in CFLAGS in src/lib/libstand/Makefile.  
Rebuild and reinstall libstand and then rebuild and reinstall the 
bootstrap.  In the loader object directory you'll have a file called 
'loader.sym'.  This contains full debugging information.

When you get the register dump and 'System halted' message, look at the 
value for %eip.  Then use 

  objdump --debug --dissassemble-all --line-numbers loader.sym

to work out where the problem is.  This will print a full dissasembly, 
but it will also match addresses with source line numbers, which will 
get you sorted pretty quickly.  (Yes, a serial GDB stub would be nice.)

> While I'm at it: I think the built-in commands of /boot/loader should
> leave their result on Forth stack. Otherwise it's really hard to test if
> they were successfull.

Many of the builtins should be frontended by Forth code; some can 
probably be reimplemented largely in Forth (eg. autoboot).  Since 
you're the Forth hacker, not me, I'm happy to take submissions.  8)

-- 
\\  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?199811271814.KAA03531>