Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm running Fedora 17 and /dev/null does not exist, why not?

Should I just create it with:

mknod -m 666 /dev/null c 1 3
share|improve this question
add comment

1 Answer 1

There's no harm in creating it if it isn't there already.

The real question is why it isn't there. What do you get when you say df -h /dev? How about ps -eaf | grep udevd?

share|improve this answer
    
I don't know what happened but after running mount the /dev directory looked as expected with all the devices appearing, I'm not sure why /dev was only showing a few things before? –  iiSeymour Jan 2 '13 at 14:23
    
I wouldn't just leave it at that. The problem is likely to come back on the next reboot, since /dev is now completely dynamic. mknod hackery is no longer persistent, as it once was on Unices. I would reboot the system in single-user mode and pay careful attention to the messages dealing with /dev/ or udev you get on startup. Then when it's up, ls -l /dev again. If /dev/null and others are still missing, run the commands I recommended, adding their output to your question. –  Warren Young Jan 2 '13 at 14:49
    
Thanks Warren, I will follow your advice and update the question as appropriate. –  iiSeymour Jan 2 '13 at 14:51
    
you could run in all sorts of trouble at boot if you lack /dev/null ... prepare a bootable distribution on CD to help you sort it out... (you will then probably need to mount the relevant partitions to some /tmp/directory(s), and ensure once you chroot into the main one you'll be able to access the commands you'll need to fix everything up) –  Olivier Dulac Jan 2 '13 at 18:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.