Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help to retrieve the file ..

Status
Not open for further replies.

MaheshRathi

Technical User
Jan 17, 2002
62
IN
Hi,

I want to know how to retrieve the file from Lost+Found folder. I can see a list of inodes in that folder like #102343, #642032 etc.

Is there any command utility for this?
regards,
Mahesh

 
Lost & found usually contains files whose parent directory canot be found, often as the the result of an fsck. The files will be placed in the lost & found directory at the top of the filesystem in which they're found and renamed with their inode number (because the name given to a file is recorded only in it's 'home' directory (not to be confused with a user's home directory. Can you cat the files and obtain a clue as to what they might be and where they're from? Post back with any more info you may have or discover and good luck.
 
Just an addition to the above, if the files can't be catted, try strings <filename> to see printable strings of characters in binary files. Hopefully this will give you a clue.
 
Yeah, that's true.
But when i used file command for those files, two are data files, one is ascii text file and one more some other type. But, now the point is how to retrieve the files? I lost /etc/fstab file and now neither i am able to go to init 3 level and even in single user mode, i am not able to creat new /etc/fstab .. getting error &quot;can't write on disk, mounted as read only&quot;.

I can't even remount as read-write. I have just two options .. one somehow retrive /etc/fstab or reinstall linux.

If any window's lover there then ... F1 F1 (help) :)

regards,
Mahesh
 
Hmm...sorry about this, but it sounds as if a reinstall might be your only option. Is this a production machine, and if so, do you have any backup? I'm no Linux expert, so you might wish to wait until this afternoon (GMT) in case any other worldwide members more experienced in Linux might be able to advise further.
 
If fstab is gone, it may be one of the files in lost+found. If you can in fact find it there, simply


mv /lost+found/201816 /etc/fstab

(replacing 201186 with whatever it is, of course)

Tony Lawrence
SCO Unix/Linux Resources tony@pcunix.com
 
Hi,





Have you tried to get it to boot with the root filesystem starting in r/w mode rather than the normal r/o. You'd do that by passing parms to lilo at boot time :





boot: linux root=/dev/hda1 rw





(where /dev/hda1 is your root filesystem)





The other thing would be to boot with CD doing :





boot: linux rescue





(if your sys supports that)





or to boot from something like toms root/boot disk (




Either way, you'd then attempt to mount your original root partition at a different mount point and set-up a new fstab.





Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top