Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DVD emulation #322

Open
sharicov opened this issue May 27, 2021 · 33 comments
Open

DVD emulation #322

sharicov opened this issue May 27, 2021 · 33 comments
Assignees
Labels
type:feature New feature or request

Comments

@sharicov
Copy link

Large windows ISOs (>2.2GB) not bootable (worked in previous versions of pkvm).
Latest pkvm version (updated today).
Getting error 0xc000000d on boot.
Tried with several WinPE builds - same issue.
Small WinPE works fine (260MB) - same PE build as large ISO.
Mounting via web pikvm interface - can see correctly on host PC, but no boot.
Same large ISOs boot correctly with aioboot and ventoy.
Copied ISOs directly to microSD card, created .completed in /meta.
Fixed permissions from pikvm:

kvmd-helper-otgmsd-remount rw
chown kvmd:kvmd /var/lib/kvmd/msd/images/*
chown kvmd:kvmd /var/lib/kvmd/msd/meta/*
kvmd-helper-otgmsd-remount ro

Please assist.
Thanks!

@sharicov
Copy link
Author

sharicov commented May 27, 2021

Thanks for quick response, tried several Linux ISOs:
Ubuntu-budgie-21.04 not booting, not even showing up in the boot menu.
Tiny Core Linux x64 (12) boots normally.
Very strange behavior
Can it be related to the fact that pikvm truncates files larger than 2.2GB?
Currently trying to upload ubuntu image via web interface to see if it will boot.

@mdevaev
Copy link
Member

mdevaev commented May 27, 2021

Yes

@sharicov
Copy link
Author

Both linux and windows?
So how do you handle it?

@mdevaev
Copy link
Member

mdevaev commented May 29, 2021

Large images cannot be booted when emulating a CDROM. It doesn't matter Linux or Windows.

@mdevaev mdevaev self-assigned this May 29, 2021
@mdevaev mdevaev added type:feature New feature or request type:question User question and removed type:feature New feature or request labels May 29, 2021
@sharicov
Copy link
Author

Tried uploading iso images via web interface - still didn't work, but I certainly remember booting large isos with pikvm (strelec iso).
How come?

@mdevaev
Copy link
Member

mdevaev commented May 30, 2021

So uploading or booting doesn't work?

@sharicov
Copy link
Author

No, tried both Linux (ubuntu) and WinPE (strelec).
Windows gives 0xc000000d error, Linux doesn't show up in the bios boot menu at all. (same as copying to microSD directly).
That drives the whole ISO boot mechanism useless since you don't have modern bootable ISOs under 2.2 GB.
Please check for regression in the newest versions of pikvm.
Thanks!

@mdevaev
Copy link
Member

mdevaev commented May 30, 2021

Nothing has changed in this place. ISO never working with images over 2.2 GB. Big images require flash drive emulation

@sharicov
Copy link
Author

Ok, it is what it is then.
Can you please add flash image creation in the web interface and enable option for read write the image partition?
So one can create, map and write to flash drive emulation without leaving the web interface?
Would be a killer feature!
Thanks

@mdevaev
Copy link
Member

mdevaev commented May 30, 2021

I'd rather do DVD support in the future

@sharicov
Copy link
Author

Rather one would be great!

@Zulgrib
Copy link

Zulgrib commented Jun 23, 2021

DVD emulation would probably solve this issue, most ISO are DVD sized these days for system with fancy GUI.

@arch1mede
Copy link
Contributor

Yes but the correct DVD emulation is not, this is on the todo list but no ETA as other things are taking more priority.

@petrkr
Copy link

petrkr commented Jul 22, 2021

Actually I solved that 2 years ago... that size is hard-coded in OTG mass storage.. Do not know if you will increase this limit (or even disable that check) if that simply start to work.. That time I did not test recompile my own kernel module with such "fix"

https://github.com/torvalds/linux/blob/master/drivers/usb/gadget/function/storage_common.c#L247

@mdevaev mdevaev changed the title Large windows ISOs not booting DVD emulation Jul 24, 2021
@mdevaev mdevaev added type:feature New feature or request and removed type:question User question labels Jul 24, 2021
@remlei
Copy link

remlei commented Oct 28, 2021

assuming that the 2.1gb ISO patches are applied here, you can solve this Windows ISO issues by just converting the ISO extension from UDF to Joliet. Most Windows 10 and 11 ISOs have install.wim files larger than 4GB so you need to split that wim file into smaller parts. After that it all works just fine.

Tested this on drivedroid app for android and also a distribution image of gadget_cdrom for raspberry pi zero.

Still, we need a proper DVD ROM emulation for this to properly work, so far, all kernel patches for DVD ROM emulation are rejected so were still stuck with CDROM emulation at this age. Even making the UDF extension through CDROM emulation to work properly on usb gadget is pia.

@mdevaev
Copy link
Member

mdevaev commented Oct 28, 2021

There are not applied

@TheLinuxGuy
Copy link

Any idea if DVD emulation will be on roadmap anytime in 2022?

@mdevaev
Copy link
Member

mdevaev commented Dec 26, 2021

@TheLinuxGuy I don't know, sorry. Maybe I'll do it myself or try to find someone who will do it.

@Paxy
Copy link

Paxy commented Mar 6, 2022

Workaround:

  • Use Rufus or a similar ISO to flash conversion tool to write ISO to USB flash
  • Use DD tool to create image from USB flash
  • Upload DD image and use it as Flash mount in PiKVM

@TheLinuxGuy
Copy link

Just wanted to swing by with my annual anniversary comment asking if this feature could be prioritized in order to improve UX and convenience to all pikvm users.

Most common major linux distros which offer livecd booting bundle it on their DVD image. Example: all manjaro downloads are greater than 3GB single .iso images: https://manjaro.org/download/ -- flash mode doesn't work for them.

All workarounds are inconvenient and require many steps to make it work. If there was maybe a batch script "tool" provided by pikvm that does the automatic conversion to workaround this bug/FR then I would be happy with that if it was available and pivkm took care of it mostly for me.

@folfy
Copy link

folfy commented Oct 23, 2023

@mdevaev RFC - How about shipping a pre-build image of a ventoy USB (which is about 22M compressed) with PiKVM as a 95% workaround feature? It would mean that we only would have to script putting the iso/image onto the data partition of the USB image as well. For most systems and cases Ventoy works pretty much out of the box, IMHO this would be the next-best solution besides a real DVD emulation. It would be way easier/faster, than dealing the conversion on your PC all the time, and you'd be able to download the iso's directly from the source via your PiKVM (avoiding having to down- and upload it on your local host).

As a MVP, this would be a simple "convert" button, that would:

  • Set MSD to RW and unzip the pre-build ventoy.img.gz to e.g. <iso/img-name>_ventoy.img
  • Expand the new ventoy-image (sparse-resize), and the data partition to the required size (with parted), to fit the iso/img to be "converted"
  • Mount the data partition via loopback, copy original iso/img to it
  • Unmount and set MSD to RO
    Since step 3 is limited by the speed of your storage device, ideally we would also support direct download of an image "into" a new ventoy-image. One might consider to also just have one ventoy image, and load all images into there (since Ventoy is multi-boot out of the box).

I'd happily support the implementation of such feature.

@mdevaev
Copy link
Member

mdevaev commented Oct 25, 2023

@folfy I'm not sure. It looks like a crutch instead of fixing a DVD in the kernel.

@folfy
Copy link

folfy commented Oct 25, 2023

@mdevaev I get that, but I doubt fixing DVD device emulation is gonna be an "easy" task to solve in the near future?
Actually, if the solution didn't get ya sold, what if I could implement it in a way that you could just on-demand mount a Ventoy-image with the existing MSD partiton as one virtual storage, allowing you to select and boot any image via Ventoy? It actually might be viable too, and this overall would be useful even if we would have a working DVD emulation, I mean Ventoy has more features.

@mdevaev
Copy link
Member

mdevaev commented Oct 28, 2023

Any solution made now will have to be supported, so I wouldn't want to do any special magic. in fact we'll probably make a dvd next year.

@SagnikSRHUSE
Copy link

Is it possible to know when this would be a thing? Perhaps a rough estimate?

@mdevaev
Copy link
Member

mdevaev commented Mar 11, 2024

I'm not working on it right now because there are higher priorities. You can use Ventoy as a workaround.

@drashna
Copy link

drashna commented Mar 18, 2024

Sorry to dogpile, but ran into this and was a bit disappointed.

However, creating an img file, mounting that as writeable, and using the Windows Media creation tool on the resulting USB flash drive image boots for me, in uefi mode without CSM enabled. Don't even need to use ventoy.

@Zitt
Copy link

Zitt commented May 22, 2024

Count me as disappointed.
I need to be able to install DVD images to install OSes like ubuntu.

@mdevaev
Copy link
Member

mdevaev commented May 23, 2024

You can use Ventoy to boot DVD images.

@petrkr
Copy link

petrkr commented May 23, 2024

Ventoy is paid for PXE. ventoy/PXE#51 (comment)

for images like ubuntu you can emulate DISC instead DVD, because that ISO is hybrid, so it should work same as USB flash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or request
Development

No branches or pull requests