https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235321
Bug ID: 235321
Summary: freebsd-update gets confused when updating a jail, and
jail is missing ${j}/boot and/or ${j}/rescue and/or
others
Product: Base System
Version: 12.0-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: bin
Assignee: [email protected]
Reporter: [email protected]
When updating jail without boot and/or kernel eg. /boot and/or /boot/kernel
freebsd-update blows up in two ways:
+1 It becomes impossible to update jail with freebsd-update from within jail
because freebsd-update cannot find kernel files and learn kernel version
from them (unless jail is package/world builder that requires kernel files
to be present to build something, kernel files in jail make no sense, after
all).
+2 It breaks up jail update from host, when using freebsd-update basedir -b
option.
This happens despite jail's ${jailpath}/etc/freebsd-update.conf containing
only:
01 # Components of the base system which should be kept updated.
02 Components world
Eg. no source or kernel. Tangentially related bug #223470.
Case 1 is not easily solvable (without copying some kind of backup of kernel
tre back and forth), but case 2 can be hacked around.
In case 2, during first install phase mtree fails with:
>>Installing updates...mtree: ${jailpath}/boot/kernel: No such file or directory
>>cd: ${jailpath}/boot/kernel: No such file or directory
>>ln: ${jailpath}/boot/loader: No such file or directory
>>ln: ${jailpath}/boot/loader.efi: No such file or directory
>>ln: ${jailpath}/boot/userboot.so: No such file or directory
>>chflags: ${jailpath}/boot/loader_lua.efi: No such file or directory
>>chflags: ${jailpath}/boot/loader_lua: No such file or directory
>>chflags: ${jailpath}/boot/userboot_lua.so: No such file or directory
This can be hacked around temporarily with:
sudo mkdir ${jailpath}/boot/kernel
sudo touch ${jailpath}/boot/loader
sudo touch ${jailpath}/boot/loader.efi
sudo touch ${jailpath}/boot/userboot.so
sudo touch ${jailpath}/boot/loader_lua.efi
sudo touch ${jailpath}/boot/loader_lua
sudo touch ${jailpath}/boot/userboot_lua.so
Which will make install move forward.
Further phases also have problems with ${jailpath}/rescue missing, but that
won't make freebsd-update fail and thus prevent it from updating the jail.
I don't know how much life freebs-update has left, given packaged base, but
even then it would be cool, if both freebs-update and pkg took into account
slimmed down jails without directories like:
/boot
/boot/kernel
/rescue
/proc
/media
/mnt
Eg. "even if it doesn't exist, don't try to update it" (unless told explicitly
somehow).
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"