Skip to contentSkip to conversation

Recovery help (Maybe OT)

DISCUSSION szonyi calin 3 participants 6 messages Jun 27, 2002 – Jun 28, 2002

lore
Share & tools
lore
#0 lore raw

Hi
I'm new to the list.
If this is OT please tell me and i won't bother
you again.

I'm not a newbie but I need help.
I managed to do a rm -rf /
It erased my /bin /boot /dev
and something from /mnt

I recovered from backup but can't
boot.

I boot the default kernel, it boots fine. ... boot messages here
Mounting root ext2 fs read-only
Freeing unused kernel memory
Mounted devices in /dev
Init version 2.83 booting
INIT: cannot execute /etc/rc.d/rc.S
INIT: cannot execute /etc/rc.d/rc.M
INIT: cannot execute /sbin/agetty
INIT: respawning too fast, disabled for five minutes

Those files _are_ there and _are_ executable.
(I verified by booting from the slackware 8.0
install-cd and mounting the partitioin and ls -l)

If I try to boot with init=/bin/sh

No init found -- kerne panic :-)

From my experience this seems to be a /dev/ problem

Any ideas what should i do ?

Thanls
Calin

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#1 lore raw
Quoted 9 lines · On Thu, 27 Jun 2002 09:06:31 +0200 (CEST) szonyi calin <[email protected]>…

Hi
I'm new to the list.
If this is OT please tell me and i won't bother you again.

I'm not a newbie but I need help. I managed to do a rm -rf / It erased my /bin /boot /dev and something from /mnt

Hi Calin,

Oh dear, oh dear, oh dear. What possessed you to execute that command? Don't worry, I'm not here to mock you- when I fiurst started with Linux, the first ever command I executed on my test-install was that; just to see how dangerous it really was. Because it was my test-install it didn't matter- no important data loss.

You mention in your email that you have backups, so rather than mess around trying to recover the disk, simply wipe it clean, install Slackware again and then when you have your system up and running import/copy over the files that you require from your backup. In most cases that should be a handful of files from the /etc directory that you *may* have edited, and your /home directory.

Good Luck, and don't go executing naughty commands like that again! :-)

G

--
Gavin Laking

12:25pm up 1 day, 18:58, 5 users, load average: 0.17, 0.22, 0.10

http://www.gavinlaking.co.uk/
--
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#2 lore raw
In reply to szonyi calin

Your description is a bit sketchy, but I wonder if the problem is that your (partial, I assume interrupted) "rm -rf /" debacle caused /bin/sh to be deleted. Since rc.S and rc.M are (almost surely) shell scripts (the first line of each is all but certainly "#!/bin/sh"), they need the /bin/sh interpreter to execute . Since it is apparently missing, based on your reported "init=/bin/sh" failure, init is correct in telling you that these init scripts "cannot execute".

The fix is to reinstall bash and symlink it to /bin/sh .

That said, the suggestion someone else made, that you do a complete reinstall, is probably the better way to go. There are probably other "gotchas" waiting to be found on your partly-deleted system. Were I to have the problem, I'd do this sort of patching only to get the system to the point where I could get any unique, local content off it to another server.

BTW, this is hardly off topic. In fact, it seems a prime candidate for a beginner's list, since it is very much a rookie error.

Quoted 28 lines · szonyi calin

Hi
I'm new to the list.
If this is OT please tell me and i won't bother
you again.

I'm not a newbie but I need help.
I managed to do a rm -rf /
It erased my /bin /boot /dev
and something from /mnt

I recovered from backup but can't
boot.

I boot the default kernel, it boots fine. ... boot messages here
Mounting root ext2 fs read-only
Freeing unused kernel memory
Mounted devices in /dev
Init version 2.83 booting
INIT: cannot execute /etc/rc.d/rc.S
INIT: cannot execute /etc/rc.d/rc.M
INIT: cannot execute /sbin/agetty
INIT: respawning too fast, disabled for five minutes

Those files _are_ there and _are_ executable.
(I verified by booting from the slackware 8.0
install-cd and mounting the partitioin and ls -l)

Quoted 5 lines

If I try to boot with init=/bin/sh

No init found -- kerne panic :-)

From my experience this seems to be a /dev/ problem

--
-----------------------------------------------"Never tell me the odds!"--------------
Ray Olszewski -- Han Solo
Palo Alto, California, USA [email protected]
-------------------------------------------------------------------------------------------

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#3 lore raw

Hi

Thanks to all for the replies.
The system is up and running again.

It seems that i forgot to restore /lib :-)
That's why init was running and bash didn't.

Thanks again.

Bye
Calin

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#4 lore raw
Quoted 7 lines · On Fri, 28 Jun 2002 11:14:22 +0200 (CEST) szonyi calin <[email protected]>…

Hi

Thanks to all for the replies.
The system is up and running again.

It seems that i forgot to restore /lib :-)
That's why init was running and bash didn't.

A nice, happy, ending. However, And I'm not one to push the point to far, but I'm worried about your system's stability. In theory, by replacing everything your system should work just fine, or appear to be working just fine. But how much of your security have you compromised and how many file permission problems are there waiting to be unearthed when you least need them? It might appear to be working just fine now, but how long will it take before something nasty creeps up that you haven't anticipated?

I'm not here to scare you into reinstalling everything, but I suggest that you make a backup now whilst you are up and running and give your system the once over just to be sure. I would hate for you to come back in a few days time and tell us that you lost precious data because something wasn't quite right with your replaced setup. :-(

Hope I'm not being a prophet of doom or anything...

G

--
Gavin Laking

10:22am up 2 days, 16:55, 4 users, load average: 0.26, 0.27, 0.32

http://www.gavinlaking.co.uk/
--
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#5 lore raw

--- Gavin Laking <[email protected]> a écrit : >
On Fri, 28 Jun 2002 11:14:22 +0200 (CEST)

Quoted 10 lines
Quoted 7 lines · szonyi calin

Hi

Thanks to all for the replies.
The system is up and running again.

It seems that i forgot to restore /lib :-)
That's why init was running and bash didn't.

Quoted 12 lines

A nice, happy, ending. However, And I'm not one to push the point to far, but I'm worried about your system's stability. In theory, by replacing everything your system should work just fine, or appear to be working just fine. But how much of your security have you compromised and how many file permission problems are there waiting to be unearthed when you least need them? It might appear to be working just fine now, but how long will it take before something nasty creeps up that you haven't anticipated?

This computer is not connected to the network,
and I'm the only user so there are not security
issues.

Quoted 8 lines

I'm not here to scare you into reinstalling everything, but I suggest that you make a backup now whilst you are up and running and give your system the once over just to be sure. I would hate for you to come back in a few days time and tell us that you lost precious data because something wasn't quite right with your replaced setup. :-(

I just verified my system and is running fine.
I usually know what i'm doing :-)
I used to log in as root because i was the only
user but now i learned the lesson :-)

Quoted 11 lines

Hope I'm not being a prophet of doom or anything...

G

--
Gavin Laking

10:22am up 2 days, 16:55, 4 users, load average:
0.26, 0.27, 0.32

http://www.gavinlaking.co.uk/

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs