LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 09-26-2007, 06:20 AM   #1
eulaersi
LQ Newbie
 
Registered: Jul 2007
Posts: 27

Rep: Reputation: 0
Retrieve mp3's from corrupt hard disk


I have an image of a corrupt 20 GB disk (with dd). I would like to try to retrieve all mp3's on the disk.

I've already found the following example to retrieve jpg files. Would it be possible to use the same kind of script to retrieve mp3 files? Which solution do you suggest?

>> I also assumed there was no fragmentation, and then proceeded
>> to 'dd' anything that looked like an EXIF header +1.5MB to disk
>> as individual files.
>>Something along these lines:
hexdump -C sda1_flashdisk.dd | grep -i "exif" >headers.hex
cat headers.hex | awk --non-decimal-data '{print (sprintf("%d","0x"$1)/512)}' > headers.512.dec
cat headers.512.dec | xargs --replace bash -c "dd skip={} if=sda1_flashdisk.dd bs=512 count=3000 of=./{}.jpg"
 
Old 09-26-2007, 03:46 PM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
I had some success once using photorec to rescue some multimedia files from a disk I accidentally reformatted. In spite of the name, it will try to recover files of all kinds. It's very simple though, and I don't think you can set it to search for any specific type of file. It just rescues everything it comes across.
 
Old 09-27-2007, 01:00 AM   #3
eulaersi
LQ Newbie
 
Registered: Jul 2007
Posts: 27

Original Poster
Rep: Reputation: 0
Thanks for the tip. I was able to retrieve most of my data with photorec.

Best regards

Ivan
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SATA Hard disk(Windows) MBR corrupted by IDE hard disk(Linux) Peter_APIIT Fedora 6 07-07-2007 12:20 AM
Can I use a virtual machine hard disk as a real hard disk, or vice versa? onlineapps Linux - Software 1 02-24-2007 08:40 PM
60GB laptop hard disk & 200GB external USB hard disk linux compatibility powah Linux - Hardware 0 03-07-2006 10:55 AM
Kernel corrupt, check hard disk Hal Linux - Hardware 2 12-22-2005 10:15 AM
How to record MP3's too a Mini Disk? mo0ness Linux - General 2 12-24-2003 10:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration