elemental-toolkit icon indicating copy to clipboard operation
elemental-toolkit copied to clipboard

Location of grubenv, grub_oem_env, grubcustom are not put in the grub2 dir

Open jjqq2013 opened this issue 6 months ago • 0 comments

Elemental derivative has a COS_STATE partition which has following structure:

<ROOT_OF_COS_STATE>
    cOS/
    grub2/
    grubenv
    grub_oem_env
    grubcustom/
    ... ...
  • The first confusing thing is that the grubenv,grub_oem_env,grubcustom are not in the grub2 dir as in normal convention.

This is especially true when install the OS via PXE installer under Legacy boot mode, int result disk, there will be another grubenv file:

<ROOT_OF_COS_STATE>
    cOS/
    grub2/
      grub.cfg
      grubenv               <====== 
      ...
    grubenv                 <======
    grub_oem_env
    grubcustom/
    ... ...
  • Another related thing is: after boot, the <LOGICAL_ROOTFS>/boot/grub2 dir is still empty, looks weird, it is supposed to be bind mounted with < ROOT_OF_COS_STATE >/grub2.

These things are all trivial, but it would be good if

  • move (or make symlinks) of grubenv,grub_oem_env,grubcustom to grub2 dir
  • bind mount <ROOT_OF_COS_STATE>/grub2 to <LOGICAL_ROOTFS>/boot/grub2 after boot.

Yet need keep compatibility of old version.

jjqq2013 avatar Jul 08 '25 09:07 jjqq2013