ventoy / Ventoy

A new bootable USB solution.
https://www.ventoy.net
GNU General Public License v3.0
63.25k stars 4.11k forks source link

[issue]: Improve support to PorteuX #2722

Open porteux opened 10 months ago

porteux commented 10 months ago

Official FAQ

Ventoy Version

1.0.96

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

128GB

Disk Manufacturer

SanDisk

Image file checksum (if applicable)

None

Image file download link (if applicable)

No response

What happened?

On machines that support legacy boot I managed to add support to Ventoy from PorteuX side. However for machines that only support UEFI mode neither normal or grub work.

If you can't change Ventoy code to support PorteuX, could you please tell what I should do from PorteuX side?

Thanks!

steve6375 commented 10 months ago

porteux-v0.9-gnome-42.10-stable-x86_64.iso

This does not seem to UEFI64-boot even under VirtualBox when added as a Virtual CD. How do you know that this actually works when UEFI64 booted ? It also does not boot when using agFM and UEFI64.

catherinedoyel commented 10 months ago

On UEFI hardware I got porteux-v0.9-xfce-4.18-stable-x86_64.iso to boot by extracting contents to fat32 flash drive. This is a SysLinux system not a grub system so grub mode wouldn't do anything afaik. I replaced the files in the iso with the files mentioned in this comment to no change. https://github.com/porteux/porteux/issues/29#issuecomment-1863466296 If I had to guess a hook would need to be modified or created for this distribution.

fulalas commented 10 months ago

@steve6375, indeed using VirtualBox with EFI enabled it doesn't boot, the same way it doesn't for other Syslinux distros I tested, like Slax and Porteus. Is there a solution for this? Because as @catherinedoyel said, it works on a real machine.

@catherinedoyel, thanks for digging into this. Since PorteuX shares some of Porteus structure, I believe the hook would be very similar (maybe the same). Also, in Porteus the hook makes it work in grub mode as well.

steve6375 commented 10 months ago

VBox boots it as a CD\DVD, catherinedoyel tested it on a real machine but extracted the ISO files to a flash drive - not the same thing! Maybe the ISO boot code works by looking for a disk rather than optical media?

catherinedoyel commented 10 months ago

Steve since you have virtualbox running I'd suggest format a new VHD as fat32 and dump the contents to that then use vbox boot menu to see if it fails again.

catherinedoyel commented 10 months ago

The distro is also related to Slax and this strange uefi behavior may have been inherited from there. See the readme in the iso.

porteux commented 10 months ago

Thanks, guys. I'm using this to generate the ISOs:

mkisofs -o "$ISONAME" -v -l -J -joliet-long -R -D -A "$CDLABEL" \
-V "$CDLABEL" -no-emul-boot -boot-info-table -boot-load-size 4 \
-b boot/syslinux/isolinux.bin -c boot/syslinux/isolinux.boot ../. > /dev/null 2>&1

And then:

isohybrid --partok "$ISONAME"

If I try to use isohybrid passing --uefi parameter it says unable to find efi image. Maybe those issues are all connected somehow.

porteux commented 10 months ago

I managed to create an ISO using this command:

./xorriso -as mkisofs -no-emul-boot -boot-load-size 4 -boot-info-table -iso-level 4 \
-b boot/syslinux/isolinux.bin -eltorito-alt-boot -e EFI/boot/bootx64.efi -no-emul-boot \
-o porteux.iso iso-folder/

And finally isohybrid --uefi porteux.iso doesn't show any error, but VirtualBox still doesn't boot when EFI is enabled. :(

porteux commented 4 days ago

Sorry for bumping this, but is it possible to change https://github.com/ventoy/Ventoy/blob/b11c38779d319fc6dde97e5e9a45b26e68ddd6e1/INSTALL/grub/grub.cfg#L834 to include a new elif statement to provide support to PorteuX?

It would change from this:

if [ $vtback_cfg_find -eq 0 ]; then
  if [ -f (loop)/boot/isolinux/syslnx64.cfg ]; then
      syslinux_configfile (loop)/boot/isolinux/syslnx64.cfg
      set vtback_cfg_find=1
  elif [ -f (loop)/boot/syslinux/porteus.cfg ]; then
      syslinux_configfile (loop)/boot/syslinux/porteus.cfg
      set vtback_cfg_find=1
  fi
fi

To this:

if [ -f (loop)/boot/isolinux/syslnx64.cfg ]; then
    syslinux_configfile (loop)/boot/isolinux/syslnx64.cfg
    set vtback_cfg_find=1
elif [ -f (loop)/boot/syslinux/porteus.cfg ]; then
    syslinux_configfile (loop)/boot/syslinux/porteus.cfg
    set vtback_cfg_find=1
elif [ -f (loop)/boot/syslinux/porteux.cfg ]; then
    syslinux_configfile (loop)/boot/syslinux/porteux.cfg
    set vtback_cfg_find=1
fi

Very simple change and it would be very helpful. :)

Thanks!