Default FS Layout Too Small?

Freddie Cash fjwcash at gmail.com
Tue Feb 24 13:20:43 PST 2009


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 at gmail.com


More information about the freebsd-current mailing list