Hello,

Do you have a proposed use-case for this in mind?
On MBR disks there is usually enough space for core.img before the
first partition.
On GPT you can simply create a so-called "BIOS boot partition" to
store core.img.
But in either, BIOS is a legacy platform, so I doubt many new users of
this would emerge.

Best regards,
Mate

On Wed, Mar 13, 2024 at 10:22 AM Dr. Tilmann Bubeck <tilm...@bubecks.de> wrote:
>
> I would like to propose a change to GRUB to allow embedding (fs_embed)
> of core.img for ext2/3/4 into the
> filesystem. This allows the installation of GRUB into ext2 without the
> need to use (unsafe) block lists.
>
> It will be realized using the ioctl(EXT4_IOC_SWAP_BOOT) introduced into
> Linux 3.10 in 2013. This ioctl basically swaps the data blocks of the
> associated file with the EXT2_BOOT_LOADER_INO inode. After using the
> ioctl the code of core.img is stored in the BOOT_LOADER incode of the
> filesystem and it is not accessible to file system tools anymore. This
> ensures, that the boot code is safe and installation into a partition is
> possible.
>
> What would you think about this proposal. Are you willing to integrate
> this, if I develop this for GRUB?
>
> Changes will be done mainly in setup.c and ext2.c
>
> Kind regards
>     Tilmann Bubeck
>
> _______________________________________________
> 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

Reply via email to