FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 05-08-2008, 04:52 PM
"Mark Knecht"
 
Default Reading, editing and then burning a new ISO image using Gentoo

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
 
Old 05-08-2008, 07:10 PM
"Mark Knecht"
 
Default Reading, editing and then burning a new ISO image using Gentoo

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
 
Old 05-08-2008, 07:24 PM
"Mark Knecht"
 
Default Reading, editing and then burning a new ISO image using Gentoo

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
 
Old 05-08-2008, 08:43 PM
 
Default Reading, editing and then burning a new ISO image using Gentoo

>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
 
Old 05-08-2008, 08:49 PM
"Mark Knecht"
 
Default Reading, editing and then burning a new ISO image using Gentoo

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
 
Old 05-09-2008, 09:50 AM
Crayon Shin Chan
 
Default Reading, editing and then burning a new ISO image using Gentoo

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
 
Old 05-09-2008, 10:35 AM
 
Default Reading, editing and then burning a new ISO image using Gentoo

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
 

Thread Tools




All times are GMT. The time now is 07:20 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org