Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Feb 2009 13:20:40 -0800
From:      Freddie Cash <fjwcash@gmail.com>
To:        freebsd-current@freebsd.org
Subject:   Re: Default FS Layout Too Small?
Message-ID:  <200902241320.40451.fjwcash@gmail.com>
In-Reply-To: <Pine.GSO.4.63.0902241600001.18209@muncher.cs.uoguelph.ca>
References:  <1235502625.4345.2.camel@localhost.localdomain> <49A45558.9060000@math.missouri.edu> <Pine.GSO.4.63.0902241600001.18209@muncher.cs.uoguelph.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
On February 24, 2009 1:03 pm Rick Macklem wrote:
> On Tue, 24 Feb 2009, Stephen Montgomery-Smith wrote:
> > Sean Bruno wrote:
> > cd /usr/src
> > make installkernel
> > .... this dies with a "file system full" error
> > rm -r /boot/kernel.old
> > make installkernel
>
> Although I wouldn't recommend it "in general", for your case I would
> make sure everything you need is configured into the kernel you build
> (so it doesn't need any loadable modules) and then:
>
>    cd /usr/src/sys/<arch>/compile/GENERIC
>    mkdir /boot/kernel.new
>    cp kernel /boot/kernel.new
>
> so that you can boot the new one and see it work before deleting the
> old one.

cd /usr/src
make KERNCONF=WHATEVER buildkernel
make KERNCONF=WHATEVER KODIR=/boot/kernel.new installkernel
nextboot -k kernel.new
reboot

That will install the new kernel into a separate directory, and will cause 
the next boot *only* to use the new kernel.  If things fail, you just 
reboot, and it goes back to the old kernel.  If things work, then it's a 
simple rename of the kernel directory:
  cd /boot
  mv kernel kernel.old
  mv kernel.new kernel
  reboot

KODIR and nextboot are very handy ... especially for remote upgrades.
-- 
Freddie
fjwcash@gmail.com



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