From garys@opusnet.com Wed Jul 27 05:56:58 2005 Return-Path: Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4D31F16A41F for ; Wed, 27 Jul 2005 05:56:58 +0000 (GMT) (envelope-from garys@opusnet.com) Received: from opusnet.com (mail.opusnet.com [209.210.200.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 042D843D46 for ; Wed, 27 Jul 2005 05:56:57 +0000 (GMT) (envelope-from garys@opusnet.com) Received: from localhost.localhost [70.98.246.232] by opusnet.com with ESMTP (SMTPD32-8.05) id A2283199014E; Tue, 26 Jul 2005 22:56:56 -0700 Received: from localhost.localhost (localhost.localhost [127.0.0.1]) by localhost.localhost (8.13.3/8.13.3) with ESMTP id j6R5vjqK035307 for ; Tue, 26 Jul 2005 22:57:45 -0700 (PDT) (envelope-from garys@opusnet.com) Received: (from jojo@localhost) by localhost.localhost (8.13.3/8.13.3/Submit) id j6R5veeD035306; Tue, 26 Jul 2005 22:57:40 -0700 (PDT) (envelope-from garys@opusnet.com) Message-Id: Date: Tue, 26 Jul 2005 22:57:40 -0700 From: "Gary W. Swearingen" Reply-To: garys@opusnet.com To: FreeBSD-gnats-submit@freebsd.org Subject: Handbook somewhat off in use of /boot/kernel.old X-GNATS-Notify: >Number: 84154 >Category: docs >Synopsis: Handbook somewhat off in use of /boot/kernel.old >Confidential: no >Severity: non-critical >Priority: low >Responsible: trhodes >State: closed >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Wed Jul 27 06:00:32 GMT 2005 >Closed-Date: Tue Jan 22 15:53:20 UTC 2008 >Last-Modified: Tue Jan 22 15:53:20 UTC 2008 >Originator: Gary W. Swearingen >Release: FreeBSD 5.4-RELEASE i386 >Organization: none >Environment: n/a >Description: The handbook's concept of /boot/kernel always being moved to /boot/kernel.old is wrong (in two places). The move is only made if the currently running kernel came from /boot/kernel/. >How-To-Repeat: n/a >Fix: -- In section 8.3 Building and Installing a Custom Kernel, change The new kernel will be copied to the /boot/kernel directory as /boot/kernel/kernel and the old kernel will be moved to /boot/kernel.old/kernel. to The new kernel and modules will be copied to the /boot/kernel directory but that directory will first be moved in place of /boot/kernel.old if the currently running kernel came from "/boot/kernel". -- In section 8.6, under "The kernel does not boot", change You cannot rely on kernel.old because when installing a new kernel, kernel.old is overwritten with the last installed kernel which may be non-functional. to Standard kernel builds write to /boot/kernel, with that directory first moved in place of /boot/kernel.old if the currently running kernel came from /boot/kernel. >Release-Note: >Audit-Trail: From: Giorgos Keramidas To: "Gary W. Swearingen" Cc: bug-followup@freebsd.org Subject: Re: docs/84154: Handbook somewhat off in use of /boot/kernel.old Date: Wed, 27 Jul 2005 13:47:37 +0300 On 2005-07-26 22:57, "Gary W. Swearingen" wrote: > The handbook's concept of /boot/kernel always being moved to > /boot/kernel.old is wrong (in two places). The move is only > made if the currently running kernel came from /boot/kernel/. AFAIK, the move is made everytime "installkernel" runs. You can verify this by: a) Copy /boot/kernel.old to /boot/kernel.saved.old and /boot/kernel to /boot/kernel.saved # cd /boot # cp -Rp kernel.old kernel.saved.old # cp -Rp kernel kernel.saved Then go through a few "installkernel" runs and watch the /boot/kernel and /boot/kernel.old directories. From: John Baldwin To: freebsd-doc@FreeBSD.org, garys@opusnet.com Cc: FreeBSD-gnats-submit@FreeBSD.org Subject: Re: docs/84154: Handbook somewhat off in use of /boot/kernel.old Date: Wed, 27 Jul 2005 07:52:05 -0400 How about: The new kernel and modules will be copied to the /boot/kernel directory. If the currently running kernel came from "/boot/kernel", then the old kernel and modules will be moved to the /boot/kernel.old directory. > -- In section 8.6, under "The kernel does not boot", > > change > You cannot rely on > kernel.old because when installing a new kernel, > kernel.old is overwritten with the last installed kernel > which may be non-functional. > to > Standard kernel builds write to /boot/kernel, with > that directory first moved in place of /boot/kernel.old > if the currently running kernel came from /boot/kernel. I haven't read the full doc for context, but it looks like the replacement text doesn't actually replace the same meaning. The reason for kernel.old only getting updated if the kernel being installed is running is to try to make kernel.old more reliable as in theory it should always be a kernel that was running well enough to do an installkernel now. Probably the surrounding section here needs more updating to reflect that larger change. =2D- John Baldwin =A0<>< =A0http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" =A0=3D =A0http://www.FreeBSD.org From: garys@opusnet.com (Gary W. Swearingen) To: John Baldwin Cc: freebsd-doc@FreeBSD.org, FreeBSD-gnats-submit@FreeBSD.org Subject: Re: docs/84154: Handbook somewhat off in use of /boot/kernel.old Date: Thu, 28 Jul 2005 06:52:06 -0700 John Baldwin writes: > How about: > > The new kernel and modules will be copied to the /boot/kernel directory. If > the currently running kernel came from "/boot/kernel", then the old kernel > and modules will be moved to the /boot/kernel.old directory. Change "will be" to "will first be". As-is, it doesn't sound right because one wonders how the old kernel can be moved "then", when the old kernel is gone. > I haven't read the full doc for context, but it looks like the replacement > text doesn't actually replace the same meaning. The reason for kernel.old > only getting updated if the kernel being installed is running is to try to > make kernel.old more reliable as in theory it should always be a kernel that > was running well enough to do an installkernel now. Probably the surrounding > section here needs more updating to reflect that larger change. I'm not sure about that reason. I think the reason is that if you're not booting from /boot/kernel, it's probably bad, so there's no reason to save it. (It shouldn't try to be that smart, failing some of the time. I'd always do the backup like my editor does, assuming I'll have saved the old one if I wanted to.) If users follow the handbook, they won't be booting out of /boot/kernel.old anyway as they'll be booting out of /boot/kernel.GENERIC (like I always have). Anyway, here's the whole old para Note: If you are having trouble building a kernel, make sure to keep a GENERIC, or some other kernel that is known to work on hand as a different name that will not get erased on the next build. You cannot rely on kernel.old because when installing a new kernel, kernel.old is overwritten with the last installed kernel which may be non-functional. Also, as soon as possible, move the working kernel to the proper /boot/kernel location or commands such as ps(1) may not work properly. To do this, simply rename the directory containing the good kernel: maybe replace with Note: If you are having trouble building a kernel, keep on hand a GENERIC, or some other kernel that is known to work, as a different name than "/boot/kernel.old". That directory will get removed by standard "make" scripts when installing a new kernel if the running kernel came from "/boot/kernel". Also, as soon as possible, move the working kernel to the proper /boot/kernel location or commands such as ps(1) may not work properly. To do this, simply rename the directory containing the good kernel: From: Pav Lucistnik To: bug-followup@FreeBSD.org, garys@opusnet.com Cc: Subject: Re: docs/84154: Handbook somewhat off in use of /boot/kernel.old Date: Sat, 12 May 2007 18:38:20 +0200 I don't think these paragraphs needs further clarification. In the first case, we don't need to complicate the matters by pointing out the kernel.old creation is conditional. It's just not important in the context of telling the user installkernel installs new kernel into /boot/kernel. In the second case, we want to stress to user that kernel.old cannot be trusted and that the user should do his own kernel.good copy. The debated change made kernel.old a bit more trustworthy, but I don't think we need to relax our message to user here. Let him be scared, we can afford a little lie (simplification, really) here. -- Pav Lucistnik It whines, glows and fades... State-Changed-From-To: open->closed State-Changed-By: trhodes State-Changed-When: Tue Jan 22 15:51:10 UTC 2008 State-Changed-Why: After reading the feedback, relevant handbook sections, and discussing this with brueffer, we feel the handbook documentation is fine. Close this PR. Responsible-Changed-From-To: freebsd-doc->trhodes Responsible-Changed-By: trhodes Responsible-Changed-When: Tue Jan 22 15:51:10 UTC 2008 Responsible-Changed-Why: Over to me as closer. http://www.freebsd.org/cgi/query-pr.cgi?pr=84154 >Unformatted: