Page MenuHomeFreeBSD

beinstall: Avoid chrooting into new world
AcceptedPublic

Authored by emaste on Jun 4 2025, 1:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 11, 6:18 AM
Unknown Object (File)
Thu, Oct 2, 11:15 PM
Unknown Object (File)
Wed, Oct 1, 3:30 AM
Unknown Object (File)
Wed, Sep 24, 1:24 AM
Unknown Object (File)
Wed, Sep 24, 1:04 AM
Unknown Object (File)
Tue, Sep 23, 12:55 PM
Unknown Object (File)
Thu, Sep 18, 9:32 AM
Unknown Object (File)
Tue, Sep 16, 8:20 PM
Subscribers
None

Details

Summary
The new world may use system calls that are not in the currently-running
kernel, so we cannot chroot into the new environment to run `make
installworld`, `etcupdate`, etc.  Partially revert commit 16702050ac95
("beinstall: perform pre-installworld steps") and switch back to using
DESTDIR for installworld and so on.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

emaste requested review of this revision.Jun 4 2025, 1:40 PM
emaste created this revision.

Fix the first check, but still failing at the end of the process:

--------------------------------------------------------------
>>> Installing everything completed on Wed Jun  4 15:42:29 CEST 2025
>>> Install world completed in 20 seconds, ncpu: 64, make -j16
--------------------------------------------------------------
       19.52 real        45.05 user        40.78 sys
Bad system call
No openssl on the host, not rehashing certificates target -- /etc/ssl may not be populated.
Bad system call
Cleaning up ...
umount -f /tmp/beinstall.o9Jmls/mnt/usr/src /tmp/beinstall.o9Jmls/mnt/usr/obj/usr/src/amd64.amd64 /tmp/beinstall.o9Jmls/mnt/dev /tmp/beinstall.o9Jmls/mnt
error: etcupdate (post-world) failed!
This revision is now accepted and ready to land.Jun 4 2025, 1:43 PM
olivier requested changes to this revision.Jun 4 2025, 1:44 PM

previous remark wasn’t an approval

This revision now requires changes to proceed.Jun 4 2025, 1:44 PM

We're not going to break the running system, but chroot ${BE_MNTPT} make installworld could be more fragile than make DESTDIR=${BE_MNTPT} installworld if there's there's ever an error in installworld's install tools handling (see ITOOLS in Makefile.inc1). DESTDIR is used for installkernel. beinstall switched to using chroot in 16702050ac953d957a42fbc498e22c95078ad689 to fix "upgrading using beinstall past the new ntpd user change".

I imagine installworld can be switched back to DESTDIR but with DB_FROM_SRC added, as is done for release artifact builds.

Previous comment crossed paths with @olivier's update -- it seems we will need to revert the chroots and use DB_FROM_SRC and the similar support in etcupdate etc., all as done for the release artifact builds.

emaste retitled this revision from beinstall: Bypass installworld's old-kernel check to beinstall: Avoid chrooting into new world.
emaste edited the summary of this revision. (Show Details)
emaste added a reviewer: will.

Latest version allows to correctly run beinstall

This revision is now accepted and ready to land.Jun 5 2025, 5:16 PM