无忧启动论坛

标题: Why load_env not working in GNU GRUB2 for windows package [打印本页]

作者: meoit    时间: 2020-5-15 19:50
标题: 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


作者: meoit    时间: 2020-5-15 20:37
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
set env_path="boot/grub/env.ini"
=>
set env_path="/boot/grub/env.ini"
作者: meoit    时间: 2020-5-15 21:17
Still unsuccessful :(

Maybe I am un-lucky. ^^
作者: Climbing    时间: 2021-4-18 00:15
meoit 发表于 2020-5-15 21:17
Still unsuccessful :(

Maybe I am un-lucky. ^^

The answer is  your "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.

grubenv1.zip

167 Bytes, 下载次数: 0, 下载积分: 无忧币 -2

two env

grubenv0.zip

147 Bytes, 下载次数: 0, 下载积分: 无忧币 -2

empty grubenv






欢迎光临 无忧启动论坛 (http://bbs.c3.wuyou.net/) Powered by Discuz! X3.3