Jump to content











Photo
- - - - -

Editing ISO files.


  • Please log in to reply
33 replies to this topic

#26 cdob

cdob

    Gold Member

  • Expert
  • 1469 posts

Posted 02 September 2010 - 05:46 PM

This means that good developers/guys :) can also actually "embed" in the .iso the actual info about the EXACT command parameters they used :D

That's a mkisofs default feature. It's added after Volume Descriptor Set Terminator.
Some developers/guys prefer to zero this sector.

2) find the path of boot-image file using LBA.

Be aware: this can be impossible.
There is no need to include boot image to file system, example a default XP installation CD.
All isolinux and grub does include boot image to file system so far.

Other examples:
Floppy emulation:
BIOS Update T60 http://www-307.ibm.c...MIGR-67020.html

El Torito specs allows floppy emulation:
1 1.2 meg diskette
2 1.44 meg diskette
3 2.88 meg diskette

Eltorito defaultboot header:
Bootid 88 (bootable)
Boot media 2 (1.44MB Floppy)
Load segment 7C0
Sys type 0
Nsect 1
Bootoff 15 21

Extract 2880 sectors per 512 bytes, start at LBA 21.

Hard disk emulation:
BIOS Update W510 http://www-307.ibm.c...ocid=MIGR-74859

Eltorito defaultboot header:
Bootid 88 (bootable)
Boot media 4 (Hard Disk Emulation)
Load segment 7C0
Sys type 6
Nsect 1
Bootoff 1B 27

Hard disk image size is unknown.
Simple, half broken assumption: start at LBA 27 up to end of media
Correct: calculate hard disk size from hard disk image MBR
El Torito specs

Hard Disk images may only have 1 partition in the partition table and it must be the first entry.



#27 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 03 September 2010 - 12:18 PM

This means that good developers/guys :D can also actually "embed" in the .iso the actual info about the EXACT command parameters they used :), too bad that this use is not very common :).

The exact command line parameters are embedded by default by mkisofs: http://cdrecord.berl...e/cdrecord.html .
The problem is that a lot of distributions don't use the original mkisofs, but a debian fork, called genisoimage. This fork doesn't embed the command line in the iso.

More info about mkisofs vs genisoimage:
http://cdrecord.berl...linux-dist.html

#28 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 03 September 2010 - 12:35 PM

OK, peeps, TEST release ALPHA.

Should cover:
  • floppy emulation
  • no emulation

The HD emulation - if done properly - needs a bit of work.

As always just a bunch of commands scribbled down with no particular logic :), but it should work :D .

Needs DSFO.EXE from the DSFOK package:
http://members.ozema...eezip/freeware/
besides ISOINFO.EXE from CDRTOOLS, Win32 3.00 version:
http://www.student.t...t/thomas.plank/
cdrtools-3.00-win32-bin.zip

:)
Wonko

EDIT: Obsolete version, removed, see a couple posts below.

#29 shamurshamur

shamurshamur

    Frequent Member

  • Developer
  • 322 posts
  •  
    India

Posted 03 September 2010 - 02:34 PM

OK, peeps, TEST release ALPHA.

Should cover:

  • floppy emulation
  • no emulation

The HD emulation - if done properly - needs a bit of work.

As always just a bunch of commands scribbled down with no particular logic :D, but it should work ;) .

Needs DSFO.EXE from the DSFOK package:
http://members.ozema...eezip/freeware/
besides ISOINFO.EXE from CDRTOOLS, Win32 3.00 version:
http://www.student.t...t/thomas.plank/
cdrtools-3.00-win32-bin.zip

:D
Wonko

:) :) :) :D :) :D


Here's my result.

Files used:
1) isoinfo.exe 3.00 (i686-pc-cygwin)
2) dsfo.exe v4b
3) cygwin1.dll v 1007.6.0.0
4) cygiconv-2.dll


Results with success:
1) KNOPPIX_V6.2CD-2009-11-18-EN.iso (based on isolinux.bin)
2) BitDefenderRescueCD_v2.0.0_3_08_2009.iso (based on isolinux.bin)
3) slax-6.1.2.iso (isolinux.bin based)
4) SeaToolsDOS214EURO.ISO (floppy emulation)


No success:
1)ubcd503.iso (isolinux.bin based) ----- A 0 KB size file with name "isolinux.bin" is extracted.

#30 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 03 September 2010 - 03:36 PM

No success:
1)ubcd503.iso (isolinux.bin based) ----- A 0 KB size file with name "isolinux.bin" is extracted.

Yep, it's hidden.

Try version 0.02. :)

(Changed extraction method from isoinfo -x to "RAW" with DSFO)

Unfortunately the MKI info is a bit problematic in the parsing.... :D

:D
Wonko

EDIT: Obsolete version, removed, see a couple posts below.

#31 shamurshamur

shamurshamur

    Frequent Member

  • Developer
  • 322 posts
  •  
    India

Posted 03 September 2010 - 03:58 PM

Try version 0.02. :D

(Changed extraction method from isoinfo -x to "RAW" with DSFO)


yes!
Its working now. :D

#32 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 03 September 2010 - 07:18 PM

Version 0.03

  • tentative support for HD images

::========================================================

::| WARNING! Limit is  2147483647 i.e. 7FFFFFF   WARNING! |

::========================================================

the above means that a HD image bigger or slighly smaller than 2 Gb 2*1024*1024*1024=2,147,483,648 is NOT supported. (as the actual offset has to take into account also the .iso LBA sectors before)

Such images are quite rare, but you never know :D, AND you've been warned! :)

:D
Wonko

EDIT: Replaced version 0.03 with 0.04 - fixed a wrong approach in calculating the LBA (it worked all the same with HD images with one partition only, but although I have never seen a multipartitioned HD image, they may exist and the previous code would have treated them wrongly)

Attached Files



#33 wendy

wendy

    Frequent Member

  • Lady
  • 290 posts
  • Location:one mile from the QR main line
  • Interests:Operating systems, Weights and Measures, Geometry
  •  
    Australia

Posted 03 October 2010 - 08:22 AM

My experiebce with bbie is that it extracts whatever the boot-sector of a cdrom or iso points to, so if it's a floppy or a hard disk, then this can be extracted too.

Isobuster is pretty neat for looking around files.

ISOs were never intended to be edited as such, but ye can get proggies to drop files of the same name and size into an ISO, simply by replacing the relevant sectors. This is how one configures Hiren's all-in-one cdrom for disks, or add key-files to dfsee or ecomstation.

#34 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 08 October 2010 - 11:58 PM

My experiebce with bbie is that it extracts whatever the boot-sector of a cdrom or iso points to, so if it's a floppy or a hard disk, then this can be extracted too.

Please, RE-READ the thread. <_<

The original problem is that in the case of a no-emulation bootsector longer than 4 sectors (example grub4dos or isolinux) the .iso is actually made with mkisofs using ANYWAY the
-boot-load-size 4
parameter.

In this case BBIE (and also the other tool mentioned) extract ONLY the first four sectors.

This obviously does not happen with floppy emulation or HD emulation CD's, where there is NO given size for the boot load and both BBIE and BootExtract.exe work allright.

The batch is an attempt to have something that will extract correct files on all three standards.

:cheers:
Wonko




3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users