Professional Web Applications Themes

CD TOC? - UNIX Programming

Hi all, Is there a standard header file (on Solaris at least), that describes the layout (VTOC) of a CDROM? That is, the first 512 bytes or so of a ".iso" file. As an example, here's a hex dump of the first 512 bytes of one of the recent Solaris Express .isos: richzaphod6337# fd vtoc 00000000 43 44 2D 52 4F 4D 20 44 69 73 63 20 66 6F 72 20 CD-ROM Disc for 00000010 53 75 6E 4F 53 20 53 6F 6C 61 72 69 73 20 49 6E SunOS Solaris In 00000020 73 74 61 6C ...

  1. #1

    Default CD TOC?

    Hi all,

    Is there a standard header file (on Solaris at least), that
    describes the layout (VTOC) of a CDROM? That is, the first
    512 bytes or so of a ".iso" file.

    As an example, here's a hex dump of the first 512 bytes of
    one of the recent Solaris Express .isos:

    richzaphod6337# fd vtoc
    00000000 43 44 2D 52 4F 4D 20 44 69 73 63 20 66 6F 72 20 CD-ROM Disc for
    00000010 53 75 6E 4F 53 20 53 6F 6C 61 72 69 73 20 49 6E SunOS Solaris In
    00000020 73 74 61 6C 6C 61 74 69 6F 6E 20 20 00 00 00 00 stallation ....
    00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    00000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    00000080 00 00 00 01 00 00 00 00 00 00 00 00 00 08 00 04 ................
    00000090 00 10 00 02 00 10 00 00 00 00 00 00 00 00 00 00 ................
    000000A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    000000B0 00 00 00 00 00 00 00 00 00 00 00 00 60 0D DE EE ............`...
    000000C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    000000D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    000000E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    000000F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    00000100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    00000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    00000120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    00000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    00000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    00000150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    00000160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    00000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    00000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    00000190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    000001A0 00 00 00 00 01 5E 08 00 00 00 00 00 00 00 00 01 .....^..........
    000001B0 08 00 00 00 00 01 02 80 00 00 00 00 00 00 00 00 ................
    000001C0 00 0A B9 00 00 00 04 4A 00 08 EA 80 00 00 07 DB .......J........
    000001D0 00 00 14 00 00 00 07 E3 00 00 14 00 00 00 07 EB ................
    000001E0 00 00 14 00 00 00 07 F3 00 00 14 00 00 00 00 00 ................
    000001F0 00 00 00 00 00 00 00 00 00 00 00 00 DA BE 73 0A ..............s.

    It looks like the VTOC starts at offset 444 (decimal), but is there
    a structure in an include file somewhere that can confirm this?
    What about the source to something like mkisofs?

    TIA,

    --
    Rich Teer, SCNA, SCSA

    President,
    Rite Online Inc.

    Voice: +1 (250) 979-1638
    URL: http://www.rite-online.net
    Rich Guest

  2. #2

    Default Re: CD TOC?

    In article <rite-group.com>,
    Rich Teer <com> wrote: 

    With mkisofs, you may have any string at this position.

    The default for x86 is:

    "CD-ROM Disc with Sun x86 boot created by mkisofs"
     

    mkisofs has it's own definitions as it works byte order independent.
    They are in sunlabel.h

    --
    EMail:isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
    tu-berlin.de (uni) If you don't have iso-8859-1
    fraunhofer.de (work) chars I am J"org Schilling
    URL: http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily
    Joerg Guest

  3. #3

    Default Re: CD TOC?

    On Sun, 29 Feb 2004, Joerg Schilling wrote:
     

    Excellent - thanks Jörg. BTW, where did you get this info from?

    --
    Rich Teer, SCNA, SCSA

    President,
    Rite Online Inc.

    Voice: +1 (250) 979-1638
    URL: http://www.rite-online.net
    Rich Guest

  4. #4

    Default Re: CD TOC?

    In comp.unix.solaris Rich Teer <com> wrote: 

    [...]
     

    How about:

    http://www.mobiledyne.com/pub/vtoch.html

    Kurt
    --
    The National Short-Sleeved Shirt Association says:
    Support your right to bare arms!
    Kurt Guest

  5. #5

    Default Re: CD TOC?

    On Sun, 29 Feb 2004, Kurt Wall wrote:
     

    Yeah, I looked at the version of that that ships with Solaris.
    Trouble is, it's for *disk* VTOCs, which are different to those
    found on CDs. Not to worry, as I have found the info I need
    in the the mkisofs source (though I'd like to know where Jörg
    got the info from...).

    --
    Rich Teer, SCNA, SCSA

    President,
    Rite Online Inc.

    Voice: +1 (250) 979-1638
    URL: http://www.rite-online.net
    Rich Guest

  6. #6

    Default Re: CD TOC?

    In article <rite-group.com>,
    Rich Teer <com> wrote: 
    >
    >Excellent - thanks Jörg. BTW, where did you get this info from?[/ref]

    From the place where it has been at least since 1986:

    sys/dklabel.h

    --
    EMail:isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
    tu-berlin.de (uni) If you don't have iso-8859-1
    fraunhofer.de (work) chars I am J"org Schilling
    URL: http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily
    Joerg Guest

  7. #7

    Default Re: CD TOC?

    In article <net>,
    Kurt Wall <com> wrote:
     
    >
    >How about:
    >
    >http://www.mobiledyne.com/pub/vtoch.html[/ref]

    Definitely wrong: he was asking about the on-disk structure.

    --
    EMail:isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
    tu-berlin.de (uni) If you don't have iso-8859-1
    fraunhofer.de (work) chars I am J"org Schilling
    URL: http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily
    Joerg Guest

  8. #8

    Default Re: CD TOC?

    In comp.unix.solaris Joerg Schilling <tu-berlin.de> wrote: 
    >>
    >>How about:
    >>
    >>http://www.mobiledyne.com/pub/vtoch.html[/ref]
    >
    > Definitely wrong: he was asking about the on-disk structure.[/ref]

    Whoops. Well, I guess that establishes that I don't know what I
    talking about. :-)

    Kurt
    --
    You are here:
    ***
    ***
    *********
    *******
    *****
    ***
    *

    But you're not all there.
    Kurt Guest

  9. #9

    Default Re: CD TOC?

    On Mon, 1 Mar 2004, Joerg Schilling wrote:
     

    Got it - many thanks.

    --
    Rich Teer, SCNA, SCSA

    President,
    Rite Online Inc.

    Voice: +1 (250) 979-1638
    URL: http://www.rite-online.net
    Rich Guest

  10. #10

    Default Re: CD TOC?

    In article <rite-group.com>,
    Rich Teer <com> writes: 
    >
    > Got it - many thanks.[/ref]

    If you want the source for something that uses that and extracts slices
    (other than the one starting at the beginning of the image) from a Solaris
    OS ISO, see ftp://smarty.smart.net/pub/rlhamil/goodies/imgslice.c

    --
    mailto:net http://www.smart.net/~rlhamil
    Richard Guest

  11. #11

    Default Re: CD TOC?

    On Tue, 2 Mar 2004, Richard L. Hamilton wrote:
     

    Something along those lines; thanks for the pointer.

    --
    Rich Teer, SCNA, SCSA

    President,
    Rite Online Inc.

    Voice: +1 (250) 979-1638
    URL: http://www.rite-online.net
    Rich Guest

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139