Hi all,
I burnt some data on a CD in four different sessions, the last of which failed on me. The CD is now a coaster and I can't recover the data from even the first three sessions which were successful.
I tried a few Windoze software (BadCopy, IsoBuster, CDRoller) in vain. Is there a Linux way ?
TIA,
Zainul.
On Friday 28 May 2004 10:57, Zainul M Charbiwala wrote:
Hi all,
I burnt some data on a CD in four different sessions, the last of which failed on me. The CD is now a coaster and I can't recover the data from even the first three sessions which were successful.
I tried a few Windoze software (BadCopy, IsoBuster, CDRoller) in vain. Is there a Linux way ?
no problem is too big or small for linux ;-). cdfs and loopback is ur friend. Recovered several cds which wanted to laze atound as coasters.
On Fri, 28 May 2004 15:48:01 +0530 jtd jtdsouza@softhome.net wrote:
On Friday 28 May 2004 10:57, Zainul M Charbiwala wrote:
Hi all,
I burnt some data on a CD in four different sessions, the last of which failed on me. The CD is now a coaster and I can't recover the data from even the first three sessions which were successful.
I tried a few Windoze software (BadCopy, IsoBuster, CDRoller) in vain. Is there a Linux way ?
no problem is too big or small for linux ;-). cdfs and loopback is ur friend. Recovered several cds which wanted to laze atound as coasters.
Direct mount does not work. What are you suggesting ?
dd if=/dev/cdrom of=temp.iso bs=1024 count=600000
gives I/O errors
Zainul.
On Friday 28 May 2004 16:14, Zainul M Charbiwala wrote:
On Fri, 28 May 2004 15:48:01 +0530
jtd jtdsouza@softhome.net wrote:
On Friday 28 May 2004 10:57, Zainul M Charbiwala wrote:
Hi all,
I burnt some data on a CD in four different sessions, the last of which failed on me. The CD is now a coaster and I can't recover the data from even the first three sessions which were successful.
Direct mount does not work. What are you suggesting ?
compile cdfs in the kernel or as a module. modprobe cdfs mount -t cdfs -o ro /dev/hdc /cdrom mount -t iso9660 -o loop /cdrom/sessions_1-1.iso /mnt/loop1
AND google for cdfs
Goole result. ;)
http://bobi.ifs.hr/ifs/razno/doc/wholefaq.html#%5B7-9] http://www.cdrfaq.org/faq07.html#S7-9
Regards, Animesh.
--- jtd jtdsouza@softhome.net wrote:
On Friday 28 May 2004 16:14, Zainul M Charbiwala wrote:
On Fri, 28 May 2004 15:48:01 +0530
jtd jtdsouza@softhome.net wrote:
On Friday 28 May 2004 10:57, Zainul M Charbiwala
wrote:
Hi all,
I burnt some data on a CD in four different
sessions, the last
of which failed on me. The CD is now a coaster
and I can't
recover the data from even the first three
sessions which were
successful.
Direct mount does not work. What are you
suggesting ?
compile cdfs in the kernel or as a module. modprobe cdfs mount -t cdfs -o ro /dev/hdc /cdrom mount -t iso9660 -o loop /cdrom/sessions_1-1.iso /mnt/loop1
AND google for cdfs
__________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/
On Sat, 29 May 2004 10:11:44 +0530 jtd jtdsouza@softhome.net wrote:
<snip>
Direct mount does not work. What are you suggesting ?
compile cdfs in the kernel or as a module. modprobe cdfs mount -t cdfs -o ro /dev/hdc /cdrom mount -t iso9660 -o loop /cdrom/sessions_1-1.iso /mnt/loop1
It says "No medium found" ! (The same as when I tried a dd)
The trouble is that the TOC is damaged and it thus refuses to believe that a CD exists in the drive let alone detect the number of tracks/sessions.
The only way I can think of is trying to dump the raw contents of the CD somehow and then use some automation to figure where the sessions begin and end. Then use cdfs and a loopmount to get all the files back.
AND google for cdfs
Apparently, the only software I have found which overrides the temptation to believe that there is no CD in the drive is a Windows software called BadCopy. I could recover some files using that, but not many.
I toyed with cdrom.c in /usr/src/linux/drivers/cdrom to not return ENOMEDIUM back to the calling program (cdfs) but my compilation was broken :(
What would you suggest ?
Thanks,
Zainul.
On Saturday 29 May 2004 16:37, Zainul M Charbiwala wrote:
On Sat, 29 May 2004 10:11:44 +0530 jtd jtdsouza@softhome.net wrote:
<snip>
It says "No medium found" ! (The same as when I tried a dd)
The trouble is that the TOC is damaged and it thus refuses to believe that a CD exists in the drive let alone detect the number of tracks/sessions.
AFAIK (read this with a pinch of salt) if the first TOC is damaged u cant recover as the end of session location cannot be found and hence the next toc. In a multisession the last toc is the merge of all the previous toc. If the disk has defects the last toc gets corrupt, but (ususally) the earlier tocs are ok and hence recovery is possible. Also files are written as one single track (track size +padding >= sizeof (file1+file2+..filen)). Thus there is no way of recovering files without knowing their sizes.
The only way I can think of is trying to dump the raw contents of the CD somehow and then use some automation to figure where the sessions begin and end. Then use cdfs and a loopmount to get all the files back.
AND google for cdfs
Apparently, the only software I have found which overrides the temptation to believe that there is no CD in the drive is a Windows software called BadCopy. I could recover some files using that, but not many.
What software did u use to record the cd?
On Sun, 30 May 2004 12:17:51 +0530 jtd jtdsouza@softhome.net wrote:
AFAIK (read this with a pinch of salt) if the first TOC is damaged u cant recover as the end of session location cannot be found and hence the next toc. In a multisession the last toc is the merge of all the previous toc. If the disk has defects the last toc gets corrupt, but (ususally) the earlier tocs are ok and hence recovery is possible. Also files are written as one single track (track size +padding >= sizeof (file1+file2+..filen)). Thus there is no way of recovering files without knowing their sizes.
The CD was written in 4 different sessions, with only the last one failing. Thus the TOC of the first three sessions should be readable in the Lead-in of the 3rd session. But the trouble is the driver does not detect the CD in the drive because it tries to read the TOC from the failed lead-in of the 4th session, and the 'open' fails.
What would be helpful is some way of overriding default cdrom driver behavior. Kernel tinkering seems to be the only way.
Apparently, the only software I have found which overrides the temptation to believe that there is no CD in the drive is a Windows software called BadCopy. I could recover some files using that, but not many.
What software did u use to record the cd?
Nero ! ( I have driver problems with my writer in Linux on my laptop).
PS : BadCopy Pro has a unique 'Mode 2' wherein it just tries to read anything in the drive, regardless of whether there's anything in the drive or not. I could not find this feature in any other software. Is there any Linux CD recovery software at all ?
On Monday 31 May 2004 12:56, Zainul M Charbiwala wrote:
The CD was written in 4 different sessions, with only the last one failing. Thus the TOC of the first three sessions should be readable in the Lead-in of the 3rd session. But the trouble is the driver does not detect the CD in the drive because it tries to read the TOC from the failed lead-in of the 4th session, and the 'open' fails.
That is what cdfs avoids. So i think that the cd is physically damaged or ur drive and cd combo is problematic. Suggest u try cdfs on another drive preferably LG (found samsung to be real bad).
What software did u use to record the cd?
Nero ! ( I have driver problems with my writer in Linux on my laptop).
Some more info from the web on multisession using cdrecord. Dont know where I got the info from.
cdrecord dev=0,0 -msinfo 0,105248 This means that the previous session started at sector 0 (i.e. it was the first) and that subsequent sessions will start at sector 105248.
You can now use this information in the mkisofs command line:
# mkisofs -J -r -V Session2 -C 0,105248 -o output.iso /path/to/back/up Alternatively, you can use the shell's command substitution functions to use the output from cdrecord directly in your mkisofs command line:
# mkisofs -J -r -V Session2 -C $(cdrecord dev=0,0 -msinfo) -o output.iso /path/to/back/up
This has the effect of building a new filesystem and accounting for the fact that this session won't start at the beginning of the CD while generating the TOC.
Since multisession-compatible drives read the last session recorded on the CD, any earlier sessions will be lost. Read the next section to find out how to combine the TOC of the previous session with that of the new one, thus keeping all the data on the CD.
Combining the TOC of an existing session with the new TOC
Computer CD-ROM drives which are multisession-compatible read the last session written, so one of the effects of writing a new session is losing the previous one. This isn't usually the desired effect... There is, however, a way round it. We have to read the previous session's TOC and incorporate it into the new TOC. That way, there will be entries for files in the previous session (or sessions, if there's more than one already on the CD) in the TOC of this session. The new, combined, TOC will therefore contain entries for data in the new session alongside entries for data in previous sessions.
We use the -M device command line option in mkisofs to achieve this, where device follows the usual x,y notation as used by cdrecord (0,0 in the examples used here). The effect of -M is to instruct mkisofs to open the device specified, read the TOC of the last session on the media present in it, and incorporate this TOC into the TOC to be generated for the new session.
The partially written media obviously has to be in the drive when executing this command so that we can read the starting point of the previous and of this session and the previous session's TOC.
Our full command line is now going to look like this:
# mkisofs -J -r -V Session2 -C `cdrecord dev=0,0 -msinfo` -M 0,0 -o output.iso /path/to/back/up
Special considerations for burning multisession CD-ROM's If you want to be able to add further sessions to your CD after burning this one, then you have to tell cdrecord to burn it in a way which allows this. Unless otherwise instructed, cdrecord will just write the session and fixate the CD with a normal lead-out, making it impossible to add anything more.
This is what the -multi command line option is for.
# cdrecord dev=0,0 -v -eject speed=8 fs=16m -multi your_iso_file.iso
The CD will be cut in the usual fashion: device 0,0, verbose, eject when done, 8x speed, 16MB FIFO. When the data has been written, cdrecord will fixate the CD in a manner which allows a subsequent TOC, and therefore another session, to be written.
Once you decide that the session you're about to write is going to be the last one, you can omit the -multi option, and a final lead-out will be written after the data, finally closing the CD.
PS : BadCopy Pro has a unique 'Mode 2' wherein it just tries to read anything in the drive, regardless of whether there's anything in the drive or not. I could not find this feature in any other software. Is there any Linux CD recovery software at all ?
-- Zainul M Charbiwala http://www.ee.iitb.ac.in/~zainul/
On Mon, 31 May 2004 17:33:45 +0530 jtd jtdsouza@softhome.net wrote:
On Monday 31 May 2004 12:56, Zainul M Charbiwala wrote:
The CD was written in 4 different sessions, with only the last one failing. Thus the TOC of the first three sessions should be readable in the Lead-in of the 3rd session. But the trouble is the driver does not detect the CD in the drive because it tries to read the TOC from the failed lead-in of the 4th session, and the 'open' fails.
That is what cdfs avoids. So i think that the cd is physically damaged or ur drive and cd combo is problematic. Suggest u try cdfs on another drive preferably LG (found samsung to be real bad).
The CD is in pristine condition. Not a scratch. But I'll try to get my hands on an LG drive.
And cdfs 'thinks' that there is no CD in the drive because the kernel driver tells it that. The kernel driver tells it that because it can't read the last TOC. :( Would anyone know if there is any way I could override this behavior from application space ?
Some more info from the web on multisession using cdrecord. Dont know where I got the info from.
Thanks. This was quite helpful. I have yet to try all of it. And the cdrom.c tinkering I was talking about.
Will post any progress on this when it happens.
Thanks a lot,
Zainul.
Hi folks, Its been a long time since i wrote, well this time i have a problem.
I was trying to compile the APT program. When i give the make command i get the following error.
================ Making all in methods make[1]: Entering directory `/home/thinrhino/rpm/apt-0.5.15cnc6/methods' /bin/sh ../libtool --mode=link g++ -g -O2 -o cdrom cdrom.o ../apt-pkg/libapt-pkg.la -lz -lbz2 g++ -g -O2 -o .libs/cdrom cdrom.o ../apt-pkg/.libs/libapt-pkg.so /usr/lib/librpm.so -L/usr/lib -L/usr/src/build/283083-i386/BUILD/rpm-4.2.1/zlib -L/usr/local/lib /usr/lib/librpmdb.so -lelf /usr/lib/librpmio.so /usr/lib/libbeecrypt.so -lrt -lpthread /usr/lib/libpopt.so -lm -ldl -lz -lbz2 -Wl,--rpath -Wl,/usr/local/lib /usr/bin/ld: cannot find -lelf collect2: ld returned 1 exit status make[1]: *** [cdrom] Error 1 make[1]: Leaving directory `/home/thinrhino/rpm/apt-0.5.15cnc6/methods' make: *** [all-recursive] Error 1 ================
I also got the RPM package, but when i try to install it i get the following error: ================= [root@server rpm]# rpm -ivh apt-0.5.15cnc6-50.rhfc1.at.i386.rpm warning: apt-0.5.15cnc6-50.rhfc1.at.i386.rpm: V3 DSA signature: NOKEY, key ID 66534c2b error: Failed dependencies: /etc/apt/apt.conf is needed by apt-0.5.15cnc6-50.rhfc1.at /etc/apt/sources.list is needed by apt-0.5.15cnc6-50.rhfc1.at libapt-pkg = 1:0.5.15cnc6-50.rhfc1.at is needed by apt-0.5.15cnc6-50.rhfc1.at libapt-pkg-libc6.3-5.so.0 is needed by apt-0.5.15cnc6-50.rhfc1.at =================
Can somebody of you please throw some light on how to go about it.
Regards Aditya Laghate