Corrupt /dev/null

If you find that /dev/null is no longer a block device, and it causes issues during init on Red Hat boxes, you will need to follow these steps to return things to normal:

  • Reboot the server
  • When grub appears, edit your kernel line to include init=/bin/bash at the end
  • Allow the server to boot into the emergency shell
  • Run the following three commands
# rm -rf /dev/null
# mknod /dev/null c 1 3
# chmod 666 /dev/null

You should be back to normal. Make sure that the root users on your server don't use cp or mv with /dev/null as this will cause some pretty ugly issues.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Printed from: http://rackerhacker.com/2007/06/18/corrupt-devnull/ .
© Major Hayden 2010.

1 Comment   »

RSS feed for comments on this post , TrackBack URI

Leave a Reply