meoit 发表于 2020-5-15 19:50:03

Why load_env not working in GNU GRUB2 for windows package

本帖最后由 meoit 于 2020-5-15 19:51 编辑

Hi guys,

I am using GNU GRUB2 for windows v2.04

This is grub.cfg

insmod loadenv
set env_path="boot/grub/env.ini"
export env_path
load_env --file "$env_path"

Content in env.ini:

# GRUB Environment Block
##########################
mytest=TEST_TES_TEST

When I type in the grub commandline: echo $mytest

it is empty result :(

Why?.

Thanks.

wintoflash 发表于 2020-5-15 20:27:20


meoit 发表于 2020-5-15 20:37:05

Thanks @wintoflash

I tried again. It's show message ERROR: UNKNOWN FILESYSTEM.

This is my the embebded modules for core.img:

biosdisk help boot chain true date extcmd configfile cpio efiemu exfat ext2 fat hfs hfsplus iso9660 newc ntfs procfs reiserfs romfs sfs squash4 tar udf xfs part_acorn part_amiga part_apple part_bsd part_gpt part_msdos part_sun part_sunpc gzio linux linux16 loopback ls lzopio memdisk minicmd normal ntldr sleep xzio loadenv search keystatus probe echo test cat nativedisk datehook video font gfxterm gfxterm_background all_video gfxterm_menu gfxmenu jpeg png halt reboot net multiboot tftp http pxe sendkey crypto hashsum drivemap archelp fshelp regexp

wintoflash 发表于 2020-5-15 20:55:37

set env_path="boot/grub/env.ini"
=>
set env_path="/boot/grub/env.ini"

meoit 发表于 2020-5-15 21:17:37

Still unsuccessful :(

Maybe I am un-lucky. ^^

Climbing 发表于 2021-4-18 00:15:38

meoit 发表于 2020-5-15 21:17
Still unsuccessful :(

Maybe I am un-lucky. ^^

The answer isyour "GRUB environment block" file (aka grubenv) is not in right format.

Attachment has two samples. you can create it by command "grub-editenv" under Ubuntu.
页: [1]
查看完整版本: Why load_env not working in GNU GRUB2 for windows package