Re: Upgrading bootloader



On Wed, Apr 25, 2018 at 10:23 PM, Colin Walters <walters verbum org> wrote:


On Wed, Apr 25, 2018, at 7:05 AM, Alex Kiernan wrote:
I've a need to upgrade the bootloader and boot scripts (U-Boot) as
part of a deployment. Right now I'm deploying a systemd unit which
upgrades it on reboot, but you obviously end up with the first reboot
going through the old bootloader.

There was a thread on bootloader updates here:
https://mail.gnome.org/archives/ostree-list/2018-February/msg00001.html


That's useful - thanks.

The grub2 code looks like it has support for doing that kind of thing,
but the u-boot code doesn't - am I right in my thinking, or am I
missing something?

I am not aware of any code in the grub2 backend which updates the actual
bootloader code (MBR, ESP).


I'm thinking of the mkconfig stuff, so right kind of phase, but
different requirement.

What you want here may fall into a "post-deploy-script" infrastructure?
Basically after doing a deployment, walk over /usr/lib/ostree/post-deploy.d/
and run each script as a container or so.

Yes, I think that's exactly what I want.

See also https://github.com/ostreedev/ostree/issues/1026
(Though that case differs from this as you want to write outside of the deployment
 root, and in fact see the raw physical devices...which I'm not sure we should
 do for every script by default)


It's an odd mix... you need to write outside the deployment root, so
you're losing all the transactionality and you want to pick files out
of the new deployment to write to the bootloader/boot script. Oh and
what you want to do is invariably specific to a board - I want MLO,
u-boot.img and boot.scr, but others will doubtless want something
totally different (including just dumping raw blobs into devices... I
at least have a filesystem).

-- 
Alex Kiernan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]