Solved make installworld, permission denied Error code 126

I built the world to what seemed successfully a few times, and when I ran make installworld, it halted with error code 126. I even moved src.conf, and removed options from make.conf for the buildworld. Building and installing the kernel worked fine.

Here is the ending output...
Code:
/bin/sh: make: Permission denied
*** Error code 126

Stop.
make[1]: stopped in /usr/src
*** Error code 1


Stop.
make: stopped in /usr/src
I have the rest saved as a text file, if that needs to be posted too.

I will try it again, with updated sourcecode, which will take a few hours, but I think the problem could be something else.
 
Updated source code, and problem is still there.

Maybe the problem is in my fstab for the temporary file system I'm building on. If that is the case, I will mark this as solved in a few hours.
 
It doesn't work if you have noexec or nosuid as one of the mount options. I can't remember exactly which. But one of these definitely breaks it.
 
It doesn't work if you have noexec or nosuid as one of the mount options. I can't remember exactly which. But one of these definitely breaks it.
I already removed those, and am about an hour into rebuilding it. This is likely to work, with that early confirmation.

Here's what I found from a past thread, how to remount it without rebooting.
/tmp is probably mounted noexec. You can temporarily fix this with mount -u -o exec /tmp.
 
Ahhhh maybe it was /var/tmp then. I just remember doing a tmpfs myself on /var/tmp and /tmp with nosuid and noexec and breaking installworld.
 
It's mainly the noexec on /var/tmp, nosuid shouldn't be a problem.
 
Code:
tmpfs           /usr/obj        tmpfs   rw,mode=1777    0 0
tmpfs           /usr/buildport  tmpfs   rw,mode=1777    0 0
tmpfs           /tmp            tmpfs   rw,mode=1777    0 0
tmpfs           /var/tmp        tmpfs   rw,noexec,mode=1777,nosuid      0 0
This worked for me. I used to have a soft link from /var/tmp/ to /tmp/, but having an additional line in fstab was easier. The kernel and world build in /usr/obj. And I have it set to build ports in /usr/buildport from make.conf. I could try noexec or nosuid for the build directory of ports.

From the output I left out above, make installworld failed trying to access a temporary file from /tmp. The buildworld before that worked fine with no errors.

Code:
PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/tmp/install.KwfEcBM7  LD_LIBRARY_PATH=/tmp/install.KwfEcBM7  PATH_LOCALE=/tmp/install.KwfEcBM7/locale rm -rf /tmp/install.KwfEcBM7
/bin/sh: make: Permission denied
*** Error code 126
 
Back
Top