From owner-freebsd-questions Fri Oct 22 17:19:18 1999 Delivered-To: freebsd-questions@freebsd.org Received: from monsoon.mail.pipex.net (monsoon.mail.pipex.net [158.43.128.69]) by hub.freebsd.org (Postfix) with SMTP id CA19514C97 for ; Fri, 22 Oct 1999 17:19:14 -0700 (PDT) (envelope-from mark@dogma.freebsd-uk.eu.org) Received: (qmail 9364 invoked from network); 23 Oct 1999 00:19:13 -0000 Received: from userae10.uk.uudial.com (HELO marder-1.) (62.188.131.152) by smtp.dial.pipex.com with SMTP; 23 Oct 1999 00:19:13 -0000 Received: (from mark@localhost) by marder-1. (8.9.3/8.8.8) id BAA03076; Sat, 23 Oct 1999 01:18:35 +0100 (BST) (envelope-from mark) Date: Sat, 23 Oct 1999 01:18:35 +0100 From: Mark Ovens To: Jeff Gray Cc: Questions at FreeBSD Subject: Re: newbie kernel question- strip problem Message-ID: <19991023011835.B588@marder-1> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: Organization: Total lack of Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Oct 22, 1999 at 02:59:09PM -0700, Jeff Gray wrote: > So, I tried it but.....does not appear to work. > > Running 3.3 Release > > # pwd > / > # strip -g --strip-debug kernel > /usr/libexec/elf/strip: kernel: rename: Operation not permitted > > > permissions are, > -r-xr-xr-x 1 root wheel 10691754 Oct 21 10:19 kernel > > So, I tried, in preparation, > # chmod 755 kernel > chmod: kernel: Operation not permitted > > I then made a copy of the kernel in a /usr directory and ran the same > strip -g --strip-debug /usr/play/kernel.debut > > Worked perfectly, took only a couple of seconds. Went from 10MB to 2 MB > > Rename the one from the play directory as kernel? Not very comfortable > until understanding why the general instruction failled. > /kernel has the immutable flag set: marder-1# ls -lo kernel -r-xr-xr-x 1 root wheel schg 1694816 Oct 17 20:07 kernel ^^^^ use ``chflags noschg /kernel'' to remove it, then strip(1). Don't forget to reset it after with ``chflags schg /kernel'' HTH > Thanks > jeff > > > > > > > You probably have a debug kernel with symbols built into it. I think you > > can "strip -g kernel" but it has been a while. > > Have never tried this so I wish to be a bit careful. > > Looking at man strip and the archives, for ELF kernels > cd / > strip -g --strip-debug kernel > > Nothing else required, this will reduce the size of the object file > /kernel > > This is a real good thing if it is safe, for those with / partitions that > are too small. > > Safe? Any other steps? > > Thanks > jeff > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message -- STATE-OF-THE-ART: Any computer you can't afford. OBSOLETE: Any computer you own. ________________________________________________________________ FreeBSD - The Power To Serve http://www.freebsd.org My Webpage http://ukug.uk.freebsd.org/~mark/ mailto:mark@ukug.uk.freebsd.org http://www.radan.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message