Open davidhedlund opened 1 year ago
Ventoy writes special contents to sectors 0 to 1023. They are not standard MBR or boot code.
Ventoy writes special contents to sectors 0 to 1023. They are not standard MBR or boot code.
Oh! Thank you very much, finally an explanation!
GPT is also affected.
gnome-disk will wipe out all existing partitions on the device if you are restoring a disk image, so I'd really like to be able to install Ventoy disk images: Do you know if there are other methods that it can be accomplished with?
On an MBR disk (and maybe GPT?) You can try first restoring the bytes from 0 to 0x1BD in the MBR using dd for instance. There is a unique sequence of bytes/signature in the MBR boot code which is checked by Ventoy. The partition table starts a 1BE onwards, so don't overwrite that. Partition 2 must immediately follow Ptn 1 WITH NO GAP - not even 1 sector - i.e. first sector of ptn 2 = last sector of ptn1 + 1 Ptn2 must be 32MB (64k sectors) If I recall correctly (it was a while ago since I last looked!)
On an MBR disk (and maybe GPT?) You can try first restoring the bytes from 0 to 0x1BD in the MBR using dd for instance. There is a unique sequence of bytes/signature in the MBR boot code which is checked by Ventoy. The partition table starts a 1BE onwards, so don't overwrite that. Partition 2 must immediately follow Ptn 1 WITH NO GAP - not even 1 sector - i.e. first sector of ptn 2 = last sector of ptn1 + 1 Ptn2 must be 32MB (64k sectors) If I recall correctly (it was a while ago since I last looked!)
I appreciate your help. There are many details, and I'm sure that I will get lost eventually. It took me 10-15 hours to evaluate the issue this far.
Do you mind writing a detailed tutorial that can be published if you have some time over later? Like, if you could test my setup, and verify that your solutions actually works, and exactly what you did by writing detailed steps in every program that you used.
Also, I'd be happy if you would like to submit a feature request. It would be great if Ventoy itself could update those values.
What exactly are you trying to do? Presumably you don't want to simply take a disk image and you don't want to just run the Ventoy disk making program?
What exactly are you trying to do?
I'm trying to install Ventoy on a drive with existing OSes.
Presumably you don't want to simply take a disk image and you don't want to just run the Ventoy disk making program?
Both options will delete all the partitions (the OSes) on the drive.
I updated the top post with this use case. Thank you for bringing this up.
Ventoy requires an MBR, following sectors , ptn start at 2048 lba, ptn 2 exactly 64k sectors and immediately after ptn 1. You would have to move other os's to ptn3 and 4 They probably won't boot unless you boot to Ventoy first and then boot to each ptn. Do you really want to do that? Also you can't update those os's because the boot code and boot partition will be non standard and really confuse both windows and Linux . It is really not practical to have ventoy on an os boot disk because of os updates If efi disk then efi boot partition will be ventoy 32mb one for instance
Ventoy requires MBR
The Ventoy making program has an option: Options -> Partition Style -> GPT. Do you know if Ventoy when installed with GPT, can use partition number 3-4 for example?
, ptn start at 2048 lba, ptn 2 exactly 64k sectors and immediately after ptn 1. You would have to move other os's to ptn3 and 4 They probably won't boot unless you boot to Ventoy first and then boot to each ptn. Do you really want to do that? Also you can't update those os's because the boot code and boot partition will be non standard and really confuse both windows and Linux . It is really not practical to have ventoy on an os boot disk because of os updates If efi disk then efi boot partition will be ventoy 32mb one for instance
Most GNU/Linux distros uses GPT too. Windows 11 requires GPT, and it works with both MBR and GPT. But I get your point: A lot of Windows versions require UEFI to use GPT (see the "Boot support" column in the table at https://en.wikipedia.org/wiki/GUID_Partition_Table#Windows:_64-bit_versions for comparison). So for older mainboards that comes with BIOS instead of UEFI, you have to use MBR instead.
It's way too much work to customize partitions in order to use Ventoy on the same drive that has existing OSes. I mainly opened this issue for development purposes, and to better understand how Ventoy works. In a distant future, it would be great if this issue would be fixed, so people would be able to easily install Ventoy on hard drives with existing OSes, because then people don't need to buy an extra NVMe hard drive just to run Ventoy as quickly as possible. These drives are expensive.
Thank you for important details once again.
Official FAQ
Ventoy Version
1.0.95
What about latest release
Yes. I have tried the latest release, but the bug still exist.
Try alternative boot mode
Yes. I have tried them, but the bug still exist.
BIOS Mode
UEFI Mode
Partition Style
MBR
Disk Capacity
16GB
Disk Manufacturer
Kingston
Image file checksum (if applicable)
Yes.
Image file download link (if applicable)
No response
What happened?
Before you post comments, please read about the proposed solution at:
Why should it be possible to use Ventoy partition images formatted with MBR partition layout?
Test case
USB Flash Drive 1
Let's call this device: /dev/sdb
Install Ventoy on a USB drive with the following settings:
Note, this is just an example, you must generate a table for your own device!
USB Flash Drive 2
Let's call this device: /dev/sdc
Test the disk image (working)
Test the partition images (does not working)
Create two new partitions are identical to the partitions in /dev/sdb:
sudo fdisk /dev/sdb
then type "p" like stated in the previous section).On a final note, I have spent many hours (10-15 hours) to make sure that the manually created partitions in USB Flash Drive 2 are identical in every single aspect to the partitions installed by Ventoy in USB Flash Drive 1 1.