Date: Sat, 23 Oct 1999 01:18:35 +0100 From: Mark Ovens <mark@ukug.uk.freebsd.org> To: Jeff Gray <jwg@netbox.com> Cc: Questions at FreeBSD <freebsd-questions@freebsd.org> Subject: Re: newbie kernel question- strip problem Message-ID: <19991023011835.B588@marder-1> In-Reply-To: <Pine.BSF.4.10.9910221450060.4527-100000@cm-24-142-61-16.cableco-op.ispchannel.com> References: <Pine.BSF.4.10.9910221450060.4527-100000@cm-24-142-61-16.cableco-op.ispchannel.com>
index | next in thread | previous in thread | raw e-mail
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
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991023011835.B588>
