On Wed, Dec 16, 2015 at 5:17 AM, Joerg Schilling
> Sorry, but this is impossible in general.
Not in general, only for such cases where the boot
image does that.
> The reason is that most recent boot CDs use no-emulation boot and mark the boot
> "file" as 2048 bytes only.
The definition of most is really quite dependant on the cases
of the end user, not us.
> The first 2048 bytes of the file contain code that pulls the rest of the file from
> disk and only this code knows the size.
In that case, a proper tool of the sort I'm looking for would still
print out all the metadata up to the point where it went off-spec,
including the no emul flags and offset and size of the [length] file,
and extract that file to disk, since it is infact the in-spec physical
boot image the bios jumps to, regardless of whether or not it is the
last humanly logical boot image embedded or placed on disk.
Further, though "2k" is large, there are probably only small
handful of apps generating this code, certainly some of them
opensource, such that decoding and extracting the real logical
image from that wouldn't be hard for a good tool to do. It could
even mask dynamic bits and hash the rest of the "2k" to ID
known instances of it.
> What you can to is calling "isoinfo -i image -d" and check the results.
The initial purpose of my post was to survey any already existing
unix tools for this that people know of or prefer...
... if there are none, isoinfo, in conjunction with mkisofs, would
already have good library knowledge of the spec such that isoinfo
could certainly be made to print the full chain of metadata and
then actually dump the [no emul] boot image.
This example is from a disk on my desk that does not use "no emul'...
El Torito VD version 1 found, boot catalog is in sector 36
Eltorito validation header:
Hid 1
Arch 0 (x86)
ID ''
Cksum AA 55 OK
Key 55 AA
Eltorito defaultboot header:
Bootid 88 (bootable)
Boot media 2 (1.44MB Floppy)
Load segment 0
Sys type 0
Nsect 1
Bootoff 25 37
|