Solved

RH 7.3 reboot problem with /dev/null

Posted on 2004-04-21
5
249 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Linux VM 6 90
LINUX backups with VEEAM 8 83
VMware Tools Install On Linux Problem 3 62
Quickest way to query Windows Event ID from a Linux Device 3 34
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
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 get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

809 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