无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 5267|回复: 5
打印 上一主题 下一主题

Why load_env not working in GNU GRUB2 for windows package

[复制链接]
跳转到指定楼层
1#
发表于 2020-5-15 19:50:03 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 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.
2#
发表于 2020-5-15 20:27:20 | 只看该作者

回复

使用道具 举报

3#
 楼主| 发表于 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
回复

使用道具 举报

4#
发表于 2020-5-15 20:55:37 | 只看该作者
set env_path="boot/grub/env.ini"
=>
set env_path="/boot/grub/env.ini"

评分

参与人数 1无忧币 +1 收起 理由
meoit + 1 很给力!

查看全部评分

回复

使用道具 举报

5#
 楼主| 发表于 2020-5-15 21:17:37 | 只看该作者
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.  详情 回复 发表于 2021-4-18 00:15
回复

使用道具 举报

6#
发表于 2021-4-18 00:15:38 | 只看该作者
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

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-11-22 07:31

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表