Copy a multi partition CD/DVD?

  • Follow


I have a DVD here with two sessions, one for PCs and one for Mac.  I 
need to make an exact duplicate with both partitions.

I figure I'll use the dd command to make an ISO and then burn the ISO 
using Disk Utility.

dd if=/dev/disk1 of=~/DVDimage.iso bs=2k

Here is what diskutil -list gets me.
/dev/disk1
   0:        CD_partition_scheme                    *492.2 MB   disk1
   1:     Apple_partition_scheme                     428.6 MB disk1s1
   2:        Apple_partition_map                     32.3 KB  disk1s1s1
   3:                  Apple_HFS Sales_Demo          153.8MB  disk1s1s2

Will that work, resulting in an ISO complete with the partitions OSX 
doesn't see?
0
Reply justin4202 (22) 4/13/2011 5:37:38 AM

Justin <justin@becauseihatenospam.org> wrote:

> I have a DVD here with two sessions, one for PCs and one for Mac.  I 
> need to make an exact duplicate with both partitions.
> 
> I figure I'll use the dd command to make an ISO and then burn the ISO
> using Disk Utility.
> 
> dd if=/dev/disk1 of=~/DVDimage.iso bs=2k
> 
> Here is what diskutil -list gets me.
> /dev/disk1
>    0:        CD_partition_scheme                    *492.2 MB   disk1
>    1:     Apple_partition_scheme                     428.6 MB disk1s1
>    2:        Apple_partition_map                     32.3 KB  disk1s1s1
>    3:                  Apple_HFS Sales_Demo          153.8MB  disk1s1s2
> 
> Will that work, resulting in an ISO complete with the partitions OSX 
> doesn't see?

Probably not.

Mac OS X appears to create a virtual file system for mounted CDs and
DVDs, which doesn't match what is actually on the disk. The
"CD_partition_scheme" in the list above doesn't exist on the CD.

If I examine a hybrid CD using "hexdump -C /dev/disk1", it shows some
additional data wrapped around the Apple partition map, and the ISO 9660
directory is at the wrong offset.

If I examine the disk again using "hexdump -C /dev/rdisk1s1", it shows
what I expected to see: Apple driver descriptor map at the start of the
disc, partition map at 512 bytes, and ISO 9660 directory at 32768 bytes.

You would probably have to copy /dev/rdisk1s1 rather than copying
/dev/disk1.

You can create a valid disk image of a hybrid CD using Disk Utility.
Select the icon of the entire CD (leftmost icon, not the indented one),
and click on the New Image button. Choose "DVD/CD Master" as the image
format, and it will save a .cdr file (which you can rename as .iso).

I normally use Toast to copy hybrid CDs and it just works.


Some background:

A hybrid CD/DVD doesn't normally use separate sessions for Mac and
Windows content. There is a single session containing two file systems,
which are interleaved in a complex way.

The Apple Partition Map scheme is based around a block size of 512 bytes
(so a CD's 2048 byte physical sector is treated as 4 logical sectors).
Block 0 of the physical disk contains a driver descriptor map (normally
unused on a CD), and the partition map starts in block 1, with one block
required for each partition (including the partition table itself).

Windows uses ISO 9660 on CDs. DVDs might be ISO 9660 or UDF. (I haven't
looked into UDF in detail.)

ISO 9660 starts its file system 32768 bytes into the disk, which
corresponds to logical block 64 of a disk using Apple Partition Map. To
accomodate ISO 9660 on a hybrid CD/DVD, the APM partition table is
specified as being 2 blocks, and there is an unassigned area starting at
block 3 until the end of the ISO 9660 area. The rest of the disk is a
standard HFS/HFS+ file system, in a single partition.

ISO 9660 has the ability to reference files located anywhere on the
CD/DVD, so it is possible for the ISO 9660 file system to reference
files within the HFS/HFS+ volume, resulting in a shared file that only
needs to be included once on the CD.

This feature also allows for multi-session ISO 9660 CDs which
effectively update the previous session with a new one. On a
multi-session ISO 9660 CD, the directory is read from the last session,
ignoring all earlier ones. That directory may refer back to files
located in earlier sessions, so it is possible to "update" an ISO 9660
CD without having to rewrite all of its content in the new session, just
an updated directory and any new or replaced files.

If you write a multi-session CD with HFS/HFS+, then you end up with what
looks like a partitioned disk, with each session appearing as a separate
logical volume. HFS/HFS+ can't share files between sessions/partitions,
so you have to write everything again to "update" a CD.

-- 
David Empson
dempson@actrix.gen.nz
0
Reply dempson (3499) 4/13/2011 6:41:30 AM


In article <1jzoc70.1lwamn919yffx3N%dempson@actrix.gen.nz>,
 dempson@actrix.gen.nz (David Empson) wrote:

> I normally use Toast to copy hybrid CDs and it just works.

Same here.

-- 
Send responses to the relevant news group rather than email to me.
E-mail sent to this address may be devoured by my very hungry SPAM
filter. Due to Google's refusal to prevent spammers from posting
messages through their servers, I often ignore posts from Google
Groups. Use a real news client if you want me to see your posts.

JR
0
Reply jollyroger (10617) 4/13/2011 12:56:03 PM

In article <jollyroger-16D612.07560313042011@news.individual.net>,
 Jolly Roger <jollyroger@pobox.com> wrote:

> In article <1jzoc70.1lwamn919yffx3N%dempson@actrix.gen.nz>,
>  dempson@actrix.gen.nz (David Empson) wrote:
> 
> > I normally use Toast to copy hybrid CDs and it just works.
> 
> Same here.

Another thumbs up for Toast here.  I have burnt many hybrid CDs and DVDs 
over the past few years and Toast just works.

"PC format" is also understood by many non-PC operating systems.

-- 
Paul Sture
0
Reply paul.nospam (2160) 4/14/2011 6:36:12 PM

On 4/13/11 2:41 AM, David Empson wrote:
> Justin<justin@becauseihatenospam.org>  wrote:
>
>> I have a DVD here with two sessions, one for PCs and one for Mac.  I
>> need to make an exact duplicate with both partitions.
>>
>> I figure I'll use the dd command to make an ISO and then burn the ISO
>> using Disk Utility.
>>
>> dd if=/dev/disk1 of=~/DVDimage.iso bs=2k
>>
>> Here is what diskutil -list gets me.
>> /dev/disk1
>>     0:        CD_partition_scheme                    *492.2 MB   disk1
>>     1:     Apple_partition_scheme                     428.6 MB disk1s1
>>     2:        Apple_partition_map                     32.3 KB  disk1s1s1
>>     3:                  Apple_HFS Sales_Demo          153.8MB  disk1s1s2
>>
>> Will that work, resulting in an ISO complete with the partitions OSX
>> doesn't see?
>
> Probably not.


Well...  shit.
What about Burn?


0
Reply Justin9 (261) 4/15/2011 3:11:05 AM

Justin <Justin@nobecauseihatespam.edu> wrote:

> On 4/13/11 2:41 AM, David Empson wrote:
> > Justin<justin@becauseihatenospam.org>  wrote:
> >
> >> I have a DVD here with two sessions, one for PCs and one for Mac.  I
> >> need to make an exact duplicate with both partitions.
> >>
> >> I figure I'll use the dd command to make an ISO and then burn the ISO
> >> using Disk Utility.
> >>
> >> dd if=/dev/disk1 of=~/DVDimage.iso bs=2k
> >>
> >> Here is what diskutil -list gets me.
> >> /dev/disk1
> >>     0:        CD_partition_scheme                    *492.2 MB   disk1
> >>     1:     Apple_partition_scheme                     428.6 MB disk1s1
> >>     2:        Apple_partition_map                     32.3 KB  disk1s1s1
> >>     3:                  Apple_HFS Sales_Demo          153.8MB  disk1s1s2
> >>
> >> Will that work, resulting in an ISO complete with the partitions OSX
> >> doesn't see?
> >
> > Probably not.
> 
> 
> Well...  shit.
> What about Burn?

I haven't used Burn in anger, since I've had Toast for ages before Burn
existed, but I do have it installed.

It has a "Copy" function, which should function as well as Toast's
ability to create a copy of a hybrid CD/DVD. I see it also has a "Save
Image" command.

The key point is that the copy mechanism must copy the entire session as
it appears on the CD, not just the Mac file system (one
partition/volume), and not copy the Mac OS X's hybrid view of the CD
(which is presumably there so it can treat a multi-session Mac CD as a
single physical volume).

To repeat what I said in the previous post:

dd of /dev/diskN won't work, because that is a hybrid view of what is on
the CD/DVD.

dd of /dev/rdiskNs1 should work, because that it is the raw view of the
first session on the CD/DVD.

Disk Copy creating an image from the CD/DVD (whole disc, not the
partition) does work. I have used this to create a copy of a hybrid
single-session disc.

Toast does work.

Burn should work.


It is less clear what will happen with each of these options if your
disc really is multi-session and you want to copy it. Disk Utility
should reveal the structure, as each session is shown as a greyed out
icon "Session N" between the disc icon and the volume icon.

As I said earlier, a hybrid Mac/Windows CD is normally NOT
multi-session. If the Mac and Windows data were written in separate
sessions then the Mac would mount the disc as two icons on the desktop.

-- 
David Empson
dempson@actrix.gen.nz
0
Reply dempson (3499) 4/15/2011 12:19:49 PM

5 Replies
26 Views

(page loaded in 0.244 seconds)

Similiar Articles:













7/23/2012 2:54:07 AM


Reply: