Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Oct 1998 14:38:40 +0800
From:      Peter Wemm <peter@netplex.com.au>
To:        Chuck Robey <chuckr@mat.net>
Cc:        Mike Smith <mike@smith.net.au>, Stephen Hocking-Senior Programmer PGS Tensor Perth <shocking@prth.pgs.com>, hackers@FreeBSD.ORG
Subject:   Re: The new bootloader - how do you set it up? 
Message-ID:  <199810290638.OAA04511@spinner.netplex.com.au>
In-Reply-To: Your message of "Thu, 29 Oct 1998 01:04:50 EST." <Pine.BSF.4.05.9810290100270.2963-100000@picnic.mat.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
Chuck Robey wrote:
> On Wed, 28 Oct 1998, Mike Smith wrote:
> 
> > > Can someone give me a pointer? I'm still running an a.out kernel on a sys
    tem 
> > > that was installed from a 3.0 snapshot CD and has been kept upto date via
     cvs 
> > > since.
> > 
> >   make world
> > 
> > followed by 
> > 
> >   disklabel -B -b /boot/boot1 -s /boot/boot2 <disk>
> > 
> > will upgrade you completely.  The visible parts of the new loader are 
> > in /boot/loader, and are updated by 'make world'.

I'll also mention that this is jumping in at the deep end.  You can 
shortcut and do this:   echo "/boot/loader" > /boot.config
as an intermediate step and test that.  This will cause the existing 
bootblocks to load the 3rd stage boot loader by default instead of
/kernel - but you are not yet committed.  You still have the old boot: 
prompt and can load /kernel.aout explicitly.  The command that Mike has 
given puts the new boot *blocks* on the disk which are not strictly 
necessary to use the /boot/loader boot loader.

You can actually test the new bootloader out by explicitly typing in
/boot/loader  at the existing boot: prompt.

> Excuse me (I'm worried about doing something inordinately dumb), just to
> verify, if I do that line above, after a buildworld/installworld, and
> then build a new kernel with KERNFORMAT set to elf, and install it, I
> should be running ok, right?  All my newly regenned lkms will keep on
> humming fine, same obj files that powered the aout kernel, right?

If you build an ELF kernel, you throw out the lkm's.  They are a.out only, 
because it depends on the a.out 'ld' command.  Instead you can use the src/
sys/modules stuff with kldload/kldunload and/or loading them at boot time 
via the /boot/loader command prompt or the /boot/loader.conf script.

One of my machines has:

peter@overcee[2:34pm]~src-240> cat /boot/boot.conf 
load kernel
load nfs.ko
autoboot 10

This makes the boot loader pull in the kernel and the nfs module, then 
autoboot in 10 seconds unless it's aborted for further adjustments.

> If I get an answer here, I'll go ahead and take the next step (gulp!)

If you keep an a.out kernel handy, and use the old (existing) bootblocks 
to activate /boot/loader, you need not commit until you know it all works 
to your satisfaction.  I use it for all of my machines here.

If you have got Really Old (tm) bootblocks (eg: 2.1.x or old 2.2.x vintage),
you may like to update to the current a.out bootblocks first.  The older 
bootblocks do not understand /boot.config

Cheers,
-Peter




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?199810290638.OAA04511>