LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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

Reply
 
Search this Thread
Old 11-25-2003, 05:09 AM   #16
Cerbere
Member
 
Registered: Dec 2002
Location: California
Distribution: Slackware & LFS
Posts: 799

Rep: Reputation: 33

My favorite rescue disk is Tom's Root/Boot. You can use it to boot up your 'broken' machine, then just mount the partition where you used to have /etc.

mount /dev/hdX# /mnt

Set up your 'good' machine to allow ftp logins, then copy the 'good' /etc directory to the ftp root folder. You can then use wget on your broken machine (it's included on Tom's rt/bt) to copy the /etc directory from your 'good' machine to your 'broken' machine. Hopefully the configuration of your 'good' machine is similar enough to get you up and running. You'll have to edit /etc/fstab and /etc/lilo.conf, probably some other files as well. You may also have to chmod to change some permissions. Then you can use chroot to change your root password and to run lilo. Run 'man chroot' in Tom's for more info.

Another option is to physically pull the hard drive from your 'broken' machine, install it in your 'good' machine, boot up, mount the /etc-less hard drive, and copy whatever data you need to the 'good' machine.

And, while you have the hard drive mounted in your 'good' computer, you could pretty easily just copy the /etc directory over.

Enjoy!
--- Cerbere
 
Old 11-25-2003, 07:36 AM   #17
cpeppler
LQ Newbie
 
Registered: Sep 2003
Location: S. Hamilton, MA USA
Distribution: RH 6.2, 8.0
Posts: 29

Original Poster
Rep: Reputation: 15
Can I do it with the RH 8.0 CD?

I've got the CD here, I've got it booted (linux rescue mode), with a command prompt.

However, when I issue the command
Code:
mount /dev/hdaX /mnt
(where X is either 1 or 3) it can no longer find /usr/bin, so I lose all my commands, and I have to reboot to get back to where I started.

How do I mount one of the drives so I can look at it, and write to it, without losing my path back to the code on the original CD?

TIA,

Charlie Peppler

Last edited by cpeppler; 11-25-2003 at 07:37 AM.
 
Old 11-25-2003, 10:13 AM   #18
cpeppler
LQ Newbie
 
Registered: Sep 2003
Location: S. Hamilton, MA USA
Distribution: RH 6.2, 8.0
Posts: 29

Original Poster
Rep: Reputation: 15
We can rebuild him...

OK, making progress now, still need help.

I've been able to mount the drive, now on /mnt/tmp, and I've been able to create the etc directory, and I can write to it.

Now, what do I put in it? What are the critical files?

I know passwd is key, perhaps I start with figuring out how to build that....any other next steps are welcome....

At least cheer for me!


Charlie (still studying and trying to fix the problem)
 
Old 11-25-2003, 11:40 AM   #19
UnTamed
Member
 
Registered: Dec 2002
Location: Qc, Canada
Distribution: CRUX
Posts: 317

Rep: Reputation: 30
>any other next steps are welcome....

... reinstall the initscripts pkg from the distro's install CD, that would take care of the most vital part ...iianm.
 
Old 11-25-2003, 01:31 PM   #20
cpeppler
LQ Newbie
 
Registered: Sep 2003
Location: S. Hamilton, MA USA
Distribution: RH 6.2, 8.0
Posts: 29

Original Poster
Rep: Reputation: 15
OK, continuing to make progress..

After much hand writing of files, I now have the machine booting, and getting me to a login prompt.

I have a plain vanilla passwd file, with one line:

root::0:0:root:/:/bin/bash

When I type in "root" at the login prompt, and press return, it just gives me the login prompt again.

I'm so close! I just need to get the files off of this box, and want to get the networking going, so I can FTP stuff off of it.

Charlie
 
Old 11-25-2003, 02:43 PM   #21
UnTamed
Member
 
Registered: Dec 2002
Location: Qc, Canada
Distribution: CRUX
Posts: 317

Rep: Reputation: 30
>root::0:0:root:/:/bin/bash

I think the first dir in that line is the user's $HOME, so it should read,
root::0:0:root:/root:/bin/bash
 
Old 11-25-2003, 03:41 PM   #22
cpeppler
LQ Newbie
 
Registered: Sep 2003
Location: S. Hamilton, MA USA
Distribution: RH 6.2, 8.0
Posts: 29

Original Poster
Rep: Reputation: 15
Thanks, tried it, didn't help, how about setting up networking from rescue disk?

Thanks, UnTamed,

I tried what you recommended, with no effect.

I do have /etc/securetty setup. I've converted over to shadow passwd with the
Code:
pwconv
command, which created the /etc/shadow file, with no effect.

I had to manually go out and find which of the partitions went into which locations in the file system (/var, /usr, /), peeking, and poking as I went, finally getting fstab rebuilt.

I manually rebuilt inittab (following a model from another RH 6.2 Linux box).

I manually rebuilt what looked like critical parts of /etc/rc.d/rc.sysinit
I stopped short of manually recreating all of /etc/rc.d/

Man, this is getting depressing. I've been working at it all day.

I have access to all of the disk now, it's just getting the darned configuration files setup properly. I know more now about the Linux startup procedure than I ever wanted to know!


Would it be possible to setup networking using the rescue disk?
 
Old 12-01-2003, 05:22 PM   #23
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,533

Rep: Reputation: 148Reputation: 148
Quote:
Would it be possible to setup networking using the rescue disk?
If it's not very compilated, yes. Especially if you know the right ifconfig and route commands. Insted of nice configuration files you can just write one script with all the command you need to run .
 
Old 12-01-2003, 06:41 PM   #24
cpeppler
LQ Newbie
 
Registered: Sep 2003
Location: S. Hamilton, MA USA
Distribution: RH 6.2, 8.0
Posts: 29

Original Poster
Rep: Reputation: 15
Thanks Mara

Just an update. I finally got /etc patched up enough to get the data off of it, and reinstalled RH linux. Now I have a problem with an intel 845 graphics chipset, with X crashing. Good grief.

Charlie
 
Old 03-14-2004, 05:53 PM   #25
mickboda
Member
 
Registered: Jul 2002
Location: Sydney
Distribution: Kubuntu Edgy
Posts: 74

Rep: Reputation: 15
Hi,

Just a thought.
Can you remove the hard drive from the "wounded machine" set it up in another linux machine as a slave drive. Boot the "host machine as per normal and mount the "wounded" drive (/mnt/linux_hospital?) then using the root of the healthy machine, copy it's /etc dir over and edit anything else you need to do?

regards

Mick
 
Old 03-14-2004, 06:54 PM   #26
Cerbere
Member
 
Registered: Dec 2002
Location: California
Distribution: Slackware & LFS
Posts: 799

Rep: Reputation: 33
Hey Mick,

This thread is over three months old, so I think Charlie's OK.

And BTW, that solution is what I suggested in post #16 of this thread, so my opinion would be, "Yes, you can!"

Enjoy!
--- Cerbere
 
Old 03-15-2004, 08:35 AM   #27
cpeppler
LQ Newbie
 
Registered: Sep 2003
Location: S. Hamilton, MA USA
Distribution: RH 6.2, 8.0
Posts: 29

Original Poster
Rep: Reputation: 15
Hi folks,

I'm sitting here with the (mostly) working machine next to me. It was about a two day process, with the wounded machine next to a healthy one, using the rescue disk to boot the wounded one, and then copying files onto it (using the floppy disk) from the healthy one, until I got networking going well enough to copy the critical application and data files off of it. Then I wiped the machine and rebuilt it, and put stuff back onto it.

My only frustration was the fact that the graphics chip (I forget the model) was not supported by the most recent version of x86 (shipped with RHEL-3), so I still haven't been able to get X running on it, and it's not worth the pain to go scrambling for, since I use it entirely for Apache/fileserving/MySQL stuff.

Moral of the story? Drop a safe on your toe, but don't nuke /etc. It's way more painful ;-)

Charlie
 
Old 03-16-2004, 12:13 PM   #28
Onemessedupjedi
Member
 
Registered: Sep 2003
Location: Oregon
Distribution: Slackware 9.1
Posts: 194

Rep: Reputation: 30
I've accidently deleted a whole hard drive(80 gig) of pirated media(and a few legit files). moral of my story, don't mount things in / and then accidently unzip something in there and delete all the non system folders.....
 
Old 03-18-2004, 09:27 AM   #29
aacovergaauw
LQ Newbie
 
Registered: Mar 2004
Posts: 8

Rep: Reputation: 0
Maybe it is good to know that there are undelete tools for ext2 and maybe for others filesystems too. I myself have not used any of these tools so i can't recommend any.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nuked HDD - Can I get the files back? Nige Linux - General 2 09-11-2005 10:43 PM
Debian NUKED my Slackware partition UltimaGuy Debian 8 12-05-2004 12:59 PM
Upgrading to 2.6.6 seems to have nuked my machine HawkeyeCoug Mandriva 4 05-18-2004 01:46 PM
Accidentally nuked anything libgd* - where to begin the restoration? mrodrigo Linux - General 2 09-15-2003 12:30 PM
Ran netconfig and nuked my dial-up fatboysmith Linux - Networking 3 05-16-2003 03:23 PM


All times are GMT -5. The time now is 02:26 AM.

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