Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 May 2003 12:30:18 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Rohit Neupane <bikrant@wlink.com.np>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: make install error
Message-ID:  <20030518113018.GB88166@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <3EC76562.3050505@wlink.com.np>
References:  <3EC76562.3050505@wlink.com.np>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



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