Re: Installing on a read only file system

"D'Arcy J.M. Cain" <[email protected]>
Newsgroups gmane.os.netbsd.devel.installation
Organization The NetBSD Project
Message-ID <[email protected]>
On Mon, 2 Jun 2014 17:49:46 +0200
Martin Husemann <[email protected]> wrote:
>   MAKEOBJDIR can be provided only in the environment or via the -O
> flag of build.sh; it cannot usefully be set inside a Makefile,
> including mk.conf or ${MAKECONF}.

Thanks.  I added "-M /usr/obj" to building the tools and a GENERIC
kernel and that worked fine.  However, I still have a problem building
distribution:

...
(cd /usr/src/sys/rump/librump/rumpkern && rm -f vers.c version
librump.o librump.po librump.so.0.map   a.out [Ee]rrs mklog core *.core
machine x86_64 amd64 x86 i386 || true) rm: machine: Read-only file
system rm: amd64: Read-only file system rm: x86: Read-only file system
rm: i386: Read-only file system
Failed to remove the following files
from /usr/src/sys/rump/librump/rumpkern: amd64
        i386
        machine
        x86

I fixed this.  For future searches I will explain what I did.

The read only directories, /usr/src and /usr/pkgsrc, are null mounts
over a regular RW directory /usr/NetBSD/cvs/...  The purpose is to
allow a guaranteed cleanup by doing "rm -rf /usr/obj/*".  However, I
used to just run builds in the RW directory.  This left a few files
behind that interfere.  I thought that I had found them all but missed
some.  The easiest way to find those if you, like me, use a regular
user to CVS update but build as root is to run this at the top level:

 $ find . -user root

You can pipe that to xargs to clean up the tree.  If you aren't sure
you can follow that with a cvs update to restore any files deleted
accidentally.

-- 
D'Arcy J.M. Cain <[email protected]>
http://www.NetBSD.org/ IM:[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.