LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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
 
LinkBack Search this Thread
Old 04-18-2003, 08:45 PM   #1
nocturnal
Member
 
Registered: Apr 2003
Location: Sweden
Distribution: Slackware, LFS
Posts: 80

Rep: Reputation: 15
Unhappy recovering files


ok from the beginning...
i wanted to try slackware 9.0 so i decided to boot with the cd in the drive and i got a checksum error so i thought nothing big i just download a new one and make sure it works this time, well when i wanted to boot redhat right after the slack cd error it all went just fine until the x server was supposed to start then the screen just went blank and i've tried Ctrl+Alt+Backspace to terminate the x but nothing worked and after a minute it rebooted.
ok well after that i wanted to boot debian and suddenly after it didn't work even though i had never had problems with debian grub had a problem with booting it...
well well i had nothing important on debian and i had like tons of code and work on redhat so i decided to reinstall debian and this time use lilo instead of grub incase there was a problem with grub.
now debian works alright but i want to recover all my files on redhat, i tried booting with the redhat cd and used the rescue option and that gave me access to the partion but a lot of dirs were no listed and not the one dir i wanted to save containing all my code.
so i tried mounting the partion through debian but it wouldn't mount instead it told me to use some program called e2fsck(i can't remember the exact name)i don't know anything about this program.
can anyone please help me recover my files before i lose all faith in linux
 
Old 04-18-2003, 11:36 PM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, SolydK 2013
Posts: 7,434

Rep: Reputation: 134Reputation: 134
e2fsck

Every time you umount a disk partition, such as at shutdown, Linux puts a record at the beginning of the partition assuring the world that the file was cleanly unmounted. If you try to mount that partition and the clean dismount record is not there then Linux will refuse to mount the file system because it may be corrupt. The corruption could be anything from merely missing a clean umount record to a thoroughly scrambled file system.

If your ext2 file system is corrupt then you need to run fsck (which will call e2fsck if it is an ext2 file system). fsck must be run against an unmounted file system. Assuming that hdc2 is the corrupt partition then the command you want to issue is:

fsck /dev/hdc2

fsck will go through your entire partition four or five times and try to fix the file system. Since there is a lot of redundency in an ext2 file system fsck is usually quite successful. It may start asking you for permission to fix certain errors. I have found that the best answer is always "yes". If fsck finds file fragments that it does not know what they are it gives the fragment a number and places it in a directory called lost+found. So after you run fsck check lost+found for lost file fragments.
 
Old 04-19-2003, 01:11 PM   #3
nocturnal
Member
 
Registered: Apr 2003
Location: Sweden
Distribution: Slackware, LFS
Posts: 80

Original Poster
Rep: Reputation: 15
i did all this and after i could mount the partion alright, but i still can't find any of the dirs i created after installing redhat.
what can i do?
 
Old 04-19-2003, 04:31 PM   #4
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, SolydK 2013
Posts: 7,434

Rep: Reputation: 134Reputation: 134
There are only two places to look for the files. They are either in their proper place or they are in lost+found. Otherwise they do not exist.

There is a lost+found for every partition. The lost+found that you want to look at is on the partition that you ran fsck against.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
recovering files krunal Linux - General 2 06-17-2005 05:38 AM
Help Recovering Files? ArenaKen Linux - General 3 06-14-2005 08:42 AM
Help Recovering Files? ArenaKen Linux - Newbie 1 06-13-2005 08:28 PM
recovering deleted files hamish Linux - Newbie 2 10-04-2004 05:51 PM
recovering files sigeberht Linux - Software 1 06-30-2004 08:43 AM


All times are GMT -5. The time now is 02:11 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