From owner-freebsd-questions@FreeBSD.ORG Sun May 18 04:30:24 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6298737B408 for ; Sun, 18 May 2003 04:30:24 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C88743FBD for ; Sun, 18 May 2003 04:30:21 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [127.0.0.1]) h4IBUINF088480 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 18 May 2003 12:30:18 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)h4IBUI6U088475; Sun, 18 May 2003 12:30:18 +0100 (BST) (envelope-from matthew) Date: Sun, 18 May 2003 12:30:18 +0100 From: Matthew Seaman To: Rohit Neupane Message-ID: <20030518113018.GB88166@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Rohit Neupane , freebsd-questions@freebsd.org References: <3EC76562.3050505@wlink.com.np> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uZ3hkaAS1mZxFaxD" Content-Disposition: inline In-Reply-To: <3EC76562.3050505@wlink.com.np> User-Agent: Mutt/1.5.4i X-Spam-Status: No, hits=-7.5 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,PGP_SIGNATURE_2, QUOTED_EMAIL_TEXT,REFERENCES,REPLY_WITH_QUOTES, USER_AGENT_MUTT version=2.54 X-Spam-Checker-Version: SpamAssassin 2.54 (1.174.2.17-2003-05-11-exp) cc: freebsd-questions@freebsd.org Subject: Re: make install error X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2003 11:30:24 -0000 --uZ3hkaAS1mZxFaxD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 18, 2003 at 04:35:10PM +0545, Rohit Neupane wrote: > Well, the first kernel that I compiled didn't boot and i had to switch=20 > back to the kernel.old. Now I've again compiled custom kernel. But i get= =20 > error during the make install. The problem is nobody has write=20 > perpission in /kernel and /modules. even the chown command fails saying= =20 > 'Operation not permitted'. It seems /kernel file is locked!! What can I= =20 > do now? That sounds to me as if you're running at a raised securelevel -- if: % sysctl kern.securelevel returns a securelevel or 1 or above, then the schg flags on /kernel and various other files cannot be turned off (see chflags(1)). Securelevels are documented in the init(8) man page, and the boot-time settings are controlled by the "kern_securelevel_enable" and "kern_securelevel" /etc/rc.conf variables. Note however that turning on securelevel involves a cost in terms of limiting your ability to do certain otherwise valid administrative functions, or (the classic gotcha) running X windows. Most desktop users will find the cost/benefit ratio such that they are better off running at securelevel -1 or 0. In your case, and assuming you want to stick with your securelevel settings, in order to install your new kernel, you should reboot to single user mode (by running the 'shutdown -r' command and then interrupting the 10 second countdown as the system comes back up and typing 'boot -s' at the loader prompt) before doing: # fsck -p # mount -a # swapon -a # cd /usr/src # make installkernel KERNCONF=3DFOO Then you need to reboot to single user mode *again* to check that the new kernel is working correctly. Once you've got back to single user mode, you can follow the rest of the usual procedure for updating the system: # fsck -p # mount -a # swapon -a # cd /usr/src # make installworld # mergemaster # reboot Note that building the system (make buildworld) is one of the things affected by the securelevel setting. If you start with an empty /usr/obj then everything will work OK the first time you build. However, certain files under /usr/obj will have their chflags(2) settings changed meaning that they can't be deleted or overwritten the next time you do a buildworld. That will cause the build to fall over somewhere in the middle. There's two or three ways to get round that, all well documented around the net. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --uZ3hkaAS1mZxFaxD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQE+x27KdtESqEQa7a0RAmU9AJ0QzUkj+UazF9uN6L+IrWp/Dy9aVgCgg4dt vWOkEAeRd3xYDcdk6mXfdGU= =4BFi -----END PGP SIGNATURE----- --uZ3hkaAS1mZxFaxD--