Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

RH 7.3 reboot problem with /dev/null

Posted on 2004-04-21
5
254 Views
Last Modified: 2013-12-16
Hello,
I have a RedHat 7.3 kernel 2.4.20-13.7 system. everytime I reboot I end up in maintenace mode with /dev/null in read-only mode.

Here is how I fix it:
mount / -o remount,rw ; rm -fr /dev/null* ; cd /dev/ ; ./MAKEDEV null ; reboot
 but doing this everytime is impractical. Does anyone know of a workaround or kernel patch etc... that addresses this?

Thanks,
Q
0
Comment
Question by:qwyjibojones
  • 2
5 Comments
 
LVL 9

Accepted Solution

by:
Alf666 earned 125 total points
ID: 10878830
This will not be easy to find. There must be something (most probably a shell script) that has done something like :

rm /dev/null
whatever > /dev/null

or, much simpler :

cp whatever /dev/null

What you should do is check whether /dev/null is a file or is still a character device *before* rebooting.

If it's still a character device, then it's most probably f*** up by a boot script. Which will be easier to debug.

If it's already a file, then something during your using of your system is messing with it. It's going to be much harder to find.
But there's a slight chance that it's a shell script (or a proggie) you wrote yourself.

If it happens during boot, please tell me when (when does the message first appear).

Please, check this, and come back to me.
0
 

Author Comment

by:qwyjibojones
ID: 10899539
Hmmm...
Now that I need to re-create the problem, it seems to have stopped misbehaving.
I am using the system out of the box, and  haven't had a chance to do any scripting on it,( but it looks as though I am going to have to). I am guessing that some application is trying to use the bit bucket incorrectly, and is corrupting the file.

Are you saying that /dev/null starts out life as a character device and should get chaged once the system is up, to a file?

Do you think it wise to create a kill -or- start script that re-creates /dev/null?

Thanks,
Q


0
 
LVL 9

Expert Comment

by:Alf666
ID: 10901009
No. It should *always* be a character device.
But some script corrupts it. Most probably deletes it. Then, the next script that uses it creates the file.

Yes. It's wise. But it's a problem you'd better resolve. As a second thought, I'd say it's not wise. It's a patch. And if it bothers you, it will force you to fix it. That's wise ! :-)

0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
AWS - HAProxy- KeepAlived 5 51
Help on running oracle SQL script in linux 3 61
Coding C# in Linux 8 131
WordPress: Debugging from my Windows 10 Desktop 6 36
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

838 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question