make install error

Matthew Seaman m.seaman at infracaninophile.co.uk
Sun May 18 04:30:24 PDT 2003


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 
> back to the kernel.old. Now I've again compiled custom kernel. But i get 
> error during the make install. The problem is nobody has write 
> perpission in /kernel and /modules. even the chown command fails saying 
> 'Operation not permitted'. It seems /kernel file is locked!! What can I 
> 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=FOO

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

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20030518/7d676a1a/attachment.bin


More information about the freebsd-questions mailing list