Jump to content











Photo
- - - - -

BIOS/EFI hybrid iso creation under Windows?


  • Please log in to reply
8 replies to this topic

#1 sebus

sebus

    Frequent Member

  • Advanced user
  • 305 posts

Posted 02 January 2015 - 05:19 PM

Best I could find about such iso creation is LukeLuo blog

 

Is there a way to get same archived in Windows.

 

Basically I want to reproduce something like super_grub2_disk_hybrid_2.00s2

 

Recently I got interested in a disk (Slitaz based) with structure:

V:\boot
V:\boot\bzImage
V:\boot\grub
V:\boot\grub\grub.cfg
V:\boot\grub\i386-pc
V:\boot\grub\i386-pc\eltorito.img
V:\boot\grub\locale
V:\boot\grub\x86_64-efi
V:\boot\rootfs.gz
V:\efi
V:\efi.img
V:\efi\boot
V:\efi\boot\bootx64.efi

and would like to re-create it (for no other reason then learning)

 

isoinfo output: (shows that MKISOFS could be used for this - so the question is how?)

isoinfo.exe -d -i "Hybrid.iso"
Setting input-charset to 'UTF-8' from locale.
cygwin warning:
  MS-DOS style path detected: Hybrid.iso
  Preferred POSIX equivalent is: /cygdrive/w/Downloads/Hybrid.iso
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
CD-ROM is in ISO 9660 format
System id: Solaris
Volume id: Hybrid
Volume set id:
Publisher id:
Data preparer id:
Application id: MKISOFS ISO 9660/HFS FILESYSTEM BUILDER & CDRECORD CD-R/DVD CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING
Copyright File id:
Abstract File id:
Bibliographic File id:
Volume set size is: 1
Volume set sequence number is: 1
Logical block size is: 2048
Volume size is: 67048
El Torito VD version 1 found, boot catalog is in sector 38
NO Joliet present

No SUSP/Rock Ridge present
Eltorito validation header:
    Hid 1
    Arch 0 (x86)
    ID ''
    Cksum AB 66 OK
    Key 66 AB
    Eltorito defaultboot header:
        Bootid 88 (bootable)
        Boot media 0 (No Emulation Boot)
        Load segment 0
        Sys type 0
        Nsect 4
        Bootoff 27 39

Link from Wonko in other thread shows usage os isolinux.bin, but the hybrid.iso is using (starting part) bootloader 2048 bytes

Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000  E8 00 00 EB 3B 00 00 00 10 00 00 00 C8 05 00 00  è..ë;.......È...
00000010  BA 6C 00 00 A6 CA CA 05 00 00 00 00 00 00 00 00  ºl..¦ÊÊ.........
00000020  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000030  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000040  5B 31 C0 8E D0 BC 00 60 8E D8 8E C0 BE DB 7C 2E  [1ÀŽÐ¼.`ŽØŽÀ¾Û|.
00000050  66 8B 8F 0D 00 66 09 C9 74 74 66 81 C1 FF 07 00  f‹...f.Éttf.Áÿ..
00000060  00 66 C1 E9 0B 2E 66 8B B7 09 00 E8 05 00 EA 00  .fÁé..f‹·..è..ê.
00000070  00 20 08 66 31 C0 6A 10 66 50 66 56 68 E0 07 66  . .f1Àj.fPfVhà.f
00000080  50 6A 10 66 31 FF 89 E6 8B 7C 10 66 39 CF 76 03  Pj.f1ÿ‰æ‹|.f9Ïv.
00000090  66 89 CF 89 7C 02 66 51 B4 42 CD 13 73 16 B4 42  f‰Ï‰|.fQ´BÍ.s.´B
000000A0  CD 13 73 10 D1 EF 74 23 89 7C 10 89 7C 02 B4 42  Í.s.Ñït#‰|.‰|.´B
000000B0  CD 13 72 F0 89 F8 C1 E0 07 01 44 06 66 01 7C 08  Í.rð‰øÁà..D.f.|.
000000C0  66 59 66 29 F9 75 C1 83 C4 12 C3 BE E8 7C B4 0E  fYf)ùuÁƒÄ.þè|´.
000000D0  31 DB AC CD 10 3C 00 75 F9 EB FE 6E 6F 20 62 6F  1Û¬Í.<.uùëþno bo
000000E0  6F 74 20 69 6E 66 6F 00 63 64 72 6F 6D 20 72 65  ot info.cdrom re
000000F0  61 64 20 66 61 69 6C 73 00 00 00 00 00 00 00 00  ad fails........

sebus



#2 sebus

sebus

    Frequent Member

  • Advanced user
  • 305 posts

Posted 02 January 2015 - 06:40 PM

Sorry, just a senile moment.

Ofcourse what boots in BIOS mode (isolinux) makes no difference to UEFI boot.

 

So this will create hybrid iso:

mkisofs -o output.iso -rock -omit-version-number -disable-deep-relocation -joliet -allow-leading-dots -volid "Hybrid" -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -b efi.img -no-emul-boot CD_root



#3 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 02 January 2015 - 07:06 PM

Actually there is an ongoing thread about hybridizing .iso's, here:

http://reboot.pro/to...-grub2-at-uefi/

 

I am not sure to understand your actual question, if any, iso-hybrid and EFI/UEFI booting are not the same thing, namely one thing is making a .iso EFI/UEFI bootable as CD/DVD, and another thing is making it bootable as hard disk image (i.e. making it a iso-hybrid), take some time on the above mentioned thread, check the little batches, you should easily get the hang of it. :)

 

The *whatever* you posted a snippet of looks a lot like a GRUB2 No-emulation bootsector for CD (that has very little to do with EFI/UEFI and isohybridizing, that is the whatever is loaded normally on BIOS from CD/DVD), but the .iso you reference has been isohybridized using the GRUB2 MBR and a "fake" filesystem/volume using a partition ID of "CD" (you have to leave it to the good Linux guys and particularly to those working on or around GRUB2 to invent new "standards" :frusty:).

 

There is no way that mkisofs will build a iso-hybrid .iso, as it simply "outside the scope" of the tool, what you will get hopefully with that command will be a dual boot (BIOS/UEFI) .iso, but NOT a iso-hybridized one (that will also boot as hard disk device, i.e. the idea of a iso-hybridized image is that can be mapped indifferently as CD/DVD device or as Hard Disk device).

 

:duff:

Wonko


  • sebus likes this

#4 sebus

sebus

    Frequent Member

  • Advanced user
  • 305 posts

Posted 02 January 2015 - 08:18 PM

Thanks, very informative. Skimmed over the thread you linked, will leave it for full reading for a rainy day (tomorrow?)

 

Yes, that command done what I set to get, which was iso bootable in either BIOS or EFI mode. Not a hybid at all then, but does the job.

 

Thanks again

 

sebus



#5 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 03 January 2015 - 12:24 PM

Good, when (if) it rains some more :(, the Author of that SuperGrub thingy has actually documented here:

http://lukeluo.blogs...e-iso-with.html

 

how that iso-hybrid was made.

 

Seemingly the good Linux guys, possibly thinking that mkisofs had not enough switches or that their usage was too much intuitive :w00t:, managed to create another program xorriso that at first sight is used in this case with a "-as mkisofs" switch :frusty:

The tool includes also some provisions to make iso-hybrid images, mutuated from "grub-mkisofs":

http://www.gnu.org/s..._1_xorriso.html

in a very non-standard way:

 

# generate the ISO hybrid image with xorriso.
# "-as mkisofs" emulate the behavior of "mkisofs". xorriso is the Swiss knife for #handling iso/cd, it can also emulate other cd utils like #"genisoimage","cdrecord","wodim",etc.
# "-b " boot image
# "--embedded-boot" hard disk image for isohybrid
# "-r " use Rock Ridge extension. all files in "iso9660_dir" marked "read only" owned, by "root", then added into iso
# "-no-emul-boot" no emulation boot mode
# "--sort-weight" the higher the weight, the corresponding files will be flashed with lower LBA, a.k.a near to the beginning sectors of CD-ROM. So files under "/boot" will be put before file directly under "/".
#"--protective-msdos-label" generate a partition table in embedded hard disk image so that other normal disk partition tool will think this disk could not be manipulated.
#"-boot-info-table" patch an "EL TORITO BOOT INFORMATION TABLE" into "eltorito.img".

 

 

as the net result is - as it seemed to me at first sight - an "invented" CD partition id with an unknown filesystem (not only in grub4dos or in my "Windows" tools) but even from the same GRUB2:

Screenshot+from+2013-06-15+22:57:40.png

 

The U in GRUB2 seems to shift everyday from meaning "Universal" to meaning "Unique", this is IMHO very sad :(.

 

:duff:

Wonko



#6 sebus

sebus

    Frequent Member

  • Advanced user
  • 305 posts

Posted 03 January 2015 - 10:13 PM

Must have been raining where you are, as you took time to read & link back to same article from my original post

 

Hence my question:

 

 

Is there a way to get same archived in Windows

 

And for the record I think (do not know for sure) that LukeLuo is not actually the same person that does SuperGrubDisk (that is Adrian Gibanel)

 

iso I created as per post above (with mkisofs ) boots fine in physical machine & Workstation 11, but in VB it gives "unknown filesystem". Maybe it is VB  issue then (is that what you used above?)?

 

sebus



#7 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 05 January 2015 - 10:10 AM

And for the record I think (do not know for sure) that LukeLuo is not actually the same person that does SuperGrubDisk (that is Adrian Gibanel)

My bad :(, the Author of the SUPERGRUB2 disk is Adrien :thumbsup:, he documents the building here:
http://www.supergrub...id_Chroot_Build


I just posted one of the images on that blog post (by LukeLuo), I checked that the supergrub2 .iso (by Adrien) in Qemu with grub4dos and had the same, the filesystem is a "fake", and highlighted for you how the tool used was xorriso (by LukeLuo) and not mkisofs, making use of a "feature" of GRUB2's "own" iso creating tools grub-mkrescue/grub-mkisofs (used by Adrien):
http://www.gnu.org/s..._1_xorriso.html

MBR is read by PC-BIOS when booting from USB stick or hard disk, and by PowerPC CHRP or PReP when booting. An MBR partiton with type 0xee indicates the presence of GPT.
Emulation -as mkisofs supports the example options out of the ISOLINUX wiki, the options used in GRUB script grub-mkrescue, and the example in the FreeBSD AvgLiveCD wiki.


Adopted from grub-mkisofs are --protective-msdos-label (see -boot_image grub partition_table=on) and --modification-date=YYYYMMDDhhmmsscc (see -volume_date uuid). For EFI bootable GRUB boot images use --efi-boot. It performs -boot_image grub efi_path= surrounded by two -boot_image "any" "next".

 
JFYI, a "real" mkisofs (IMHO smartly) by default writes to the .iso the EXACT command line used, this provides a handy way to recreate .iso's, see:
http://reboot.pro/to...ting-iso-files/
 
 
:duff:
Wonko

#8 sebus

sebus

    Frequent Member

  • Advanced user
  • 305 posts

Posted 05 January 2015 - 06:34 PM

Thanks, informative as always!

 

Yes, did read the "Editing ISO" thread (obviously should have read it twice at least)

 

Yes, have the command used:

-iso-level 4 -relaxed-filenames -allow-lowercase -o newiso.iso -V Hybrid -input-charset iso8859-1 -c boot/boot.catalog -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-platform x86 -b boot/grub/i386-pc/eltorito.img -eltorito-alt-boot -no-emul-boot -eltorito-platform efi -b efi.img .../newiso/

mkisofs you linked to in another thread does indeed encapsulate the command (which is really handy!)

 

SUPERGRUB2 disk creation is not really explained well, run make from git is not much of an explanation.

Will have a look through the code (if I can figure it out)

 

sebus



#9 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 05 January 2015 - 08:11 PM

mkisofs you linked to in another thread does indeed encapsulate the command (which is really handy!)

Yep :), but not specifically that build of mkisofs, all builds of mkisofs (both Linux and Win32) normally embed the command used, as Icecube pointed out here:
http://reboot.pro/to...files/?p=108440

 

The linked page is on Wayback Machine:

https://web.archive....linux-dist.html

before xorriso, another (again IMNSHO senseless/only contributing to add to the confusion) program was written genisoimage that also misses this feature and that for whatever reason was adopted by a lot of the good Linux guys, and it is a (sad :() example of what kind of mess can be created out of nothing.

:duff:
Wonko


  • sebus likes this




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users