Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jan 2019 13:56:23 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 235321] freebsd-update gets confused when updating a jail, and jail is missing ${j}/boot and/or ${j}/rescue and/or others
Message-ID:  <bug-235321-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D235321

            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: bugs@FreeBSD.org
          Reporter: eto.freebsd@ethome.sk

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 ja=
il=20
    because freebsd-update cannot find kernel files and learn kernel versio=
n=20
    from them (unless jail is package/world builder that requires kernel fi=
les=20
    to be present to build something, kernel files in jail make no sense, a=
fter
    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 dire=
ctory
>>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 explici=
tly
somehow).

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-235321-227>