[Solution: NoCando] how to make iso image file from audio cd

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
User avatar
gurfle
Posts: 385
Joined: 2009-06-04 02:08
Location: Seattle, Washington, US

[Solution: NoCando] how to make iso image file from audio cd

#1 Post by gurfle »

The issue concerns a plain vanilla debian stretch installation with mate desktop.
Actually the same problem occurs on two different installations of stretch: 9.2 on a laptop and 9.1 on a desktop:

/dev/sr0 opens and plays audio CDs as expeted in VLC.

And while

Code: Select all

dd if=/dev/sr0 of=filename
works if the cd drive /dev/sr0 contains a debian installation disk,

an audio cd generates

Code: Select all

dd: error reading '/dev/sr0': Input/output error
0+0 records in
0+0 records out
0 bytes copied, 0.0356181 s, 0.0 kB/s
also

Code: Select all

nick@olddesktop:~$ isoinfo -i /dev/sr0
isoinfo: Input/output error. Read error on old image
nick@olddesktop:~$ 
I have xfburn and brasero installed. xfbrun apparently does not have the ability to copy a whole CD directly to an iso image. Brasero on the other hand can have the capability in some installations, however for me the only brasero "Copy CD/DVD" "image File" "Properties" choices I see are "Cdrdao" and "Cue". No "ISO9660" image choice is available in the "Disk image type" drop down list. I have seen online postings indicating "ISO9660" is an option that some installations of brasero have available, but cannot find anything explaining how to get it to show up when missing.

So I need answers to these two questions:
1) Can dd be used to make an iso file from an audio CD?
2) Can I get the "ISO9660 image" option to show up in the brasero "Disk image type" drop down list?

Thanks for any insights.
Last edited by gurfle on 2019-10-16 15:35, edited 1 time in total.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: how to make iso image file from audio cd

#2 Post by p.H »

gurfle wrote:1) Can dd be used to make an iso file from an audio CD?
No. An audio CD is not a data CD.
gurfle wrote:2) Can I get the "ISO9660 image" option to show up in the brasero "Disk image type" drop down list?
An audio CD does not contain an ISO 9660 or UDF filesystem.

cuckooflew
Posts: 677
Joined: 2018-05-10 19:34
Location: Some where out west
Been thanked: 1 time

Re: how to make iso image file from audio cd

#3 Post by cuckooflew »

I disagree with PH, on not being able to use the 'dd' command, however he is correct :
An audio CD does not contain an ISO 9660 or UDF filesystem.
The key being, you need to do some research, key words:

Code: Select all

 how to make iso image file from audio cd using the dd command 
any search engine will do.
If written correctly , the 'dd' command could be used:
https://www.thomas-krenn.com/en/wiki/Cr ... nder_Linux
===
Or, https://www.linuxjournal.com/content/ar ... ommandline and there are even more results, you might have to experiment with them a little .
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!

User avatar
gurfle
Posts: 385
Joined: 2009-06-04 02:08
Location: Seattle, Washington, US

Re: how to make iso image file from audio cd

#4 Post by gurfle »

Thanks for correcting my lack of understanding about what ISO 9660 really is, or in this case really is not :oops:

My actual goal is to create some kind of file system based equivalent an entire audio CD, to be later used for creating an exact copy of said CD.

Looks like what I then really need is to have brasero (or some other audio-to data-file conversion software, which dd is not) make a Cdrdao file (instead of an ISO 9660 file), which can then be used to burn the copy I am after.

Again, thanks all for assisting in clearing up a serious misconception on my part. Looks like I now have what I was really after. :)

Cheers, Nick

User avatar
sunrat
Administrator
Administrator
Posts: 6744
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 122 times
Been thanked: 540 times

Re: how to make iso image file from audio cd

#5 Post by sunrat »

gurfle wrote:My actual goal is to create some kind of file system based equivalent an entire audio CD, to be later used for creating an exact copy of said CD.
All you need is audio extraction software which will create a cue file alongside the audio file/s which can then be used to burn an audio cd which will be virtually identical. K3b and SoundKonverter can do that. K3b also has a "Copy CD" function which will rip tracks to a temporary file and then use them to burn a new CD copy. For non-KDE rippers you will have to check yourself.
Saving audio files like this will enable you to play them from your drive and write a fresh audio CD whenever you wish. Playing a disc image would be more tricky. You can even rip CDs to FLAC files to save space and still have identical audio on the new CDs you burn.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
gurfle
Posts: 385
Joined: 2009-06-04 02:08
Location: Seattle, Washington, US

Re: how to make iso image file from audi

#6 Post by gurfle »

Just to be clear (for anyone else stumbling across this thread), I've also used brasero (the gnome/mate gui default) quite successfully to extract cue binaries from audio CDs.

As I said, the "education" received here on the basics of audio CD file format has been extremely helpful. The searching I already done using all the obvious keywords @cuckooflew indicates failed to reveal the essential distinction between "cue" format and "isc9660". In fact a number results were very misleadingly hinting (via the search result summaries) that audio encoded on CD could be in extracted into a "iso9660" binary disk file format which, as has been well explained here by @p.H, is nonsense. This "search failure" is what lead me to ultimately post the question here.

Once again, thanks all for the very useful and enlightening assistance, ]\[
Last edited by gurfle on 2019-10-18 14:51, edited 1 time in total.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: how to make iso image file from audio cd

#7 Post by p.H »

cuckooflew wrote:I disagree with PH, on not being able to use the 'dd' command
You can disagree as much as you want, but the fact is that dd can be used only on a data track, not an audio track.
Last edited by p.H on 2019-10-18 17:17, edited 1 time in total.

CwF
Global Moderator
Global Moderator
Posts: 2795
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 47 times
Been thanked: 217 times

Re: [Solution: NoCando] how to make iso image file from audi

#8 Post by CwF »

@ p.H
So the link above does not work?
I made myself a note in case I ever have an optical in a debian machine. I do use iso images of concerts, served up as a qemu optical, works fine. They were made long ago, on a machine that still works, so I've never tried in linux.

I'm not seeing why it wouldn't work basically as a disk-at-once read?

My condensed note:
for direct to iso
1) Reading the block size and the volume size:
# isoinfo -d -i /dev/cdrom | grep -i -E 'block size|volume size'
Logical block size is: 2048
Volume size is: 327867
1) Running dd with the parameters for block size and volume size:
# dd if=/dev/cdrom of=test.iso bs=<block size from above> count=<volume size from above>

User avatar
gurfle
Posts: 385
Joined: 2009-06-04 02:08
Location: Seattle, Washington, US

Re: [Solution: NoCando] how to make iso image file from audi

#9 Post by gurfle »

@CwF: Your first step does not work for me:

Code: Select all

nick@newlaptop:~$ isoinfo -d -i /dev/cdrom
isoinfo: Input/output error. Read error on old image
nick@newlaptop:~$  
as actually shown in my original post using /dev/sr0 -> /dev/cdrom, and done of course with a good audio CD in drive :wink:

CwF
Global Moderator
Global Moderator
Posts: 2795
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 47 times
Been thanked: 217 times

Re: [Solution: NoCando] how to make iso image file from audi

#10 Post by CwF »

@gurfle I have nothing to test with so if you could find the two parameters for the command line and try?

User avatar
gurfle
Posts: 385
Joined: 2009-06-04 02:08
Location: Seattle, Washington, US

Re: [Solution: NoCando] how to make iso image file from audi

#11 Post by gurfle »

Sorry, @CwF, but I do not quite get what you are asking. I put the two parameters "-d -i" in the result posted, so I am not sure what you mean by "find".

Those results were not done as root though. Running the full exact same line you posted as root yields this additional information (of course grep is never invoked since isinfo fails):

Code: Select all

root@newlaptop:/home/nick# isoinfo -d -i /dev/cdrom | grep -i -E 'block size|volume size'
Errno: 5 (Input/output error), test unit ready scsi sendcmd: no error
CDB:  00 00 00 00 00 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 02 00 00 00 00 0A 00 00 00 00 3A 01 00 00
Sense Key: 0x2 Not Ready, Segment 0
Sense Code: 0x3A Qual 0x01 (medium not present - tray closed) Fru 0x0
Sense flags: Blk 0 (not valid) 
cmd finished after 0.027s timeout 20s
isoinfo: No such file or directory. Unable to open /dev/cdrom
root@newlaptop:/home/nick# 

CwF
Global Moderator
Global Moderator
Posts: 2795
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 47 times
Been thanked: 217 times

Re: [Solution: NoCando] how to make iso image file from audi

#12 Post by CwF »

@gurfle that is find bs= and count=

I'd assume bs is 2048, but the count is the length of the disc, so guess! The best result might be a clipped image, so guess short just to see if it works. I'd do it all in root.

I dissembled a debian test bench with an optical a few weeks ago. The replacement is not in place yet, but I will try this at some point.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: [Solution: NoCando] how to make iso image file from audi

#13 Post by p.H »

CwF wrote:So the link above does not work?
Not with audio CDs.
Please read about the formats of an audio CD and a data CD. Wikipedia explains this much better than I would.
A data CD has a data track, which usually contains an ISO 9660 or UDF filesystem. An audio CD has audio tracks. An hybrid CD contains a data track and audio tracks. Data tracks and audio tracks have different formats, sector size, error correction codes... /dev/sr* reads the data track, not audio tracks.

User avatar
gurfle
Posts: 385
Joined: 2009-06-04 02:08
Location: Seattle, Washington, US

Re: [Solution: NoCando] how to make iso image file from audi

#14 Post by gurfle »

@CwF: Thanks, I understand you now. Nonetheless . . .

Code: Select all

root@newlaptop:/home/nick# dd if=/dev/cdrom of=test.iso bs=2048 count=8191
dd: error reading '/dev/cdrom': Input/output error
0+0 records in
0+0 records out
0 bytes copied, 0.102789 s, 0.0 kB/s
root@newlaptop:/home/nick# 
Same with all smaller multiples of bs=512 and a few larger multiples of 2048.
So unless you can convince me otherwise, I'm going to assume @p.H is right about dd not being able to handle audio tracks.

Also, now (first without , but also after reboot) I don't get all the extra error info from isoinfo as root posted just now. Something is unpredictable here. My desktop is mate, using caja file browser, which does some fancy and at times weirdly unpredictable things with mounting devices. Not sure if that is connected.

In any case inserting an audio CD into drive causes caja to mount the disk automatically, recognize it as audio and allows you to copy the tracks directly into .wav files, which is convenient.

EDIT: Just realized all of the symptoms described below are only because of the following:

Code: Select all

root@newlaptop:/media# cat /etc/fstab | grep cdrom
/dev/sr0			/media/cdrom0				udf,iso9660	user,noauto		0	0
root@newlaptop:/media# 
and so are a consequence of strange interactions between the new fangled way of device management used by mate/caja and the traditional way involving mostly just fstab. Removing this from fstab avoids this confusion in caja, however I need it so I can access real iso data disks via /media/cdrom -> /media/cdrom0. Anyway,obviously the following observations have nothing to do with what I'm trying to resolve with @CwF:

At the same time as caja mounts the disk (shown there as device "Audio DIsk"), "cdrom0" also shows up there then as a "mountable" device, though it actually can't be accessed from caja, eventually disappears, and once even weirdly stopped reappearing at all in caja's device list when audio CDs were reinserted (haven't reproduced that behavior again yet).
Last edited by gurfle on 2019-10-20 14:16, edited 1 time in total.

CwF
Global Moderator
Global Moderator
Posts: 2795
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 47 times
Been thanked: 217 times

Re: [Solution: NoCando] how to make iso image file from audi

#15 Post by CwF »

Ya I missed that little detail...
Look in /dev for the path, sr* would be the proper path and is what p.H is saying. We wouldn't expect dd to rip from a mounted directory I suppose. My bad!

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: [Solution: NoCando] how to make iso image file from audi

#16 Post by p.H »

No, it has nothing to do with what I was saying. /dev/cdrom is just a symlink pointing to /dev/sr0, using either gives the same result.

User avatar
esp7
Posts: 177
Joined: 2013-06-23 20:31
Has thanked: 2 times
Been thanked: 4 times

Re: [Solution: NoCando] how to make iso image file from audi

#17 Post by esp7 »

you should rip to flac.
ThinkPad X220: i5-2520M CPU 2.5GHz - 8GB RAM 1333 MHz - SSD 860 EVO 250GB - Debian - ME_cleaned
ThinkPad X230: i5-3320M CPU 3.3GHz - 8GB RAM 1600 MHz - SSD 860 EVO 500GB - Debian - ME_cleaned

Post Reply