public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] [OT] Reading, editing and then burning a new ISO image using Gentoo
@ 2008-05-08 16:28 Mark Knecht
  2008-05-08 16:40 ` Albert Hopkins
  2008-05-09  9:50 ` Crayon Shin Chan
  0 siblings, 2 replies; 11+ messages in thread
From: Mark Knecht @ 2008-05-08 16:28 UTC (permalink / raw
  To: gentoo-user

Hi,
   This is somewhat off topic. Ignore if it's of no interest.

   I've got a DOS program called SpinRite that does low-level testing
of hard drives. I have the program in two forms:

1) A bootable CD that just runs the program
2) A stand alone DOS executable that can be run from a CD.

   Both of the above run fine under FreeDOS. Problem is I don't know
how to load device drivers for USB unless I can edit a config.sys
file, create a new ISO and then burn a new CD. So...

1) Is there a way for me to read the bootable ISO image into a
directory on my machine
2) Edit the files
3) Make a new ISO image from the directory (mkisofs?)

   This seems 'relatively' straight forward. I haven't built it yet
but I found isomaster in portage. Is it a good tool? Should I just do
this from the command line and if so how? How do the Gentoo packagers
put together the install CD images?

Thanks,
Mark
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] [OT] Reading, editing and then burning a new ISO image using Gentoo
  2008-05-08 16:28 Mark Knecht
@ 2008-05-08 16:40 ` Albert Hopkins
  2008-05-08 16:52   ` Mark Knecht
  2008-05-09  9:50 ` Crayon Shin Chan
  1 sibling, 1 reply; 11+ messages in thread
From: Albert Hopkins @ 2008-05-08 16:40 UTC (permalink / raw
  To: gentoo-user

On Thu, 2008-05-08 at 09:28 -0700, Mark Knecht wrote:
> Hi,
>    This is somewhat off topic. Ignore if it's of no interest.
> 
>    I've got a DOS program called SpinRite that does low-level testing
> of hard drives. I have the program in two forms:
> 
> 1) A bootable CD that just runs the program
> 2) A stand alone DOS executable that can be run from a CD.
> 
>    Both of the above run fine under FreeDOS. Problem is I don't know
> how to load device drivers for USB unless I can edit a config.sys
> file, create a new ISO and then burn a new CD. So...
> 
> 1) Is there a way for me to read the bootable ISO image into a
> directory on my machine
> 2) Edit the files
> 3) Make a new ISO image from the directory (mkisofs?)
> 
>    This seems 'relatively' straight forward. I haven't built it yet
> but I found isomaster in portage. Is it a good tool? Should I just do
> this from the command line and if so how? How do the Gentoo packagers
> put together the install CD images?

Call me old-fashioned but I don't see anything wrong with just copying
the root of the CD to an empty directory, editing the files and then
using mkisofs to re-create a new ISO.

-a


-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] [OT] Reading, editing and then burning a new ISO image using Gentoo
  2008-05-08 16:40 ` Albert Hopkins
@ 2008-05-08 16:52   ` Mark Knecht
  2008-05-08 18:55     ` Albert Hopkins
  0 siblings, 1 reply; 11+ messages in thread
From: Mark Knecht @ 2008-05-08 16:52 UTC (permalink / raw
  To: gentoo-user

On Thu, May 8, 2008 at 9:40 AM, Albert Hopkins <marduk@letterboxes.org> wrote:
> On Thu, 2008-05-08 at 09:28 -0700, Mark Knecht wrote:
>> Hi,
>>    This is somewhat off topic. Ignore if it's of no interest.
>>
>>    I've got a DOS program called SpinRite that does low-level testing
>> of hard drives. I have the program in two forms:
>>
>> 1) A bootable CD that just runs the program
>> 2) A stand alone DOS executable that can be run from a CD.
>>
>>    Both of the above run fine under FreeDOS. Problem is I don't know
>> how to load device drivers for USB unless I can edit a config.sys
>> file, create a new ISO and then burn a new CD. So...
>>
>> 1) Is there a way for me to read the bootable ISO image into a
>> directory on my machine
>> 2) Edit the files
>> 3) Make a new ISO image from the directory (mkisofs?)
>>
>>    This seems 'relatively' straight forward. I haven't built it yet
>> but I found isomaster in portage. Is it a good tool? Should I just do
>> this from the command line and if so how? How do the Gentoo packagers
>> put together the install CD images?
>
> Call me old-fashioned but I don't see anything wrong with just copying
> the root of the CD to an empty directory, editing the files and then
> using mkisofs to re-create a new ISO.
>
> -a

Hey. I like old fashioned.

How does that handle the 'bootable' part of the CD? I presume there is
the equivalent of an MBR on a CD so the PC can get started. Is that
visible copying the root of the drive? (I'm at a Windows box as I
write this. Sorry!)

- Mark
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] [OT] Reading, editing and then burning a new ISO image using Gentoo
  2008-05-08 16:52   ` Mark Knecht
@ 2008-05-08 18:55     ` Albert Hopkins
  2008-05-08 19:10       ` Mark Knecht
  2008-05-08 19:24       ` Mark Knecht
  0 siblings, 2 replies; 11+ messages in thread
From: Albert Hopkins @ 2008-05-08 18:55 UTC (permalink / raw
  To: gentoo-user

On Thu, 2008-05-08 at 09:52 -0700, Mark Knecht wrote:
> Hey. I like old fashioned.
> 
> How does that handle the 'bootable' part of the CD? I presume there is
> the equivalent of an MBR on a CD so the PC can get started. Is that
> visible copying the root of the drive? (I'm at a Windows box as I
> write this. Sorry!)


Well if it's El Torito you just point mkisofs to the boot image.  But
since you say it's a DOS CD, who knows.

-a

> 

-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] [OT] Reading, editing and then burning a new ISO image using Gentoo
  2008-05-08 18:55     ` Albert Hopkins
@ 2008-05-08 19:10       ` Mark Knecht
  2008-05-08 19:24       ` Mark Knecht
  1 sibling, 0 replies; 11+ messages in thread
From: Mark Knecht @ 2008-05-08 19:10 UTC (permalink / raw
  To: gentoo-user

On Thu, May 8, 2008 at 11:55 AM, Albert Hopkins <marduk@letterboxes.org> wrote:
> On Thu, 2008-05-08 at 09:52 -0700, Mark Knecht wrote:
>> Hey. I like old fashioned.
>>
>> How does that handle the 'bootable' part of the CD? I presume there is
>> the equivalent of an MBR on a CD so the PC can get started. Is that
>> visible copying the root of the drive? (I'm at a Windows box as I
>> write this. Sorry!)
>
>
> Well if it's El Torito you just point mkisofs to the boot image.  But
> since you say it's a DOS CD, who knows.
>

Well if it matters, the CD was created created in Windows XP using
ISORecorder. You download a Windows executable file from the GRC site.
When you execute that file it gives you some options one of which is
to save an ISO image. I saved the image and then wrote the CD in XP
using ISORecorder. I then boot the CD to run the program. When the CD
boots it's using FreeDOS and an environment to run the low-level
SpinRite program which has always been a DOS program.

My real goal is to 'recreate' this existing bootable CD that I made
using their ISO image but with a few more drivers than they provided.

- Mark
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] [OT] Reading, editing and then burning a new ISO image using Gentoo
  2008-05-08 18:55     ` Albert Hopkins
  2008-05-08 19:10       ` Mark Knecht
@ 2008-05-08 19:24       ` Mark Knecht
  2008-05-08 19:49         ` Albert Hopkins
  1 sibling, 1 reply; 11+ messages in thread
From: Mark Knecht @ 2008-05-08 19:24 UTC (permalink / raw
  To: gentoo-user

On Thu, May 8, 2008 at 11:55 AM, Albert Hopkins <marduk@letterboxes.org> wrote:
> On Thu, 2008-05-08 at 09:52 -0700, Mark Knecht wrote:
>> Hey. I like old fashioned.
>>
>> How does that handle the 'bootable' part of the CD? I presume there is
>> the equivalent of an MBR on a CD so the PC can get started. Is that
>> visible copying the root of the drive? (I'm at a Windows box as I
>> write this. Sorry!)
>
>
> Well if it's El Torito you just point mkisofs to the boot image.  But
> since you say it's a DOS CD, who knows.
>
> -a

Can you clarify what you mean by 'point mkisofs to the boot image'? It
seems that 'man mkisofs' calls up pages about genisoimage.

I've got the CD mounted on my Linux box. ls -al /mnt/cdrom shows only
SPINRITE.EXE and nothing else. However the CD is bootable and I see
FreeDOS info when it's booting so maybe all the
autoexec.bat/config.sys stuff is hidden somewhere. Linux isn't seeing
it.

- Mark
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] [OT] Reading, editing and then burning a new ISO image using Gentoo
  2008-05-08 19:24       ` Mark Knecht
@ 2008-05-08 19:49         ` Albert Hopkins
  2008-05-08 20:49           ` Mark Knecht
  0 siblings, 1 reply; 11+ messages in thread
From: Albert Hopkins @ 2008-05-08 19:49 UTC (permalink / raw
  To: gentoo-user

On Thu, 2008-05-08 at 12:24 -0700, Mark Knecht wrote:
> On Thu, May 8, 2008 at 11:55 AM, Albert Hopkins <marduk@letterboxes.org> wrote:
[...]
> > Well if it's El Torito you just point mkisofs to the boot image.  But
> > since you say it's a DOS CD, who knows.
> >
> > -a
> 
> Can you clarify what you mean by 'point mkisofs to the boot image'? It
> seems that 'man mkisofs' calls up pages about genisoimage.
> 
> I've got the CD mounted on my Linux box. ls -al /mnt/cdrom shows only
> SPINRITE.EXE and nothing else. However the CD is bootable and I see
> FreeDOS info when it's booting so maybe all the
> autoexec.bat/config.sys stuff is hidden somewhere. Linux isn't seeing
> it.

It's a boot (floppy image) that's not part of the ISO filesystem per se.
A quick 'Net search shows you might be able to do this following 

http://kiss.molteni.net/

I tried that on an Open Solaris ISO and got:

        $ isoinfo -d -i os200805.iso 
        CD-ROM is in ISO 9660 format
        System id: Solaris
        Volume id: OpenSolaris-2008-05
        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: 351117
        El Torito VD version 1 found, boot catalog is in sector 104
        NO Joliet present
        Rock Ridge signatures version 1 found
        Eltorito validation header:
            Hid 1
            Arch 0 (x86)
            ID ''
            Key 55 AA
            Eltorito defaultboot header:
                Bootid 88 (bootable)
                Boot media 0 (No Emulation Boot)
                Load segment 0
                Sys type 0
                Nsect 4
                Bootoff 69 105
        
        $ dd if=os200805.iso of=boot.img bs=2048 count=4 skip=105
        4+0 records in
        4+0 records out
        8192 bytes (8.2 kB) copied, 6.7118e-05 s, 122 MB/s
        
        $ file boot.img 
        boot.img: isolinux Loader

YMMV.

-a


-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] [OT] Reading, editing and then burning a new ISO image using Gentoo
@ 2008-05-08 20:43 Joerg Schilling
  0 siblings, 0 replies; 11+ messages in thread
From: Joerg Schilling @ 2008-05-08 20:43 UTC (permalink / raw
  To: marduk, gentoo-user

>It's a boot (floppy image) that's not part of the ISO filesystem per se.
>A quick 'Net search shows you might be able to do this following 

>http://kiss.molteni.net/

>I tried that on an Open Solaris ISO and got:

>        $ isoinfo -d -i os200805.iso 
>        CD-ROM is in ISO 9660 format
>        System id: Solaris
>        Volume id: OpenSolaris-2008-05
>        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: 
>...
>       $ dd if=os200805.iso of=boot.img bs=2048 count=4 skip=105
>        4+0 records in
>        4+0 records out
>        8192 bytes (8.2 kB) copied, 6.7118e-05 s, 122 MB/s
>        
>        $ file boot.img 
>        boot.img: isolinux Loader

Caution: the file is much larger and it is most likely not isolinux but
Stage 2 from Grub.

BTW: Nsect == 4 means 2048 Bytes. This is because many BIOS versions 
will not boot unless the CD looks exactly as broken as a WIN-NT CD:

See mkisofs man page for more details.....

ftp://ftp.berlios.de/pub/cdrecord/alpha/

Jörg

-- 
 EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       js@cs.tu-berlin.de                (uni)  
       schilling@fokus.fraunhofer.de     (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] [OT] Reading, editing and then burning a new ISO image using Gentoo
  2008-05-08 19:49         ` Albert Hopkins
@ 2008-05-08 20:49           ` Mark Knecht
  0 siblings, 0 replies; 11+ messages in thread
From: Mark Knecht @ 2008-05-08 20:49 UTC (permalink / raw
  To: gentoo-user

On Thu, May 8, 2008 at 12:49 PM, Albert Hopkins <marduk@letterboxes.org> wrote:
<SNIP>
>
>        $ isoinfo -d -i os200805.iso

Great stuff. Thanks. OK, using your command but changing it to the
drive itself I got this:

~ # isoinfo -d dev=/dev/hdb
CD-ROM is in ISO 9660 format
System id: LINUX
Volume id: FreeDOS 1.0
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: 78305
El Torito VD version 1 found, boot catalog is in sector 364
NO Joliet present
Rock Ridge signatures version 1 found
Eltorito validation header:
    Hid 1
    Arch 0 (x86)
    ID ''
    Key 55 AA
    Eltorito defaultboot header:
        Bootid 88 (bootable)
        Boot media 0 (No Emulation Boot)
        Load segment 0
        Sys type 0
        Nsect 4
        Bootoff 16D 365

I then used dd to make a file:

~ # dd if=/dev/hdb of=FreeDOS.iso
dd: reading `/dev/hdb': Input/output error
313568+0 records in
313568+0 records out
160546816 bytes (161 MB) copied, 55.8198 s, 2.9 MB/s

I don't like the Input/Output error message but it did create a file
which gives the same info using isoinfo:

~ # isoinfo -d -i FreeDOS.iso
CD-ROM is in ISO 9660 format
System id: LINUX
Volume id: FreeDOS 1.0
Volume set id:
Publisher id:
Data preparer id:
Application id: MKISOFS ISO 9660/HFS FILESYSTEM BUILDER & CDRECORD
CD-R/DVD CREA TOR (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: 78305
El Torito VD version 1 found, boot catalog is in sector 364
NO Joliet present
Rock Ridge signatures version 1 found
Eltorito validation header:
    Hid 1
    Arch 0 (x86)
    ID ''
    Key 55 AA
    Eltorito defaultboot header:
        Bootid 88 (bootable)
        Boot media 0 (No Emulation Boot)
        Load segment 0
        Sys type 0
        Nsect 4
        Bootoff 16D 365


Now, how does one turn this ISO image back into a set of files and
folders to be changed and later turned back into an ISO image?

I see Joerg Schilling has responded. That's a famous name in this
area. Off to read his pages!

- Mark
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] [OT] Reading, editing and then burning a new ISO image using Gentoo
  2008-05-08 16:28 Mark Knecht
  2008-05-08 16:40 ` Albert Hopkins
@ 2008-05-09  9:50 ` Crayon Shin Chan
  2008-05-09 10:35   ` Joerg Schilling
  1 sibling, 1 reply; 11+ messages in thread
From: Crayon Shin Chan @ 2008-05-09  9:50 UTC (permalink / raw
  To: gentoo-user

On Friday 09 May 2008, Mark Knecht wrote:

> 1) Is there a way for me to read the bootable ISO image into a
> directory on my machine
> 2) Edit the files
> 3) Make a new ISO image from the directory (mkisofs?)
>
>    This seems 'relatively' straight forward. I haven't built it yet
> but I found isomaster in portage. Is it a good tool? 

Yes, you can do the above using isomaster:

1) mount the iso to get at the files for editing
2) edit files and save somewhere
3) open iso image using isomaster
4) in isomaster remove the files to be replaced from the iso image
5) in isomaster browse to where your files were saved in (2) and add them 
back into the image
6) save image and burn

-- 
Crayon
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] [OT] Reading, editing and then burning a new ISO image using Gentoo
  2008-05-09  9:50 ` Crayon Shin Chan
@ 2008-05-09 10:35   ` Joerg Schilling
  0 siblings, 0 replies; 11+ messages in thread
From: Joerg Schilling @ 2008-05-09 10:35 UTC (permalink / raw
  To: gentoo-user

Crayon Shin Chan <crayon.shin.chan.uk@gmail.com> wrote:

> On Friday 09 May 2008, Mark Knecht wrote:
>
> > 1) Is there a way for me to read the bootable ISO image into a
> > directory on my machine
> > 2) Edit the files
> > 3) Make a new ISO image from the directory (mkisofs?)
> >
> >    This seems 'relatively' straight forward. I haven't built it yet
> > but I found isomaster in portage. Is it a good tool? 
>
> Yes, you can do the above using isomaster:
>
> 1) mount the iso to get at the files for editing
> 2) edit files and save somewhere
> 3) open iso image using isomaster

....

I recommend to run "isodebug -i <filename>" to see the commandline the
original image has been created with in case it was mkisofs.

The boot image is usually visible from inside the ISO filesystem, so you
should be able to re-create a modified image from the unpacked oldd one.

Jörg

-- 
 EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       js@cs.tu-berlin.de                (uni)  
       schilling@fokus.fraunhofer.de     (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-05-09 10:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-08 20:43 [gentoo-user] [OT] Reading, editing and then burning a new ISO image using Gentoo Joerg Schilling
  -- strict thread matches above, loose matches on Subject: below --
2008-05-08 16:28 Mark Knecht
2008-05-08 16:40 ` Albert Hopkins
2008-05-08 16:52   ` Mark Knecht
2008-05-08 18:55     ` Albert Hopkins
2008-05-08 19:10       ` Mark Knecht
2008-05-08 19:24       ` Mark Knecht
2008-05-08 19:49         ` Albert Hopkins
2008-05-08 20:49           ` Mark Knecht
2008-05-09  9:50 ` Crayon Shin Chan
2008-05-09 10:35   ` Joerg Schilling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox