Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Feb 2002 10:51:02 -0800
From:      "Kevin Oberman" <oberman@es.net>
To:        Richard Glidden <richard@glidden.org>
Cc:        cft@panix.com, freebsd-questions@FreeBSD.ORG
Subject:   Re: Dropping to single user 
Message-ID:  <20020219185103.006435D09@ptavv.es.net>
In-Reply-To: Your message of "Tue, 19 Feb 2002 13:23:11 EST." <200202191823.g1JINCa35372@zaphod.wox.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
> Date: Tue, 19 Feb 2002 13:23:11 -0500 (EST)
> From: Richard Glidden <richard@glidden.org>
> 
> On 19 Feb, Kevin Oberman wrote:
> 
> > Yes, a 'shutdown now' will "drop you to single-user mode, but you
> > REALLY want to reboot after you installkernel and before you
> > installworld. 
> 
> Actually, isn't this dangerous, since you would be booting a new kernel
> with an old world, which could cause problems if there are significant
> changes to the kernel that breaks the old world?  What I usually do is:

You are booting a new kernel into single-user mode with an old
userland. This should always be safe while the other way around is NOT
always safe.

Using the recommended order (as per the handbook) you know that the
new kernel is bootable and, if it is not, you simply boot kernel.old
and are right back where you were while you figure out what went
wrong.

Once you do an installworld, you really can't back out in any sure way
other than a re-install. Not a lot of fun.

> make buildworld
> make buildkernel KERNCONF=xxxx
> shutdown +15 "Upgrading the World.  Be right back."
>   <backup /etc, the old kernel, anything else that's critical>
> make installkernel KERNCONF=xxxx
> mergemaster
> make installworld
> shutdown -r now
> 
> This way, the running kernel always matches the installed world until
> that final "shutdown -r now" command.  At worst, if the new world
> completely breaks everything, even your ability to reboot, you can just
> hit the reset switch and hope everything was written to disk first.

And this way you have a very real (but small) possibility of losing
the entire system. The handbook recommendations are quite well thought
out and VERY safe.

I see no advantage to breaking the kernel build into two steps if you
plan to boot the new kernel immediately.

R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: oberman@es.net			Phone: +1 510 486-8634

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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