Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

recreate /dev/null

107 views
Skip to first unread message

porschberg

unread,
Oct 21, 2002, 1:52:54 PM10/21/02
to
For some reason /dev/null is now not longer
a "character special" device on my linux box, but
a ordinary file.
I tried to remove it and to recreate with
"mknod /dev/null c 1 3" but it failed
because by calling "rm /dev/null" I
get the error message:
"Cannot remove /dev/null : Read-only file system"
My root partition is mounted read/write.
What can I do now ?
I do also not understand why I'm unable to
remove the file.

ScriptOmatic

unread,
Oct 21, 2002, 2:01:02 PM10/21/02
to

Try rebooting and comming up in single user mode, then
run the mknod
I have the same major/minor on my Linux machine
How did you know the major/minor numbers for /dev/null?
Please let me know, thanks!

--
http://ftp.opensysmon.com is a shell script archive site with an
opensource system monitoring and network monitoring software package.
Many platforms are supplied already compiled.

Andy Shevchenko

unread,
Oct 22, 2002, 9:56:54 AM10/22/02
to
porschberg wrote:
> For some reason /dev/null is now not longer
> a "character special" device on my linux box, but
> a ordinary file.

Why do you not try the fsck (file system checker utility)?

> I tried to remove it and to recreate with
> "mknod /dev/null c 1 3" but it failed
> because by calling "rm /dev/null" I
> get the error message:
> "Cannot remove /dev/null : Read-only file system"
> My root partition is mounted read/write.
> What can I do now ?

Are you using the Linux OS?
In some Linuxes /dev is special FS called as devfs.

Can you tell what is the mount command issue?
Just start mount without any parameters

> I do also not understand why I'm unable to
> remove the file.

--
With Best Regards,
Andy Shevchenko mailto:an...@smile.org.ua

Bill Marcum

unread,
Oct 23, 2002, 2:25:31 AM10/23/02
to
On 21 Oct 2002 10:52:54 -0700,

It's possible your hard drive may be damaged. Try
mount -n /dev/(whatever) / -o remount,rw
If that doesn't work, reboot.
Also, the usual way to recreate a /dev file is MAKEDEV.

those who know me have no need of my name

unread,
Oct 24, 2002, 3:01:07 PM10/24/02
to
in comp.unix.misc i read:
>porschberg wrote:

>> a "character special" device on my linux box, but

>> "mknod /dev/null c 1 3" but it failed

>I have the same major/minor on my Linux machine


>How did you know the major/minor numbers for /dev/null?

they are usually the same on all systems of the same type, in this case
`linux'.

--
bringing you boring signatures for 17 years

J. S. Jensen

unread,
Oct 30, 2002, 9:46:36 AM10/30/02
to
>>I have the same major/minor on my Linux machine
>>How did you know the major/minor numbers for /dev/null?

And thus the `devfs' filesystem whereby devices may be accessed by name
rather than by minor/major mappings. These are specific generally
to the OS, sorry.

--
J. S. Jensen, Cu.H.
http://www.xepoch.com

0 new messages