[Debburn-devel] Problem using genisomage

Adam Kalinowski adam.kalinowski at ingg.com
Thu Apr 3 09:13:41 UTC 2014


Hi

I've tried both ways

1. ORIGINAL FILE

CD-ROM is in ISO 9660 format
System id: 
Volume id: CD_ROM
Volume set id: CD_ROM
Publisher id: MICROSOFT CORPORATION
Data preparer id: MICROSOFT CORPORATION, ONE MICROSOFT WAY, REDMOND WA 98052, (425) 882-8080
Application id: OSCDIMG 2.55 (01/01/2005 TM)
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: 1843472
El Torito VD version 1 found, boot catalog is in sector 19
NO Joliet present
NO Rock Ridge present
Eltorito validation header:
    Hid 1
    Arch 0 (x86)
    ID 'Microsoft Corporation'
    Key 55 AA
    Eltorito defaultboot header:
        Bootid 88 (bootable)
        Boot media 0 (No Emulation Boot)
        Load segment 0
        Sys type 0
        Nsect 8
        Bootoff 401 1025

2. RUN COMMAND
root at adamk:/# xorriso -boot_image and keep -dev windows.iso -map /winiso/autounattend.xml /autounattend.xml 
xorriso 1.2.4 : RockRidge filesystem manipulator, libburnia project.

xorriso : NOTE : Loading ISO image tree from LBA 0
xorriso : UPDATE : 2935 nodes read in 1 seconds
libisofs: WARNING : Found hidden El-Torito image. Its size could not be figured out, so image modify or boot image patching may lead to bad results.
xorriso : NOTE : Detected El-Torito boot information which currently is set to be kept unchanged
Drive current: -dev 'windows.iso'
Media current: stdio file, overwriteable
Media status : is written , is appendable
Boot record  : El Torito
Media summary: 1 session, 1843472 data blocks, 3601m data, 61.8g free
Volume id    : 'CD_ROM'
xorriso : UPDATE : 1 files added in 1 seconds
Added to ISO image: file '/autounattend.xml'='/winiso/autounattend.xml'
xorriso : NOTE : Keeping boot image unchanged
xorriso : UPDATE : Writing:       1248s  100.0%   fifo   0%  buf  50%
ISO image produced: 1075 sectors
Written to medium : 1248 sectors at LBA 1843488
Writing to 'windows.iso' completed successfully.

3. MODIFIED FILE
root at adamk:/# isoinfo -d -i windows.iso 
CD-ROM is in ISO 9660 format
System id: 
Volume id: CD_ROM
Volume set id: CD_ROM
Publisher id: MICROSOFT CORPORATION
Data preparer id: XORRISO-1.2.4 2012.07.20.130001, LIBISOBURN-1.2.4, LIBISOFS-1.3.0, LIBBURN-1.3.2
Application id: OSCDIMG 2.55 (01/01/2005 TM)
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: 1844563
El Torito VD version 1 found, boot catalog is in sector 1844562
NO Joliet present
Rock Ridge signatures version 1 found
Eltorito validation header:
    Hid 1
    Arch 0 (x86)
    ID 'Microsoft Corporation'
    Key 55 AA
    Eltorito defaultboot header:
        Bootid 88 (bootable)
        Boot media 0 (No Emulation Boot)
        Load segment 0
        Sys type 0
        Nsect 8
        Bootoff 401 1025


This one stops saying "CDBOOT: Couldn't find BOOTMGR"

*******************************************************
When I tried with second approach (adding autounattend to DVD). It did not boot saying "FATAL: Could not read from the boot medium! System halted".
Below screen dump 

root at adamk:/# xorriso -boot_image any keep -dev /dev/sr0 -map /winiso/autounattend.xml /autounattend.xml 
xorriso 1.2.4 : RockRidge filesystem manipulator, libburnia project.

xorriso : NOTE : Loading ISO image tree from LBA 0
xorriso : UPDATE : 10 nodes read in 10 seconds
xorriso : UPDATE : 1670 nodes read in 11 seconds
xorriso : UPDATE : 2935 nodes read in 11 seconds
libisofs: WARNING : Found hidden El-Torito image. Its size could not be figured out, so image modify or boot image patching may lead to bad results.
xorriso : NOTE : Detected El-Torito boot information which currently is set to be kept unchanged
Drive current: -dev '/dev/sr0'
Media current: DVD+R/DL
Media status : is written , is appendable
Boot record  : El Torito
Media summary: 1 session, 1843632 data blocks, 3601m data, 4547m free
Volume id    : 'CD_ROM'
xorriso : UPDATE : 1 files added in 1 seconds
Added to ISO image: file '/autounattend.xml'='/winiso/autounattend.xml'
xorriso : NOTE : Keeping boot image unchanged
xorriso : UPDATE : Writing:         16s    1.3%   fifo  51%  buf 100%
xorriso : UPDATE : Writing:         16s    1.3%   fifo  51%  buf 100%    0.0xD 
<omited>
xorriso : UPDATE : Closing track/session. Working since 72 seconds
ISO image produced: 1075 sectors
Written to medium : 1232 sectors at LBA 1845680
Writing to '/dev/sr0' completed successfully.

Thanks for your help. Will go to your plan B from more recent email.

Regards

Adam Kalinowski

Linux System Administrator
tel. 020 7438 5926

1-2 Berners Street
London
United Kingdom
W1T 3LA

________________________________________
From: Thomas Schmitt [scdbackup at gmx.net]
Sent: 31 March 2014 11:54
To: debburn-devel at lists.alioth.debian.org
Cc: Adam Kalinowski
Subject: Re: Problem using genisomage

Hi,

> 1. From ISO created under Windows which works OK
>         Nsect 8

So you need indeed -boot-load-size 8 and not 4.


> and this one hangs with message "CDBOOT: Couldn't find BOOTMGR"

Does it get a bit more far than the one with -boot-load-size 4 ?
Possibly you are past El Torito and BIOS problems then.


> As you can see "boot catalog" is in different sector, does it matter?

It should not. The El Torito record at block 17 (decimal) contains
the address of the boot catalog. BIOS should find it there.
Block number 2080 should be no problem.
The block address 2081 of the boot image file is not unusual either.


Having no clue of MS-Windows and etfsboot.com, i can only guess
from ISOLINUX and GRUB2 experience.
ISOLINUX can behave quite the same if option -boot-info-table
is omitted when the ISO is produced. This option patches into the
boot image file its own block address in the ISO image. So it can
at boot time easily find its own content for loading more blocks
from it.

Well, this is specific to ISOLINUX and GRUB2. Probably Microsoft
has chosen different ways if it needs such a hint inside the file.
So option -boot-info-table will probably not help.
(You may try, of course.)


> I want to modify IP in autounattend.xml file.
> I've also tried ISO Master which allows to remove/add files directly
> from/to , but this makes no difference, it keeps hanging (also boot catalog is
> then in different sector).

Ahum. So it repacks the ISO image instead of adding a session ?

The boot catalog address would not be suspicious. But the address
of the boot image file might be of importance (isoinfo "Bootoff"
tells it in hex and decimal).

You could try my program xorriso for an add-on session.

  # Make a work copy so that the original needs not to be touched
  cp win2012.iso win2012_changed.iso

  # Let xorriso add a session to the work copy
  xorriso -boot_image any keep \
          -dev win2012_changed.iso \
          -map ...where.it.is.on.disk.../autounattend.xml \
               ...where.it.shall.be.in.ISO.../autounattend.xml \
          ...further.manipulation.commands.if.desired... \

The first xorriso command -boot_image "any" "keep" will hopefully
maintain the parameters in the El Torito catalog. (It has never
been tested with a -boot-load-size that is not 4 ...).

Command -dev "win2012_changed.iso" loads the meta data from the
ISO image. Changes will be appended as add-on session.

Command -map schedules a file or directory tree for being copied
into the emerging ISO image.

Finally the end of the command list triggers writing of the
add-on session.

Because the ISO filesystem is in a random-access file, the first
64 kB will be updated. This will also overwrite El Torito boot sector
and catalog. So we have to hope that libisofs is able to properly
copy the original Micorsoft data.

If libisofs fails to do so, i'd like to have a bug report.
(E.g. to bug-xorriso at gnu.org)


In this case there is still a way to force an unaltered set
of Microsoft boot information during the xorriso run:
Put the original Microsoft ISO onto a sequential DVD medium
(DVD-R, DVD+R, unformatted DVD-RW) and keep it appendable:

  xorriso -as cdrecord -v dev=/dev/sr0 -multi win2012.iso

Maybe check whether it boots properly. So that we can blame any
further problems on xorriso's manipulations.

Then manipulate that DVD medium instead of the work copy on
hard disk:

  xorriso -boot_image any keep \
          -dev /dev/sr0 \
          -map ...where.it.is.on.disk.../autounattend.xml \
               ...where.it.shall.be.in.ISO.../autounattend.xml \
          ...further.manipulation.commands.if.desired... \

Because the medium is not overwritable, the first 64 kB will
stay unaltered.
BIOS will probably start from the old El Torito boot sector
(although the specs say it shall be the new one) and thus
find the MS-Windows boot files.
MS-Windows when taking over will hopefully mount the newest
session and thus find your new file content.

The medium will stay appendable. So further manipulations will
be possible, as long as there is still unused space on the DVD.
DVD+R waste less space than DVD-R, when sessions get appended.
If DVD media are too small, then BD-R would be an alternative.

Note that DVD+RW, DVD-RAM, formatted DVD-RW, and BD-RE get their
first 64 kB overwritten as it is done with disk files.


Have a nice day :)

Thomas


_____________________________________________________________________
This e-mail has been scanned for viruses by MessageLabs.



More information about the Debburn-devel mailing list