Jump to content











Photo
- - - - -

Some newbie questions about creating multiboot DVD ISO which can work also on UFD


  • Please log in to reply
3 replies to this topic

#1 midix

midix
  • Members
  • 9 posts
  •  
    Latvia

Posted 12 November 2015 - 09:24 PM

Hi all.

 

I recently tried to customize Ultimate Boot CD to my needs using syslinux config files.

 

I know about Easy2boot but they seem mostly oriented to Grub4Dos, but I started to do everything Syslinux way.

 

In ideal world I would just copy iso files to a folder and add new config lines to custom.cfg and then use Ultimate Boot CD tools to build my final ISO, which I can then burn to a DVD or to a USB flash using Rufus or something similar (I'm more a Windows guy). I can accept the fact that I might need to load each ISO into RAM - nowadays RAM is cheap.

 

Intuitively I expected to have better luck with Linux based ISOs because syslinux itself is closer to the Linux world than Windows world. Especially reading that syslinux MEMDISK Wiki page says:

 

Windows NT/2000/XP/2003/Vista/2008/7 (NT based)

These Windows versions use INT 13h access only in the start of the booting process (loading only the necessary drivers). Once the protected mode drivers are functional to access the disks, Windows can't see the memory mapped drives created by MEMDISK (CD/DVD, hard disk and floppy disk images) and it will fail to complete the boot process.

 

After some experiments I was really surprised to find out that it works if I add Windows XP, 7 and 8 based PE ISOs (including Paragon Suite) with simple config like

LABEL -
MENU LABEL Paragon Suite
TEXT HELP
Paragon Suite (Windows 7 PE based)
ENDTEXT
LINUX /boot/syslinux/memdisk
INITRD /ubcd/custom/rm_07_11_2015.iso
APPEND iso raw

but the same approach completely fails with Ubuntu Live CD, Kaspersky Rescue CD, Bitdefender Rescue CD.

 

For Ubuntu Live CD I found that I can make it work by extracting a bunch of files out of the ISO and polluting my final ISO image with some folders. At the end my config entry looked like this:

MENU LABEL Ubuntu Live 14.04
TEXT HELP
 Ubuntu Live 14.04
ENDTEXT
LINUX /ubuntu/vmlinuz.efi
INITRD /ubuntu/initrd.lz
APPEND file=/cdrom/preseed/ubuntu.seed boot=casper iso-scan/filename=/ubcd/custom/ubuntu-14.04.3-desktop-amd64.iso quiet splash --

Is this really my best option? Why can't Ubuntu loader just find the necessary files in ISO file in memdisk? Is it the INT 13h issue mentioned in the memdisk Wiki or is there something else going on?

 

With Kaspersky Rescue CD I have seen various workarounds and some of them were outdated but some others involved using Grub4Dos and not Syslinux. Does it mean that Grub4Dos is more powerful and can do more stuff than Syslinux?

 

After failing to boot Kaspersky Rescue CD out-of-the-box (I'm not yet ready to mess with its internal files) I decided to try Bitdefender Rescue CD. The naive Memdisk approach failed, I got a message

Invalid loop location: /rescue/livecd.squashfs
Please export LOOP with a valid location

In one forum I found advice:

 

 

title Bitdefender Rescue CD
partnew (%@root:~1,3%,3) 0x00 /Boot/Bitdefender.iso
map /Boot/Bitdefender.iso (0xff)
map --hook
kernel (0xff)/boot/kernel.i386-pc root=/dev/ram0 real_root=/dev/loop0 loop=/rescue/livecd.squashfs cdroot_marker=/rescue/livecd.squashfs initrd udev cdroot scandelay=10 quiet slash lang=en
initrd (0xff)/boot/initfs.i386-pc
 
Note, it's not working under virtual machine or after using Plop.
 

 

 

 
So, it is for Grub4Dos. I tried it (adjusting paths to ISO to my situation) but it still failed even earlier during booting with a message
 
partnew (%@root:~1,3%,3) 0x00 /ubcd/custom/bitdefender-rescue-cd.iso

Error 30: Invalid argument

Now I'm not sure why it does not work - is it because I'm trying it in a virtual machine (VMware Player) or because the instructions are wrong or outdated.

 

Anyway, I have seen some other boot ISOs using the same map and partnew approach. How do I port such configs to syslinux and will it work? If not, then why?
 
I have read Easy2Boot articles and I see they are sometimes recommending imgPTN (partition image) format instead of ISOs. I'm wondering, how can it be that it is easier to boot from such an image when original ISO was meant to be bootable from a CD and not a partition?
 
And why it does not work with DVDs - why can't we convert all our ISOs to imgPTN files and then create an ISO or imgPTN  image which can be booted from both USB and DVD?
 
Also, I have read some warnings (in Easy2Boot articles, most probably) that some ISOs in some configurations might actually damage data on the PC which is booted using that ISO! That is scary. Can it be avoided? Is imgPTN safer approach then?
 
Is Easy2Boot with their Grub4Dos+imgPTN -> USB flash the most fool-proof solution today? Can Syslinux replace Grub4Dos and help with creating not only multiboot UFD but also DVD? If not then why?
 
I'm sorry for so many "why" questions in my first post here, but "why" question is the most important because you can learn so much from answers to "why", but it's somewhat harder to learn from step-by-step instructions without any explanations because then you just copy the code blindly and then get frustrated because you have no idea "why" does it not work the way it should...


#2 steve6375

steve6375

    Platinum Member

  • Developer
  • 6629 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 13 November 2015 - 05:37 PM

http://www.easy2boot.../how-e2b-works/



#3 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13749 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 13 November 2015 - 09:33 PM

Lots of why's, but also a few assumptions (that need to be confirmed or debunked before getting to the why's.

Is grub4dos "better" than Syslinux/Memdisk?

Not really, they are largely equivalent in functions but grub4dos is "better" :w00t: because it provides a command line interface that allows for much easier experimenting ( then it also has - in my perverted mind - an easier set of commands/syntax, but this is largely subjective).

The real point is there is no real "competition", if you can reach the whatever goal you have with Syslinux/Memdisk, good :), if you can reach it through grub4dos (or through PLoP, GRUB2, *whatever*) that is good :thumbsup: as well.

 

UNLESS the XP based PE is a "special kind" of PE including a driver to "mount self" it won't EVER boot with Memdisk alone (as the snippet you posted states), while Vista and later .wim based PE's will do nicely.

 

The snippet for bitdefender you posted derives from this post from cdob (and the same approach is often used in Steve6375's Easy2boot):

http://reboot.pro/to...brided/?p=88531

 

The idea is that most Linux(es) will be able to boot from a .iso which is mapped to a partition.

This might not work for particular distro's, of course, and in these cases some cheatcodes or some other method (like extracting at least parts of the .iso) are needed.

 

Virtual machines are the most similar to real hardware the programmers manage to make them, but they are never the "real thing", the bitdefender snippet you posted is stated as being NOT VM compatible, not really a surprise it does not work in a VM.

 

In a nutshell:

1) grub4dos is not "better", it simply has some capabilities that Syslinux misses (and most probably the reverse is true), for some uses GRUB2 might be better than both, while for some other ones it does just the same as the other mentioned ones, though through an overcomplex syntax :ph34r: (but as an example it allows to mount a.iso as loop device, see this Ubuntu related example: https://help.ubuntu....SOBoot/Examples

2) you are nearing the border of this question: http://reboot.pro/to...all-iso-images/(you missed the sticky because it is in the grub4dos section and not in the Syslinux one)

3) do not assume that a VM behaves exactly like real hardware, particularly where BIOS and/or booting is involved, loosely something that works in a VM is very likely to work on a "real" machine as well, but the opposite is often false, and in any case try it on different VM's something that does not work in (say) VMware might work (say) in Qemu or VirtualBox. 

 

:duff:

Wonko



#4 cdob

cdob

    Gold Member

  • Expert
  • 1343 posts

Posted 14 November 2015 - 01:38 PM

ISO file booting is not possible in general. This is not supported in general.

However there are some exceptions to boot a ISO file.
Requiered is support at boot level (BIOS or UEFI) and OS level (drivers).
 

I can accept the fact that I might need to load each ISO into RAM - nowadays RAM is cheap.
PE ISOs

Be aware, this uses twice a ramdisk. First memdisk and next PE *.wim. (A default XP dosn't use a *.wim).
That's approximately twice the ISO size.
 

Why can't Ubuntu loader just find the necessary files in ISO file in memdisk?

That's the kernel at this time.
There is no driver for the syslinux memdisk, there is no memdisk available.
There is no windows syslinux memdisk driver too.

BIOS routines can access a syslinux memdisk: DOS
And early boot *nix and windows uses BIOS routines. Drivers are read from disk using INT calls.
And dosn't use BIOS routines with actives drivers.
Without a driver the OS can't access the memdisk anymore.
 

Is it the INT 13h issue mentioned in the memdisk Wiki or is there something else going on?

The OS dosn't use BIOS routines at that time.
 

With Kaspersky Rescue CD I have seen various workarounds and some of them were outdated but some others involved using Grub4Dos and not Syslinux.

The Kaspersky Rescue CD kernel files are from 2013. The file name \rescue\rescue.iso is hard encoded still.
 

Grub4Dos, but I started to do everything Syslinux way.

You can chainload grub4dos grub.exe from syslinux.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users