Re: CD images and trailing nulls
On Wednesday 10 November 2004 10:17, Richard Atterer wrote:
> On Tue, Nov 09, 2004 at 05:22:25PM +0000, Thaddeus H. Black wrote:
> > I burn the image onto the CD, then dd(1) the image from /dev/cdrom back
> > to the hard disk, and some of the trailing nulls are missing.
>
> I read once on some web page that dd is not the best utility to read back
> all the data on a CD. IIRC, the author recommended to 1) mount the CD, and
> 2) use cat to read the data. I haven't actually tried any of this myself...
>
> Cheers,
>
> Richard
Mount it.
df to get the no of 1k blocks.
divide that by 2 to get the no of sectors.
then either
readcd dev=whatever f=youriso sectors=0-sectors_from_above
or
dd if=/dev/cdromX of=youriso bs=2048 count=sectors_from_above
If you burnt the cdr yourself you can note the sector count written as
reported by cdrecord. Maybe you need to use -v to get that report, I'm not
sure because I always use it anyway.
Alternatively, once you get to know how many extra sectors (possibly zero)
cdrecord puts on beyond the iso area, you can use cdrecord in interactive
mode, (select 11) and deduct those extra sectors from the reported default.
The above works in Woody, but with newer systems using automount you might
have trouble doing the df as above.
HTH
Bob
Reply to: