Colin Walters
2014-Apr-22 22:58 UTC
[syslinux] Bootloader data in /boot vs package systems (and atomic updates)
Hi, I'm working on https://wiki.gnome.org/Projects/OSTree which is a general-purpose update system for Linux-based operating systems. It isn't a package system itself, but operates at the same level. A primary goal of OSTree is fully atomic updates, and the "swapped chroots" model works well for most of userspace and the kernel/initramfs. However, syslinux relies on loadable modules in /boot. At present in Fedora at least, the RPM package updates these, and it has a %post to ensure that when a newer version of extlinux is installed, we update both the boot modules and the MBR. For more background, see: https://bugzilla.redhat.com/show_bug.cgi?id=1090083 In constrat, GRUB2 keeps its modules in /usr/lib, and grub-install *copies* them to /boot at the same time that the MBR is updated. I like this model more as it allows me to decouple the delivery of updated bootloader data with its actual installation, and ensure that when I do want to update the bootloader, it can happen at a safe(r) time. Would there be any interest in patches for extlinux to support this model? Any thoughts on the general topic?
Gene Cumm
2014-Apr-23 00:16 UTC
[syslinux] Bootloader data in /boot vs package systems (and atomic updates)
On Tue, Apr 22, 2014 at 6:58 PM, Colin Walters <walters at verbum.org> wrote:> Hi, > > I'm working on https://wiki.gnome.org/Projects/OSTree which is a > general-purpose update system for Linux-based operating systems. It isn't a > package system itself, but operates at the same level. > > A primary goal of OSTree is fully atomic updates, and the "swapped chroots" > model works well for most of userspace and the kernel/initramfs. > > However, syslinux relies on loadable modules in /boot. At present in Fedora > at least, the RPM package updates these, and it has a %post to ensure that > when a newer version of extlinux is installed, we update both the boot > modules and the MBR.I think you mean the VBR since no Syslinux variant lives in the MBR and on Linux, the MBR requires manual installation (outside executing one of the installer binaries like linux/syslinux or extlinux/extlinux; paths relative to source tree root in versions before 6.00)> For more background, see: > https://bugzilla.redhat.com/show_bug.cgi?id=1090083 > > In constrat, GRUB2 keeps its modules in /usr/lib, and grub-install *copies* > them to /boot at the same time that the MBR is updated.Does the installation of an updated package of GRUB2 trigger an installation of modules during install on Fedora or does the installation of an updated package require manual installation every time? Or is this perhaps a configuration? The alternative is an additional script that would run the installer binary extlinux and copy *.c32 at the same time.> I like this model more as it allows me to decouple the delivery of updated > bootloader data with its actual installation, and ensure that when I do want > to update the bootloader, it can happen at a safe(r) time.This would also be a distinct departure from past behavior.> Would there be any interest in patches for extlinux to support this model? > > Any thoughts on the general topic?Unlike GRUB*, Syslinux will never be in the MBR and the post-MBR sectors (aka hidden sectors or reserved sectors). GRUB* can live inside the partition entirely to allow a standard MBR but this is dependent on file system and version. -- -Gene
Colin Walters
2014-Apr-23 17:57 UTC
[syslinux] Bootloader data in /boot vs package systems (and atomic updates)
On Tue, Apr 22, 2014 at 8:16 PM, Gene Cumm <gene.cumm at gmail.com> wrote:> > I think you mean the VBR since no Syslinux variant lives in the MBR > and on Linux,Right, thanks.> Does the installation of an updated package of GRUB2 trigger an > installation of modules during install on FedoraIt used to, but no longer does. There's some background here: https://bugzilla.redhat.com/show_bug.cgi?id=735259> The alternative is an additional script that would run the installer > binary extlinux and copy *.c32 at the same time.Yeah, I'm considering changing at least the Fedora extlinux package to work this way.> This would also be a distinct departure from past behavior.Right, that's why I wanted to get feedback here first. I'm not sure if other distributions have encountered this. Maybe it doesn't matter much for traditional package systems as they're not robust against interruption at all anyways.
Ferenc Wagner
2014-Apr-24 07:02 UTC
[syslinux] Bootloader data in /boot vs package systems (and atomic updates)
Colin Walters <walters at verbum.org> writes:> I'm working on https://wiki.gnome.org/Projects/OSTree which is a > general-purpose update system for Linux-based operating systems. It > isn't a package system itself, but operates at the same level. > > A primary goal of OSTree is fully atomic updates, and the "swapped > chroots" model works well for most of userspace and the > kernel/initramfs. > > However, syslinux relies on loadable modules in /boot. At present in > Fedora at least, the RPM package updates these, and it has a %post to > ensure that when a newer version of extlinux is installed, we update > both the boot modules and the MBR. > > For more background, see: > https://bugzilla.redhat.com/show_bug.cgi?id=1090083 > > In constrat, GRUB2 keeps its modules in /usr/lib, and grub-install > *copies* them to /boot at the same time that the MBR is updated. > > I like this model more as it allows me to decouple the delivery of > updated bootloader data with its actual installation, and ensure that > when I do want to update the bootloader, it can happen at a safe(r) > time. > > Would there be any interest in patches for extlinux to support this > model?I don't think vanilla extlinux (or generally, Syslinux) has anything to do with this. Some Fedora RPM packages might exhibit undesirable behaviour, but you should bring that up with the package maintainer. Syslinux upstream does not provide RPM packages, as far as I can see. Moreover, the Syslinux package in Debian (and Archlinux, according to Ady) does not put files into /boot, but leaves copying the modules to some distro- (and packaging-) specific install script, which should fit your purposes. If you still need something supported in extlinux, please provide more details. -- Regards, Feri.
Gene Cumm
2014-Apr-24 09:23 UTC
[syslinux] Bootloader data in /boot vs package systems (and atomic updates)
On Apr 24, 2014 3:19 AM, "Ferenc Wagner" <wferi at niif.hu> wrote:> > Colin Walters <walters at verbum.org> writes:> > However, syslinux relies on loadable modules in /boot. At present in > > Fedora at least, the RPM package updates these, and it has a %post to > > ensure that when a newer version of extlinux is installed, we update > > both the boot modules and the MBR.> I don't think vanilla extlinux (or generally, Syslinux) has anything to > do with this.syslinux.spec.in here: http://git.kernel.org/cgit/boot/syslinux/syslinux.git/tree/syslinux.spec.in --Gene
Maybe Matching Threads
- Bootloader data in /boot vs package systems (and atomic updates)
- Bootloader data in /boot vs package systems (and atomic updates)
- Bootloader data in /boot vs package systems (and atomic updates)
- Bootloader data in /boot vs package systems (and atomic updates)
- Bootloader data in /boot vs package systems (and atomic updates)