Better use of boot environments with Update Station

Want to see something new in a future version of GhostBSD? Let us know!

Moderator: Developer

Post Reply
grahamperrin
Posts: 105
Joined: Sun Sep 04, 2016 6:06 am

Better use of boot environments with Update Station

Post by grahamperrin »

Whilst Update Station installs updates,

tail -f -n 0 /var/log/messages

– I see updates to the running system, whilst the user is logged in to the desktop environment.

Image

Any number of applications might be started, by the user, during this routine, before the set of installed packages is in a self-consistent state. There is, I suspect, a slight risk of issues occurring if the user does not refrain from touching the system until there's an invitation to restart.

Compare with a more cautious routine, which I follow with desktop environments on FreeBSD:
  1. create a boot environment
  2. activate the environment
  3. boot the environment
  4. refrain from log in to the desktop environment
  5. upgrade the boot environment
  6. reboot.
Can Update Station be adapted, to form part of a routine that will not update things whilst the user is logged in to the desktop environment?
Last edited by grahamperrin on Sun Jun 13, 2021 1:17 pm, edited 2 times in total.
grahamperrin
Posts: 105
Joined: Sun Sep 04, 2016 6:06 am

jails, chroot(8) …

Post by grahamperrin »

There's the temptation to use a jail for steps 1–5, but I wouldn't know how.

Without a jail: my experience with FreeBSD using bectl(8), chroot(8) and pkg-upgrade(8) (excluding PkgBase) is that:
  1. the pkg upgrade routine succeeds
  2. there's no record of the routine in /var/log/messages
Concerning the absence of records from /var/log/messages there's an unanswered question: https://forums.FreeBSD.org/threads/80292/post-510579
User avatar
ericbsd
Developer
Posts: 2052
Joined: Mon Nov 19, 2012 7:54 pm

Re: Better use of boot environments with Software Station

Post by ericbsd »

grahamperrin wrote: Sun Jun 13, 2021 8:42 am Whilst Software Station installs updates,
Software Station only installs software. Your title is misleading
grahamperrin wrote: Sun Jun 13, 2021 8:42 am Can Software Station be adapted, to form part of a routine that will not update things whilst the user is logged in to the desktop environment?
I can not really do that to Software Station it only installs software.
grahamperrin
Posts: 105
Joined: Sun Sep 04, 2016 6:06 am

Re: Better use of boot environments with Update Station

Post by grahamperrin »

Sorry, I mistyped. Corrected.

All phrases should have been Update Station; it is (visually) Update Station in the screenshot.
User avatar
ericbsd
Developer
Posts: 2052
Joined: Mon Nov 19, 2012 7:54 pm

Re: Better use of boot environments with Update Station

Post by ericbsd »

I know what you meant. It was too hard to resist to answer like this. :lol:
grahamperrin wrote: Sun Jun 13, 2021 8:42 am Can Update Station be adapted, to form part of a routine that will not update things whilst the user is logged in to the desktop environment?
I have always done updates like Update Station does for years and never had major issues.

The init issue in the picture is because pkg itself restarted a boot service, but it never caused a problem before, at least not in my experience.

I do my updates while working and using the system, and so far, it has been stable for me.

Currently, Update Station creates a new boot environment as a backup.


Now to really answer the meat of the question. It could be done, but that will not be a thing that will be done soon. I have several little things I want to get done first.
grahamperrin
Posts: 105
Joined: Sun Sep 04, 2016 6:06 am

U…S

Post by grahamperrin »

ericbsd wrote: Sun Jun 13, 2021 1:57 pm … It was too hard to resist to answer like this. :lol:
Ha ha, these past few days I'm having real trouble with word pairs after repeatedly mis-typing "software updates" (instead of "soft updates") in relation to UFS in FreeBSD Forums, whilst my mind was bent with problems with UFS (suffice to say: I love ZFS.)

Now anything involving the letters U and S is likely to go wrong!
User avatar
ericbsd
Developer
Posts: 2052
Joined: Mon Nov 19, 2012 7:54 pm

Re: Better use of boot environments with Update Station

Post by ericbsd »

grahamperrin could you make a Feature Request about this?

The only part I will not change is the boot environment since Alan said that it is better to do a backup boot environment than create a boot environment and make the upgrade to it. Apparently, it consumes more space.
grahamperrin wrote: Sun Jun 13, 2021 8:42 am Whilst Update Station installs updates,

tail -f -n 0 /var/log/messages

– I see updates to the running system, whilst the user is logged in to the desktop environment.

Image

Any number of applications might be started, by the user, during this routine, before the set of installed packages is in a self-consistent state. There is, I suspect, a slight risk of issues occurring if the user does not refrain from touching the system until there's an invitation to restart.

Compare with a more cautious routine, which I follow with desktop environments on FreeBSD:
  1. create a boot environment
  2. activate the environment
  3. boot the environment
  4. refrain from log in to the desktop environment
  5. upgrade the boot environment
  6. reboot.
Can Update Station be adapted, to form part of a routine that will not update things whilst the user is logged in to the desktop environment?
I realize that most of the major OSs upgrade on boot and not on the desktop. And that feature will be needed for 13 upgrades to 14.
Post Reply