From owner-freebsd-questions Tue Feb 19 10:51:17 2002 Delivered-To: freebsd-questions@freebsd.org Received: from ptavv.es.net (ptavv.es.net [198.128.4.29]) by hub.freebsd.org (Postfix) with ESMTP id 2F4F137B402 for ; Tue, 19 Feb 2002 10:51:03 -0800 (PST) Received: from ptavv (localhost [127.0.0.1]) by ptavv.es.net (Postfix) with ESMTP id 006435D09; Tue, 19 Feb 2002 10:51:02 -0800 (PST) To: Richard Glidden Cc: cft@panix.com, freebsd-questions@FreeBSD.ORG Subject: Re: Dropping to single user In-reply-to: Your message of "Tue, 19 Feb 2002 13:23:11 EST." <200202191823.g1JINCa35372@zaphod.wox.org> Date: Tue, 19 Feb 2002 10:51:02 -0800 From: "Kevin Oberman" Message-Id: <20020219185103.006435D09@ptavv.es.net> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Date: Tue, 19 Feb 2002 13:23:11 -0500 (EST) > From: Richard Glidden > > 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." > > 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