On Tue, Oct 17, 2023 at 10:34 AM Karel Lucas <[email protected]> wrote:
> Content of relink.log:
>
> (SHA256) /bsd: OK
> LD="ld" sh makegap.sh 0xcccccccc gapdummy.o
> ld -T ld.script -X --warn-common -nopie -o newbsd ${SYSTEM_HEAD}
> vers.o ${OBJS}
> text data bss dec hex
> 21325291 403432 1241088 22969811 15e7dd3
> mv newbsd newbsd.gdb
> ctfstrip -S -o newbsd newbsd.gdb
> rm -f bsd.gdb
> mv -f newbsd bsd
> install -F -m 700 bsd /bsd && sha256 -h /var/db/kernel.SHA256 /bsd
> install: rename: INS@4erJJ3bo3 to /bsd: Operation not permitted
> *** Error 1 in /usr/share/relink/kernel/GENERIC.MP (Makefile:2267
> 'newinstall')
>
So renaming over /bsd failed with EPERM. That smells like /bsd is marked
immutable via chflags. To verify, what's the output of
ls -ldo / /bsd
?
If it *is* marked immutable, then uh, you'll need to undo that and figure
how the heck that happened and make sure it doesn't happen again.
(If _you_ marked it immutable, then don't, or at least don't waste people's
time when that breaks things.)
Philip Guenther