Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Sep 2006 10:43:25 -0700 (PDT)
From:      backyard <backyard1454-bsd@yahoo.com>
To:        Migs <jc.devilla@gmail.com>, Erik Trulsson <ertr1013@student.uu.se>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: quick question regarding /usr/obj
Message-ID:  <20060918174325.73564.qmail@web83111.mail.mud.yahoo.com>
In-Reply-To: <450E6996.40903@gmail.com>

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


--- Migs <jc.devilla@gmail.com> wrote:

> Erik Trulsson wrote:
> > On Mon, Sep 18, 2006 at 05:06:09PM +0800, Migs
> wrote:
> >   
> >> I just did a rebuild recently, and saw in the
> handbook that i can take
> >> out /usr/obj with no problems... and seeing as
> its taking up >500mb, I
> >> do want to trim it out...
> >>
> >> However, in uname -a it shows
> >>
> >> FreeBSD shadow.meridiantelekoms.com
> 6.2-PRERELEASE FreeBSD
> >> 6.2-PRERELEASE #0: Mon Sep 18 15:35:23 PHT 2006  
>  
> >>
>
root@shadow.meridiantelekoms.com:/usr/obj/usr/src/sys/ARMITAGE
>  i386
> >>
> >> and no reference of my kernel in /boot, aside
> from /boot/kernel...
> >>
> >> Now, my question is, is the custom kernel I built
> also /boot/kernel? or
> >> does it reside in /usr/obj/usr/src/sys/ARMITAGE?
> >>
> >>     
> >
> > Yes.  The kernel you built was built in
> /usr/obj/usr/src/sys/ARMITAGE/, but
> > is installed into /boot/kernel/.
> >
> > Once you have installed the world+kernel that you
> built you can safely
> > delete everything under /usr/obj/.
> >
> >   
> The handbook did say it was OK to nuke, but didn't
> really explain what
> happened in that directory very clearly. Thanks!
> 
> -- 
> Migs
> Registered Linux user # 381619, but has shifted to
> FreeBSD
> Random Musings (http://lifelin.blogspot.com/)

/usr/obj is left around so you can do partial upgrades
(something you should know exactly what you are doing
when attempted), and/or rebuild the kernel without
having to go through a buildworld again. The updating
instructions for FreeBSD recommend you manually delete
this directory prior to an upgrade to avoid any
possible troubles with only binaries being left around
in the build dir. to free up space I haven't nuked
this dir but will in my next backup. also it is nice
to run

cd /usr/ports && make -DNOCLEANDEPENDS clean

to clean up the ports tree and not have it take a
week. the -DNOCLEANDEPENDS will just make it go
directory by directory without redundantly running a
clean on the dependancies for each port

also your can safely delete /usr/ports/distfiles as
each time you update ports some of these files become
obsolete anyway.

I believe a

cd /usr/src && make clean

is supposed to delete the files in /usr/obj anyway,
but given what the handbook says on updating this
might not be so reliable.


-brian




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