Get files from a disk image ? (How do I recover a floppy using Linux ?)
Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
#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 ?
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 ...
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.