Jean-Francois, It's possible to write one's grub.cfg to save GRUB environment variables in pre-existing GRUB environment variable files on an ext4 filesystem. What types of sanity-checking are you looking to do? It may be possible to achieve what you want with just these mechanisms.
-Jon On Wed, May 10, 2017 at 3:13 PM, Vladimir 'phcoder' Serbinenko < phco...@gmail.com> wrote: > > > On Sat, Dec 10, 2016, 18:29 Andrei Borzenkov <arvidj...@gmail.com> wrote: > >> 07.12.2016 00:03, Jean-Francois Le Breton пишет: >> > Hello, >> > I would like to add some checks and modifications to the Linux >> command line >> > before booting the OS. >> > So I am considering writing a grub module which will modify some >> grub.cfg >> > parameters according to data retreived somewhere on dedicated hardware. >> > I just realized that it was not possible to write files (on EFI >> partition >> > or EXT4 partition). >> > Is there an available patch to allow file modifications ? >> > I am using grubx64.efi + my module. >> >> There is no write support in GRUB nor am I aware of any plans to add >> one. > > This is not just lack of plans. Writing to FS structures is inherently > dangerous abd may result in FS corruption. So for safety reasons we reject > writes to FS except in very controlled ways. > >> The only limited possibility is overwriting of existing file using >> blocklists as long as it resides on plain device (no RAID/volume >> manager/crypto/etc). > > >> >> >> _______________________________________________ >> Grub-devel mailing list >> Grub-devel@gnu.org >> https://lists.gnu.org/mailman/listinfo/grub-devel >> > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel > >
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel