LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 10-17-2006, 12:08 PM   #1
jimmyjiang
Member
 
Registered: Jun 2006
Posts: 132

Rep: Reputation: 15
delete dev direcory , how can recover?


hi,
I'm new to linux, I mistakly delect my dev directory, now I can't boot server after restart,it says: failed to start initializing console.
if anyway to recover it ?
thanks!
jimmy
 
Old 10-18-2006, 05:16 AM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Boot from the installation media into rescue mode, answer a few questions and use the chroot command as instructed on screen. Run; /sbin/MAKEDEV -D /dev -a
 
Old 10-18-2006, 09:22 AM   #3
jimmyjiang
Member
 
Registered: Jun 2006
Posts: 132

Original Poster
Rep: Reputation: 15
Warning:unable to open an initial console

hi,
thanks for your help! I followed your instuction ,and it did create dev files in /dev,but when I reboot server(linux redhat Enterprise ws 3), it give me a warning:unable to open an initial console, and hangup there, can you tell me why? I have 120mb space left at /.
jimmy
 
Old 10-18-2006, 11:17 AM   #4
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
The warning:unable to open an initial console message is usually means you have a problem with how your booting with the default kernel.

Could be a missing/bad initrd-XXXX.img file or the path where the file should be found. Could be a bad partition label, try using the exact path for the root partition (/) instead of the partition label see the top comments section of your /boot/grub/grub.conf file for help.

Could also be a bad kernel, did you just add or create one maybe???, try booting using an older kernel if available.

Try booting into single user mode also by adding a space followed by the number one (1) to the kernel line when the grub splash screen is displayed.

Boot into resuce mode once more, using the chroot command when ready check if you have multiple consoles (Ctrl+Alt+F2 to F6) and try if you have X and a GUI (Gnome, KDE or whatever) installed the command; startx

You may have to restore from backup or [re]install a kernel (even the same one you currently have installed). Since you can boot into rescue mode and have access to the filesystems, you might want to save everything that is important and reload.
 
Old 10-18-2006, 11:55 AM   #5
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
Quote:
Originally Posted by jimmyjiang
hi,
thanks for your help! I followed your instuction ,and it did create dev files in /dev,but when I reboot server(linux redhat Enterprise ws 3), it give me a warning:unable to open an initial console, and hangup there, can you tell me why? I have 120mb space left at /.
jimmy
You should boot up with a rescue CD, and “ls -l /dev”. If you don’t see console, see this post.

Also, make sure console (and friends) are writeable.

Last edited by osor; 10-18-2006 at 11:57 AM.
 
Old 10-18-2006, 02:38 PM   #6
jimmyjiang
Member
 
Registered: Jun 2006
Posts: 132

Original Poster
Rep: Reputation: 15
thanks! Guys! you are so helpful, I found copy /dev directory from other server will resolve this problem.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete /dev/console Hal Linux - Security 2 06-13-2006 04:05 PM
[Udev] Can I delete the content of /dev? lokee Linux - Software 6 02-04-2005 08:30 PM
udev likes to delete /dev/sda* but not create them :( edman007 Linux - Software 2 01-18-2005 05:02 PM
File/Direcory Names with Spaces ar1 Linux - General 3 01-15-2004 10:41 AM
size of my home direcory alaios Linux - General 5 06-09-2003 03:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

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