LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-09-2006, 02:19 AM   #1
me3
LQ Newbie
 
Registered: Jan 2005
Posts: 28

Rep: Reputation: 15
Get files from a disk image ? (How do I recover a floppy using Linux ?)


OK, I need to recover the contents of a DOS 360K 5.25" floppy disk written in 1988. Yeah, you read that right.

So... I found a 5.25" drive (harder than it sounds these days...) and set it up on my computer. After a bit of tweaking with the BIOS, I had it reading floppy disks. It read several disks fine, but I ran into a problem with one, as follows...

# mount /dev/fd0
mount: wrong fs type, bad option, bad superblock on /dev/fd0,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

So...

# dmesg | tail
VFS: Can't find a valid FAT filesystem on dev fd0.
FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev fd0.
FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev fd0.
SELinux: initialized (dev fd0, type msdos), uses genfs_contexts
FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev fd0.
FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev fd0.


Hmmm.... lets check this out:

#/sbin/fsck -r /dev/fd0
fsck 1.38 (30-Jun-2005)
dosfsck 2.10, 22 Sep 2003, FAT32, LFN
Logical sector size is zero.

Interesting.

Lets see how bad it really is:

#dd if=/dev/fd0 of=./floppyImage bs=512
720+0 records in
720+0 records out

So that is where I sit right now. I opened the image file up in khexeditor and it it doesn't seem to be totally scrambled. To the best of my knowledge the floppy has a few text files on it and a few little applications. I want the applications.

So how does one separate the files out of the image or how should I approach this problem ?

Thanks in advance.
 
Old 06-09-2006, 10:06 AM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,777

Rep: Reputation: 276Reputation: 276Reputation: 276
Did you try mounting the floppy image with loop:

# mount <path to floppyImage> <mount point> -o loop

and try reading the image through the above mount point:

# ls <mount point>
 
Old 06-09-2006, 05:53 PM   #3
me3
LQ Newbie
 
Registered: Jan 2005
Posts: 28

Original Poster
Rep: Reputation: 15
I didn't try using loop. What does it do ? How does it help ?

Thanks.
 
Old 06-09-2006, 07:13 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,157

Rep: Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340
Quote:
Originally Posted by me3
So how does one separate the files out of the image or how should I approach this problem ?
I'd be inclined to mkdosfs on it. With luck it'll just (re-)build the f/s meta-data, and let you see the files.
Without luck you'll have an empty floppy ...
In that case dd the image back and wait for better suggestions to pour in ...
 
Old 06-10-2006, 12:01 PM   #5
me3
LQ Newbie
 
Registered: Jan 2005
Posts: 28

Original Poster
Rep: Reputation: 15
"I'd be inclined to mkdosfs on it. With luck it'll just (re-)build the f/s meta-data, and let you see the files."

I thought making a new filesystem would wipe the existing FAT clean and thus remove the existing files ? (Do floppies have a FAT ?)

How would mkdosfs recognize the existing files and not wreck them ? (I don't know much about DOS floppies...)

How do I know that the current floppy read process is recognizing the floppy disk as the right media type, ie 360K ?

Thanks.
 
Old 06-10-2006, 06:03 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,157

Rep: Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340
I don't know - but you have the perfect opportunity to answer some of those questions.
Do it and find out.

If it all goes to hell, you'll still have learned something - then dd the image back, and try something else.
 
Old 06-11-2006, 12:48 PM   #7
me3
LQ Newbie
 
Registered: Jan 2005
Posts: 28

Original Poster
Rep: Reputation: 15
I'd be happy to test a bunch of stuff and report back.

Will a dd back onto the diskette give me exactly what I started with ?
 
Old 06-11-2006, 05:28 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,157

Rep: Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340
All whopping 360k of it...
I've done some terrible things to disks (not 5 1/4 admittedly), and never had an issue restoring them. So long, of course, that the media is good. May not be the case here, so you need to consider that.

You said you had some other disks you could read - maybe you could back them up the same way, and restore this dodgy image onto one of those.
See if you can read it then - eliminates media as the problem.

I like to play around a bit when I have a problem - have fun.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Need to know the release date of the floppy disk boot image for FC3 Kevin1290X KTPX Fedora 2 12-01-2004 09:26 AM
Recover files from formatted hard disk bankfishin Linux - General 2 10-22-2004 04:39 PM
floppy disk - image copy towlie Slackware 5 04-21-2004 05:33 PM
Taking .txt files from Linux to Windows NT on Floppy Disk???? rnk103 Linux - General 1 09-18-2003 06:43 AM
using a floppy disk image as a partition antken Linux - General 6 02-16-2003 10:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:48 AM.

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