无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
楼主: wintoflash

[发布] grub2文件管理器(BIOS/UEFI启动 ISO/WIM/VHD...)

    [复制链接]
发表于 2020-5-18 17:02:13 | 显示全部楼层
本帖最后由 meoit 于 2020-5-18 17:11 编辑
wintoflash 发表于 2020-5-18 16:51
"wimboot" is a cpio archive.

I am using Windows :)

How to extract your file.---------------------
ok, extracted OK.
回复

使用道具 举报

发表于 2020-5-18 18:00:32 | 显示全部楼层
本帖最后由 meoit 于 2020-5-18 18:03 编辑

OK. WORKING FINEEEEEEEEEEEEEEEE......

@WinToFlash - YOU ARE BEST, SAVED MY LIFE.

THANKS MAN !.
Your BCD, change from \boot\boot.sdi (wih my BCD) to \sources\boot.sdi

Why must \sources\boot.sdi ?. :)
回复

使用道具 举报

发表于 2020-5-18 18:08:40 | 显示全部楼层
网络版?学习一下。
回复

使用道具 举报

发表于 2020-5-18 19:05:12 | 显示全部楼层
学习
回复

使用道具 举报

发表于 2020-5-18 19:37:56 | 显示全部楼层
@WinToFlash

Where do we get the files: startup.bat, winpeshl.ini ?. (for wimboot Windows ISO setup).

点评

??? If you don't use grub2-filemanager, you have to write your own scripts to boot Windows ISOs.  详情 回复 发表于 2020-5-18 20:05
回复

使用道具 举报

 楼主| 发表于 2020-5-18 20:05:33 | 显示全部楼层
meoit 发表于 2020-5-18 19:37
@WinToFlash

Where do we get the files: startup.bat, winpeshl.ini ?. (for wimboot Windows ISO setu ...

???
If you don't use grub2-filemanager, you have to write your own scripts to boot Windows ISOs.

点评

OK, I will write my scripts. And, I want to ask about the command keystatus. When I use Original-GRUB2 from GNU, keystatus working normally. But I test your GRUB2, keystatus not pause when I pr  详情 回复 发表于 2020-5-19 12:54
回复

使用道具 举报

发表于 2020-5-19 12:54:10 | 显示全部楼层
wintoflash 发表于 2020-5-18 20:05
???
If you don't use grub2-filemanager, you have to write your own scripts to boot Windows ISOs.
...

OK, I will write scripts for myself.

And, I want to ask about the command keystatus.

When I use Original-GRUB2 from GNU, keystatus working normally.
But I test your GRUB2, keystatus not pause when I press hold the SHIFT key on my keyboard.

This is script:

if keystatus --shift; then
        echo " Please pause for me."
        sleep --interruptible 8888
fi

点评

how to test it?  详情 回复 发表于 2020-5-19 16:21
UEFI or BIOS?  详情 回复 发表于 2020-5-19 12:57
回复

使用道具 举报

 楼主| 发表于 2020-5-19 12:57:09 | 显示全部楼层
meoit 发表于 2020-5-19 12:54
OK, I will write scripts for myself.

And, I want to ask about the command keystatus.

UEFI or BIOS?

点评

BIOS/LEGACY.  详情 回复 发表于 2020-5-19 13:26
回复

使用道具 举报

发表于 2020-5-19 13:26:29 | 显示全部楼层

BIOS/LEGACY.
回复

使用道具 举报

 楼主| 发表于 2020-5-19 16:21:07 | 显示全部楼层
本帖最后由 wintoflash 于 2020-5-19 16:27 编辑
meoit 发表于 2020-5-19 12:54
OK, I will write scripts for myself.

And, I want to ask about the command keystatus.

???
It works fine.
Screenshot_20200519_162418.png

点评

I tested, still not working. Test boot USB + UEFI Test boot USB + Legacy Test boot ISO + VMWare UEFI Test boot ISO + VMWare Legacy Not working. It's always ignore shift key.  详情 回复 发表于 2020-5-21 15:26
回复

使用道具 举报

发表于 2020-5-21 10:07:45 | 显示全部楼层
W大侠:您好!
    getver.lua从那里可以下载?
谢谢!

点评

那是啥  详情 回复 发表于 2020-5-21 11:28
回复

使用道具 举报

 楼主| 发表于 2020-5-21 11:28:59 | 显示全部楼层
青青草 发表于 2020-5-21 10:07
W大侠:您好!
    getver.lua从那里可以下载?
谢谢!

那是啥

点评

wintoflash:你好! 因电脑硬盘损坏,保存在硬盘中的文件全部丢失,因而,以前你写的文件getver.lua也丢失了。 getver.lua文件内容:通过文件Version.dll获取windows版本名称。 不知你哪里是否有保留getve  详情 回复 发表于 2020-5-23 13:02
以前你写的呀! #!lua -- getver.lua -- Copyright (C) 2018 10 27 A1ive -- "/windows/system32/version.dll"  详情 回复 发表于 2020-5-21 11:32
回复

使用道具 举报

发表于 2020-5-21 11:32:15 | 显示全部楼层

以前你写的呀!
#!lua
-- getver.lua
-- Copyright (C) 2018 10  27 A1ive
-- "/windows/system32/version.dll"
回复

使用道具 举报

发表于 2020-5-21 15:26:14 | 显示全部楼层

I tested, still not working.

Test boot USB + UEFI
Test boot USB + Legacy
Test boot ISO + VMWare UEFI
Test boot ISO + VMWare Legacy

Not working.

It's always ignore shift key.
回复

使用道具 举报

发表于 2020-5-21 15:33:15 | 显示全部楼层
本帖最后由 meoit 于 2020-5-21 15:47 编辑

When booting UEFI in VMware (using ISO) and booting with USB on true machine (uEFI mode enable, secure boot disable), it show parameters on gfxterm that name of files to load / KB / milisecond...
then gfxterm also show (on top window of gfxtheme - i have apply theme). I must press down/up key or press any key to hide this.

How to hide them ?.
回复

使用道具 举报

 楼主| 发表于 2020-5-21 18:00:03 | 显示全部楼层
meoit 发表于 2020-5-21 15:33
When booting UEFI in VMware (using ISO) and booting with USB on true machine (uEFI mode enable, secu ...
  1. export enable_progress_indicator=0
复制代码
回复

使用道具 举报

发表于 2020-5-21 22:46:57 | 显示全部楼层
本帖最后由 meoit 于 2020-5-21 22:58 编辑

Thanks @WinToFlash

I tested the command SLEEP.

sleep --interruptible 5
configfile "${prefix}/main.cfg"

It is not working. Not execute the configfile "${prefix}/main.cfg" after 5 seconds.

Why ? (Original GRUB GNU that working fine).

点评

[attachimg]457538[/attachimg] ??? configfile also works well.  详情 回复 发表于 2020-5-22 09:46
回复

使用道具 举报

 楼主| 发表于 2020-5-22 09:46:51 | 显示全部楼层
meoit 发表于 2020-5-21 22:46
Thanks @WinToFlash

I tested the command SLEEP.


1.png
???
configfile also works well.
回复

使用道具 举报

发表于 2020-5-23 10:45:27 | 显示全部楼层
谢谢楼主分享收藏学习
回复

使用道具 举报

发表于 2020-5-23 13:02:57 | 显示全部楼层

wintoflash:你好!
       因电脑硬盘损坏,保存在硬盘中的文件全部丢失,因而,以前你写的文件getver.lua也丢失了。
getver.lua文件内容:通过文件Version.dll获取windows版本名称。
不知你哪里是否有保留getver.lua这个文件?若有,能否提供一下下载?
谢谢!

点评

没有了。 grubfm里面有个命令,你可以找一下。 也可以自己写一个,又不难。  详情 回复 发表于 2020-5-23 17:23
回复

使用道具 举报

 楼主| 发表于 2020-5-23 17:23:01 | 显示全部楼层
青青草 发表于 2020-5-23 13:02
wintoflash:你好!
       因电脑硬盘损坏,保存在硬盘中的文件全部丢失,因而,以前你写的文件getver. ...

没有了。
grubfm里面有个命令,你可以找一下。
也可以自己写一个,又不难。

点评

wintoflash:你好! 对于BIOS情形,grubfm里面用的是grub4dos; 如果只用grub2, if ntversion "(${device})" sysver; then to_win_ver "${sysver}"; menuentry $" ${winv  详情 回复 发表于 2020-5-24 16:02
好的。谢谢!  详情 回复 发表于 2020-5-23 18:02
回复

使用道具 举报

发表于 2020-5-23 18:02:00 | 显示全部楼层
wintoflash 发表于 2020-5-23 17:23
没有了。
grubfm里面有个命令,你可以找一下。
也可以自己写一个,又不难。

好的。谢谢!
回复

使用道具 举报

发表于 2020-5-23 18:46:25 | 显示全部楼层
不错不错,试试看
回复

使用道具 举报

发表于 2020-5-24 08:35:48 | 显示全部楼层
本帖最后由 longpanda 于 2020-5-24 08:44 编辑
匿名者 发表于 2020-5-4 20:37
对于启动 MSDN Windows 安装镜像,我觉得目前用 wimboot 已经足够了,缺点主要有以下两点:

(1) 不支 ...

简单解释下哈。

对于启动 WinPE ISO,Ventoy 和目前的 grub2-filemanager 都没有什么太好的方法。

这个具体是指哪方面呢?

对于启动 Linux ISO,Ventoy 需要逐个适配,且不能 UEFI 启动没有 UEFI 引导的ISO。

Ventoy一般是按大类适配,一般一类系统是一样的,比如CentOS 7.X, 对于UEFI启动本身不支持UEFI的ISO,这个一来这种系统也越来越少了,二来这本身也有一定风险,除非是原生系统内核本来就支持UEFI,只是ISO制作时没有支持。否则内核启动后不按照UEFI规范的初始化流程走有可能会出问题的。

但是我不认同 Ventoy 向操作系统传递 ISO 位置的方法。
UEFI 下 Ventoy 是通过写 UEFI 环境变量来传递 ISO 路径的。
写入 UEFI 环境变量其实有一定风险,而且有的电脑可能不让写入。
ISO 的 blocklist 信息则保存在 Runtime Services Memory 中。
由于部分 Linux 内核 不让直接读取物理内存,所以有可能需要再通过 libexfat 获取 blocklist。
这种方法不适用于非 exfat 文件系统。

首先Ventoy写在UEFI变量以及内存的信息只是设计用来给Ventoy Compatible的系统用的,Ventoy自己不用它,Ventoy都注入脚本了,这些信息自然也是放到文件里一起注入了。

其次,如果系统想要兼容Ventoy,不需要Ventoy用注入脚本的方式来支持。那么Ventoy写在UEFI变量以及内存中的数据就是给它用的,让它能获取到对应的ISO路径。
对于UEFI变量,这个是UEFI规范,没用不让写入的说法,而且Ventoy写的是Volatile类型的变量,只会写在内存里,不会写入nvram。ISO的blocklist保存在RS memory中,这部分内存
即使是使能了 CONFIG_STRICT_DEVMEM 的情况下也是可以读的。除非系统连 CONFIG_DEVMEM 都禁用(即没有 /dev/mem 设备),这种Ventoy适配到现在也几乎没见到过。libexfat这种直接解析文件系统的只是最后保底的方法,一般用不上。对于非exfat系统,现在看来只有NTFS了,这个也可以借助开源库来解析。 剩下的UDF/XFS/Ext2/3/4 本来在Linux下就可以直接挂载的,就更简单了。

不过话又说回来,如果系统想要兼容Ventoy,系统自己就需要想办法能够读取这部分信息。







点评

Ventoy 应该是只能 patch ISO上的一个文件吧,如果 ISO 里面有两个 wim (比如二合一Windows安装镜像),或者两个 initrd (比如 Debian 安装光盘),就不太好办了。 对于 Linux 类的 ISO 当然只能逐一适配,内核支不  详情 回复 发表于 2020-5-24 09:55
回复

使用道具 举报

 楼主| 发表于 2020-5-24 09:55:34 | 显示全部楼层

Ventoy 应该是只能 patch ISO上的一个文件吧,如果 ISO 里面有两个 wim (比如二合一Windows安装镜像),或者两个 initrd (比如 Debian 安装光盘),就不太好办了。
二来这本身也有一定风险,除非是原生系统内核本来就支持UEFI,只是ISO制作时没有支持。否则内核启动后不按照UEFI规范的初始化流程走有可能会出问题的。

对于 Linux 类的 ISO 当然只能逐一适配,内核支不支持 UEFI 一试便知,这个对最终用户没有影响。

点评

WIM当前只能patch 1个, initrd没有限制。  详情 回复 发表于 2020-5-24 10:04
回复

使用道具 举报

发表于 2020-5-24 10:04:01 | 显示全部楼层
本帖最后由 longpanda 于 2020-5-24 10:09 编辑
wintoflash 发表于 2020-5-24 09:55
Ventoy 应该是只能 patch ISO上的一个文件吧,如果 ISO 里面有两个 wim (比如二合一Windows安装镜像),或 ...

WIM当前只能patch 1个,Windows方面当前没有重点投入,只保证常见的标准安装镜像。等Linux适配差不多了再回头来优化。 initrd没有限制,可以同时 patch N 个,像arch的ISO镜像就有3个。
回复

使用道具 举报

发表于 2020-5-24 22:01:14 | 显示全部楼层
本帖最后由 meoit 于 2020-5-24 22:11 编辑

@WinToFlash

Please support to boot:

Kaspersky Rescue Disk 18 ISO
https://support.kaspersky.com/viruses/krd18

ESET SysRescue ISO

https://www.eset.com/int/support/sysrescue/

booting which without extract source.

I am trying with loopback, but fail.


点评

make sure the iso file is contiguous, and part4 is not in use. use partnew command to create a dummy partition.  详情 回复 发表于 2020-5-25 09:08
回复

使用道具 举报

 楼主| 发表于 2020-5-25 09:08:04 | 显示全部楼层
meoit 发表于 2020-5-24 22:01
@WinToFlash

Please support to boot:

make sure the iso file is contiguous, and part4 is not in use.
use partnew command to create a dummy partition.
回复

使用道具 举报

发表于 2020-5-26 12:05:42 | 显示全部楼层
本帖最后由 meoit 于 2020-5-26 12:23 编辑

grub2 build 20200520 is boot OK wim file

grub2 build 20200525 is boot fail wim file.



I use the same boot command for two your grub2 versions.

Maybe the cause came from newc.

Please fix.


点评

bug fixed  详情 回复 发表于 2020-5-26 16:26
回复

使用道具 举报

 楼主| 发表于 2020-5-26 16:26:38 | 显示全部楼层
meoit 发表于 2020-5-26 12:05
grub2 build 20200520 is boot OK wim file

grub2 build 20200525 is boot fail wim file.

bug fixed
回复

使用道具 举报

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

本版积分规则

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

闽公网安备 35020302032614号

GMT+8, 2024-3-28 20:01

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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