grub4dos icon indicating copy to clipboard operation
grub4dos copied to clipboard

grub4efi - map iso (0xff) often fails

Open steve6375 opened this issue 3 years ago • 18 comments

When using map %ISOC% (0xff) || map --mem %ISOC% (0xff) I found that many ISOs would start loading into memory If just use
map %ISOC% (0xff) then some ISOs would not boot I added some debug code...

TO REPRODUCE ISSUE...

errorcheck off
echo do map
debug 3
debug msg=3
echo %ISOC%
map  %ISOC% (0xff) || map --mem %ISOC% (0xff)
pause map done

image

partition is NTFS

Fails under VBox and real system Seems to depend on file location on disk maybe???

grubfm_multiarch.iso in one folder image same iso file but copied to different folder image

here is blocklist of the two files image

steve6375 avatar Jul 27 '21 12:07 steve6375

通过虚拟机直接启动iso镜像,可以启动吗? 感觉是iso的启动文件损坏,或者g4e不能适应。

yaya2007 avatar Jul 27 '21 13:07 yaya2007

image Files are identical Both files boot fine using grubfm Its not just that one file, many other ISO files give same error when using map command.

steve6375 avatar Jul 27 '21 13:07 steve6375

Note: same file loads OK from command line image

but if I load another menu2.lst file and run same command, it fails image image

Is it because each time I use map file (0xff) it creates a new map and then memory becomes full? why is it necessary to create a new floppy drive each time?

steve6375 avatar Jul 27 '21 14:07 steve6375

If I boot to E2B MainMenu and select grubfm-multiarch.iso then it loads OK If I boot to E2B MainMenu and then go to LINUX menu and then go back to MainMenu and select SAME grubfm-multiarch.iso file as before then it does not load. So I think it is to do with memory usage and multiple floppy devices mapped in each time an ISO is mapped to (0xff).

steve6375 avatar Jul 27 '21 14:07 steve6375

你是说,从命令行加载成功,从菜单项加载失败? 可以在菜单项首行增加: !BAT

映射iso时,uefi要加载虚拟磁盘,加载虚拟分区。这个软盘,就是虚拟分区。

yaya2007 avatar Jul 27 '21 14:07 yaya2007

no - it fails from the menu and also from the command line. When the user selects an ISO file, I use map command on each menu entry to display the ISO volume name and ID at the bottom of the menu. So the 'map filex (0xff)' command is executed many times in menu and batch files and also once for each file in menu. image image The map command seems to stop working when there are many floppy devices in the map --status map.

steve6375 avatar Jul 27 '21 14:07 steve6375

Simple test using same ISO file. You can use sample TESTANIM.zip - I have disabled hotkey and animation

First command does not produce 'failed to install virtual partition' but following commands display that message. Then after 2-20 map commands, it fails to work using same ISO. I rebooted each time using VBOX5

simply use map command on a same ISO approx. 2-20 times: This took approx 18 tries. image This one 6 image This one 5 image results vary on each boot! Here is blank menu.lst (text mode) image Different ISO... (not EFI) image

steve6375 avatar Jul 28 '21 15:07 steve6375

Here is a menu.lst which fails to boot the grubfm_multiarch.iso but instead tries to boot the previous Windows ISO!

debug 3
debug msg=3
map /_ISO/MAINMENU/grubfm_multiarch.iso (0xff)
map /_ISO/MAINMENU/WIN11_x64FRE_EN-GB_CORE_PRO.iso (0xff)
map /_ISO/MAINMENU/Windows10_21H1_UK64.iso (0xff)
map /_ISO/MAINMENU/grubfm_multiarch.iso (0xff)
chainloader (0xff)
pause
boot

image

Something is very odd with the map command and memory???

steve6375 avatar Aug 03 '21 15:08 steve6375

试一试今天上传官网的新版本。

yaya2007 avatar Aug 18 '21 02:08 yaya2007

still same problem If you use map /file.iso (0xff) multiple times, then it fails to map properly

steve6375 avatar Aug 18 '21 08:08 steve6375

also support map --unmap=DRIVE ??

steve6375 avatar Sep 09 '21 10:09 steve6375

also support map --unmap=DRIVE ??

Only virtual disks created by g4e itself can be unmounted. Other disks created by the firmware cannot be unmounted. And doing this on some firmware may cause unpredictable problems.

a1ive avatar Sep 09 '21 10:09 a1ive

OK, just would really like multiple map commands to work...

steve6375 avatar Sep 09 '21 10:09 steve6375

现在支持使用 map --unmap=映射驱动器 #333

yaya2007 avatar Sep 16 '21 02:09 yaya2007

Same problem in test version 2022-07-17 map --unmap=0xff before map command has no effect.

steve6375 avatar Jul 17 '22 11:07 steve6375

I have the same issue, tested using real hardware.

Following the template of menu.lst from here: https://github.com/chenall/grub4dos/blob/efi/menu.lst

/mt.iso is a copy of Memtest86-7.5.iso Just a shortcut for testing purposes.

  1. Test: 0xff

find --set-root /mt.iso ls -> The content of the correct partition is shown, find works.

map /mt.iso (0xff) -> This command hangs forever. I tried it multiple times, and shut down the computer after 10 minutes, because the iso is only 12 MB.

  1. Test: fd0

I used fd0, because in this video, fd0 worked: https://github.com/chenall/grub4dos/issues/363#issuecomment-1193179769

find --set-root /mt.iso ls -> The content of the correct partition is shown, find works.

map /mt.iso (fd0) ls (fd0)/ -> The content of the iso-file is shown. map with fd0 seems to work always, tested it with several other isos.

chainloader (fd0) -> Error:

Error 21: (http://grub4dos.chenall.net/e/21) Selected disk does not exist

-> None of those error-links in GRUB4DOS works, each of them gives me a 404-error.

JP95Git avatar Apr 30 '23 19:04 JP95Git

Try the beta version of issues # 404

At 2023-05-01 03:13:46, "JP95Git" @.***> wrote:

I have the same issue, tested using real hardware.

Following the template of menu.lst from here: https://github.com/chenall/grub4dos/blob/efi/menu.lst

/mt.iso is a copy of Memtest86-7.5.iso Just a shortcut for testing purposes.

Test: 0xff

find --set-root /mt.iso ls -> The content of the right partition is shown, find works.

map /mt.iso (0xff) -> This command hangs forever. I tried it multiple times, and shut down the computer after 10 minutes, because the iso is only 12 MB.

Test: fd0

I used fd0, because in this video, fd0 worked: #363 (comment)

find --set-root /mt.iso ls -> The content of the right partition is shown, find works.

map /mt.iso (fd0) ls (fd0)/ -> The content of the iso-file is shown. map with fd0 seems to work always, tested it with several other isos.

chainloader (fd0) -> Error:

Error 21: (http://grub4dos.chenall.net/e/21) Selected disk does not exist

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

yaya2007 avatar May 05 '23 02:05 yaya2007

Thanks. The beta-version works for 0xff, but it is very slow.

These settings work:

title Hiren's BootCD 1.0.2 (64 Bit) (efi, working)
# https://www.hirensbootcd.org/download/
set iso=/Hiren's-BootCD-1.0.2.iso
find --set-root %iso%
map %iso% (0xff)
chainloader (0xff)

title Memtest86 7.5 (efi, working)
set iso=/Memtest86-7.5.iso
find --set-root %iso%
map %iso% (0xff)
chainloader (0xff)

Using fd0 instead of 0xff does not work, it gives me the error Selected disk does not exist

I also have some ISOs, which I booted using kernel and initrd-lines in Grub4DOS (BIOS, not EFI). I have to test them later.

JP95Git avatar May 05 '23 18:05 JP95Git