LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 09-16-2006, 07:30 PM   #1
Hacker X
Member
 
Registered: Jun 2006
Location: Urbana, Illinois, US
Distribution: Zenwalk, Vector
Posts: 76

Rep: Reputation: 15
rescuing a floppy


Is there a way to rescue orphaned files on a floppy disk? And what did I do to lose track of them? Is there some kind of write buffering that I removed the disk too soon?
 
Old 09-16-2006, 09:05 PM   #2
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,147

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
You could try mounting the floppy and using dd to see what's there. As to how you "lost" things, most Linux file operations are blocked and buffered, and changes are not written to a drive before the block is full. umounting a drive will flush the buffer to the drive, and eject normally unmounts the drive before ejecting it. If you manually removed the floppy before the last buffer was written and the disk directory updated (usually about 30 seconds of inactivity will trigger this), the information in the last buffer never made it to the disk, so it can't be there to be recovered.
 
Old 09-17-2006, 01:48 AM   #3
Hacker X
Member
 
Registered: Jun 2006
Location: Urbana, Illinois, US
Distribution: Zenwalk, Vector
Posts: 76

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by PTrenholme
If you manually removed the floppy before the last buffer was written and the disk directory updated ..., the information in the last buffer never made it to the disk, so it can't be there to be recovered.
Yes, that did happen once or twice, but something else happened too. The disk is half full despite ls not showing anything. The files are there, but the i-nodes or something got messed up.

Quote:
You could try mounting the floppy and using dd to see what's there.
I don't understand, how does dd do that? I thought it just copies an image.
 
Old 09-17-2006, 07:44 PM   #4
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,147

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
dd if=/media/floppy should do it, but check the manual pages for details and options. Note that, by setting offsets and byte counts you should be able to rebuild the files.

You refer to i-nodes on the floppy. Does that imply that you created a Linux file system on the floppy? (mkfs.e2fs, for example, does work for a floppy, but most people use floppies for porting between systems, and FAT is much more commonly used for that.)
 
Old 09-20-2006, 10:13 PM   #5
Hacker X
Member
 
Registered: Jun 2006
Location: Urbana, Illinois, US
Distribution: Zenwalk, Vector
Posts: 76

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by PTrenholme
dd if=/media/floppy should do it, but check the manual pages for details and options.
I/O error trying to copy from the unmounted disk.
Can't copy a directory after the disk is mounted.
No files copied, and I still don't understand what dd is supposed to be doing.

Quote:
You refer to i-nodes on the floppy. Does that imply that you created a Linux file system on the floppy?
No, it implies that I don't know what I'm talking about. It's just a regular vfat format. All I know is that a bunch of files aren't showing up in ls anymore, and df says the disk is half full with ls showing nothing in it.
 
Old 09-21-2006, 07:15 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,812

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
No need to mount drive. dd will do a byte for byte copy of the disk to a file. You can examine the image file to see its contents.
dd if=/dev/fd0 of=floppy.img
 
Old 09-21-2006, 08:17 PM   #7
Hacker X
Member
 
Registered: Jun 2006
Location: Urbana, Illinois, US
Distribution: Zenwalk, Vector
Posts: 76

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by michaelk
dd if=/dev/fd0 of=floppy.img
That's the IO error. So I guess something is too corrupted. But I can still mount the disk and see the more recent files.

Quote:
You can examine the image file to see its contents.
How do you do that?

Sorry about all the questions. I just don't have another form of backups right now, so it would be good to know as much as possible. Thanks for all the help.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Switching from grub to lilo, messed up Lilo.conf, rescuing via Knoppix. SonicGT Debian 2 08-21-2005 01:15 PM
Rescuing Fedora Core 4 ethics Fedora 3 07-14-2005 06:28 AM
attn linux groups in chicago. girl needs rescuing marytuesday General 2 05-06-2005 06:22 PM
Best live-cd distro for rescuing a system Coume Linux - Distributions 3 07-20-2004 09:50 PM
Rescuing my Debian! mc_03 Debian 9 03-30-2004 06:19 PM


All times are GMT -5. The time now is 05:52 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration