LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 12-14-2002, 04:22 PM   #1
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Recovering precious files from a crashed system


Ok, so I am an idiot. I haven't backed up a file in quite a while, and need my a$$ kicked for that, but that's after I get through this.

This is gonna be a 2 part question, one for backup recovery, the other for advice on setting up 2 boxes to talk to each other well;

Part 1
I had a power outage earlier today right while I was answering questions here. I was booted into my main Slack distro, and bam, it just rebooted me. It was a minor glitch, but enough to make me unable to boot back up. I do have ext3 on all my linux partitions, but I guess it didn't save me this time. Anyway, so after the reboot, I tried to go back into Slack, but it gave me the "kernel panic, try passing init= to the kernel" or something along those lines. So I figured why not boot in with a rescue disc (Knoppix) and run fsck on the drive to fix it. Well that started the problem.

It completely dorked the drive, and now every directory and file that existed before is replaced with a #12345667 type name. The directories are also in that style format, and all are in a lost+found directory. Anyway, it's not the end of the world as I was getting ready to start a new setup anyway, and that was the only partition that seemed to get jacked by the reboot. But here's where I get to my point...

I had some "custom" config files, mostly in /etc that I would like to recover if at all possible. But, I am really not wanting to search the (literally) hundreds of directories and/or renamed files to see which one is (for example) my /etc/profile file. Is there a way to specify contents of text files in a search?

Part 2
I have 2 boxes. (I mentioned this a bit in another thread, and have gotten some ideas, and now am just trying to get some more, and maybe some more in depth help). I want these 2 boxes to be able to communicate well with each other, and I am pretty damn sure Samba is the way I want to do that. Now, here's my question: I will be setting up these things on the second box (which will pretty much solely be used for the following):
A mail server
An http server
An FTP server
And of course SAMBA
So, what I want is for the second box (which will basically be the server box) to be able to "serve up" files from the first box, via ftp and ssh. So here's an example:
I have a file on box 1 that I want to have available via anonymous ftp (which will be setup on box 2). How would I make this file available? So, I guess the question is how do I make a file available outside a chrooted env?

And any ideas on how to make things easier for me, or some better uses/setup of the 2nd box would be great, and much appreciated. Oh, btw, Box 1 will be my main box, the one I'll surf on, manipulate pics/video with and so on, just a basic Workstation/Desktop box.

Cool
 
Old 12-14-2002, 07:48 PM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Original Poster
Rep: Reputation: 69
Alright, so I wiped out the first problem (I nuked the system and installed Mandy over the top) but I would still like suggestions on the second

BTW, I am building a new "box" to house my server, I will post links to pics when I am finished

Cool
 
Old 12-15-2002, 12:33 PM   #3
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Original Poster
Rep: Reputation: 69
Ok, well then I will just start doing it, and if I run into problems post back with a real question.

Cool
 
Old 12-15-2002, 02:22 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,730

Rep: Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920
For networking two linux boxes I would use nfs instead of samba.
 
Old 12-15-2002, 02:30 PM   #5
NSKL
Senior Member
 
Registered: Jan 2002
Location: Rome, Italy ; Novi Sad, Srbija; Brisbane, Australia
Distribution: Ubuntu / ITOS2008
Posts: 1,207

Rep: Reputation: 47
I setup a NFS, it was easy but i had problems serving files. I could copy files to and from the NFS drive no problem, but when i tried playing xmms (.mp3's) from a NFS drive xmms would freeze every now and then, and in the logs i will find out that something like a conection time out occured, i could fix this by taking down eth0 interfaces on both boxes, and then putting them back up. If it wasn't for that problem (playing music from NFS) i would have kept it because it worked great.
AS for the first problem, Did you ever try to use ReiserFS? I never liked ext2/3 and Reiser saved me so many times sine at my house power outages are common (well now i got a UPS, but the fact that Reiser saved me many times still stands). If you particularly dont like Reiser the way i dont like ext2/3 you might want to try some other journaling fylesystems.
HTH
-NSKL
 
Old 12-15-2002, 04:48 PM   #6
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Original Poster
Rep: Reputation: 69
Sure, I am willing to give it a try, can I switch over now though? Sort of like tune2fs -j for switching for ext2 to ext3 without worrying about backup? So maybe a tunereiserfs or something?

Thanks

Oh and being as creative as possible on building the server's box, it might be a good week before I dive into networking the 2 boxes, but I will definitely have questions once I get there Thanks for the suggestions so far.

Cool
 
Old 12-15-2002, 05:34 PM   #7
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
I don't think you will be able to change filesystems without loosing data, the best thing to do would be to backup the system and then restore

As far as sharing files from another machine on an ftp server just mount the shares in a folder in ftp/pub/somefolder
 
Old 12-16-2002, 03:21 AM   #8
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
Well even though you got past the first part. For future reference here is how you could have searched for specific contents in a file:

find "lost+found" -follow | xargs grep "search string"

The find command can easily be modified to search for only specific files by adding something like:
-name "*.txt"
The -follow is only needed if you have a bunch of symlinks which you would want it to follow in it's search.
 
  


Reply



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
Help Recovering Files? ArenaKen Linux - General 3 06-14-2005 08:42 AM
System crashed... d_kote23 Linux - Newbie 2 05-12-2004 10:04 AM
need help recovering files on an ext2 file system rmanocha Linux - Software 2 11-06-2003 10:37 AM
recovering files nocturnal Linux - General 3 04-19-2003 04:31 PM
recovering a redhat 6.2 system???? eddiek Linux - Software 2 10-05-2001 12:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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