LinuxQuestions.org Forums - where Linux users come for help

LinuxQuestions.org > Forums > Linux - General > /dev/null not writable
Go to first unread post first unread  Last Thread   Next Thread
Author
Thread    Post A Reply
jalsk
Newbie

Registered: Nov 2003
Location: Eagle, Idaho
Distribution: Fedora Core 1, SuSE Server 9.0
Posts: 23
HCL Entries: 0
Reviews: 0

/dev/null not writable ( post #1)

I am having problems getting my server to boot up because as soon as I start to mount filesystems, it says that it is having problems because it can't write to /dev/null. I'm not sure why exactly this would be necessary, but oh well. It doesn't work. i can't even get my system to get to a workable point. It freezes in boot when it fails to mount all of the filesystems and then puts me into shell so that I can fix the problem. The thing that mystifies me is that it is still able to read the filesystem because I can see everything on the hard drive when i get into shell. Any suggestions on how to fix this? I'm completely stumped. This is the first time that I have ever had anything like this happen to me. Thanks for any help that anyone can provide.

I'm running Fedora Core 1 with a few updates
Athlon 1.4GHz
512 MB Ram
40 GB hard drive (100 mb /boot, 1 gb swap, the rest for /)
60 gb hard drive (/home)
dual NICs
ATI graphics card (although I feel that this information might be irrelevant)

Thanks

-Jalsk


Report this post to a moderator | IP: Logged

jalsk is offline Old Post 05-06-2004 07:57 PM
Click Here to See the Profile for jalsk Click here to Send jalsk a Private Message Click Here to Email jalsk Visit jalsk's homepage! Find more posts by jalsk Add jalsk to your buddy list 81258 - no Affero username Edit/Delete Message Reply w/Quote
TheOther1
Member

Registered: Feb 2003
Location: Atlanta, GA
Distribution: RH 7.2/7.3/9, RHAS 2.1, RHEL3
Posts: 320
HCL Entries: 0
Reviews: 0

( post #2)

Try this from your shell:

code:
mknod -m 666 /dev/null c 1 3 
chown root.mem /dev/null


This is from the man page

__________________
Registered User #319990
If I helped you, please rate my post by clicking here


Report this post to a moderator | IP: Logged

TheOther1 is offline Old Post 05-06-2004 09:12 PM
Click Here to See the Profile for TheOther1 Click here to Send TheOther1 a Private Message Click Here to Email TheOther1 Visit TheOther1's homepage! Find more posts by TheOther1 Add TheOther1 to your buddy list Rate theother1 Edit/Delete Message Reply w/Quote
fransemail
Member

Registered: Mar 2004
Location:
Distribution:
Posts: 61
HCL Entries: 0
Reviews: 0

try this ( post #3)

as root exec 'chmod 666 /dev/null' and try again


Report this post to a moderator | IP: Logged

fransemail is offline Old Post 05-06-2004 09:14 PM
Click Here to See the Profile for fransemail Click here to Send fransemail a Private Message Click Here to Email fransemail Find more posts by fransemail Add fransemail to your buddy list 101259 - no Affero username Edit/Delete Message Reply w/Quote
jalsk
Newbie

Registered: Nov 2003
Location: Eagle, Idaho
Distribution: Fedora Core 1, SuSE Server 9.0
Posts: 23
HCL Entries: 0
Reviews: 0

( post #4)

That didn't work. Here is exactly what I'm getting:

/etc/rc.d/rc.sysinit: line 88: /dev/null: Read-only file system
/etc/rc.d/rc.sysinit: line 91: /dev/null: Read-only file system
Configuring Kernel Parameters: Dup2: Bad File Descriptor
[ FAILED ]
Setting clock (localtime): Mon May 10 07:33:20 MDT 2004 dup2 bad file descriptor
[ FAILED ]
Loading Default keymap (us): /etc/rc.d/rc.sysinit: line 159: /dev/null: Read-only file system
[ FAILED ]
Setting hostname mercury: dup2: Bad file descriptor
[ FAILED ]
/etc/rc.d/rc.sysinit: line 183: /dev/null: Read-only file system
Initializing USB controller (usb-uhci): dup2: Bad file descriptor
[ FAILED ]
/etc/rc.d/rc.sysinit: line 194: /dev/null: Read-only file system
Checking root file-system
dup2: Bad file descriptor
[ FAILED ]

*** An error occured during the file system check.
*** Dropping you to a shell: the system will reboot
*** when you leave the shell.
Give root password for maintenance
(or type Control-D to continue):


Report this post to a moderator | IP: Logged

jalsk is offline Old Post 05-10-2004 01:51 PM
Click Here to See the Profile for jalsk Click here to Send jalsk a Private Message Click Here to Email jalsk Visit jalsk's homepage! Find more posts by jalsk Add jalsk to your buddy list 81258 - no Affero username Edit/Delete Message Reply w/Quote
fransemail
Member

Registered: Mar 2004
Location:
Distribution:
Posts: 61
HCL Entries: 0
Reviews: 0

more information ( post #5)

please post output of:

ls -la /dev/null


Report this post to a moderator | IP: Logged

fransemail is offline Old Post 05-10-2004 08:21 PM
Click Here to See the Profile for fransemail Click here to Send fransemail a Private Message Click Here to Email fransemail Find more posts by fransemail Add fransemail to your buddy list 101259 - no Affero username Edit/Delete Message Reply w/Quote
dynamik
Newbie

Registered: Nov 2003
Location: Wellington, New Zealand
Distribution: RH9 Kernel 2.4
Posts: 4
HCL Entries: 0
Reviews: 0

( post #6)

try the following:

mount -o remount, rw /
rm /dev/null
mknod -m 666 /dev/null c 1 3


Report this post to a moderator | IP: Logged

dynamik is offline Old Post 05-19-2004 09:41 AM
Click Here to See the Profile for dynamik Click here to Send dynamik a Private Message Find more posts by dynamik Add dynamik to your buddy list 85648 - no Affero username Edit/Delete Message Reply w/Quote
drjekyll
Newbie

Registered: May 2004
Location: Uruguay
Distribution: Linux Red Hat 9.0
Posts: 5
HCL Entries: 0
Reviews: 0

Thumbs up I fixed that same problem in RH9 ( post #7)

Last note help me to fix this problem. I don't know how It happend, but I was "playing" with users accounts in /etc/passwd and changed UID.
:newbie:
Thanks for help me :D


Report this post to a moderator | IP: Logged

drjekyll is offline Old Post 05-25-2004 12:12 PM
Click Here to See the Profile for drjekyll Click here to Send drjekyll a Private Message Click Here to Email drjekyll Find more posts by drjekyll Add drjekyll to your buddy list 119091 - no Affero username Edit/Delete Message Reply w/Quote
JRago
Newbie

Registered: Feb 2003
Location: Detroit, MI USA
Distribution: RedHat 8.0
Posts: 14
HCL Entries: 0
Reviews: 0

THANKS!!!! You saved my job. ( post #8)

That last reply fixed the same problem for me.

My boss was ready to toss me AND the Linux server out.

__________________
jnr


Report this post to a moderator | IP: Logged

JRago is offline Old Post 06-25-2004 04:27 PM
Click Here to See the Profile for JRago Click here to Send JRago a Private Message Click Here to Email JRago Visit JRago's homepage! Find more posts by JRago Add JRago to your buddy list 25306 - no Affero username Edit/Delete Message Reply w/Quote
heals1ic
Newbie

Registered: Jul 2004
Location:
Distribution:
Posts: 2
HCL Entries: 0
Reviews: 0

( post #9)

quote:
try the following:

mount -o remount, rw /
rm /dev/null
mknod -m 666 /dev/null c 1 3




Have the same problem as above.

tried your suggestion but OS tells me "rm cannot remove directory '/dev/null': Is a directory"

tried "chmod 666 /dev/null" and it says 'read-only file system'.

Any more suggestions?

The funny thing about the situation I am in is that I was only editting the samba.conf file and setting up the OS to be a domain controller. In doing this I was following directions to setup a computer account with home directory of /dev/null.

I then tried to restart smb and it failed. I then restarted and it has been rooted since???????


Report this post to a moderator | IP: Logged

heals1ic is offline New Post 07-17-2004 03:07 AM
Click Here to See the Profile for heals1ic Click here to Send heals1ic a Private Message Click Here to Email heals1ic Find more posts by heals1ic Add heals1ic to your buddy list 128706 - no Affero username Edit/Delete Message Reply w/Quote
btmiller
Member

Registered: May 2004
Location:
Distribution: Slackware 9.1, Red Hat 9, NetBSD
Posts: 369
HCL Entries: 0
Reviews: 0

( post #10)

No user should have /dev/null as a home directory because /dev/null is never a directory, it is a device file. When you made the account, you probably removed /dev/null and recreated it as a directory. You need to rmdir /dev/null and recreate it using the directions given upthread. Any directions telling you to make a user with a home directory of /dev/null are flawed. Use /fake or some other nonexistent directory for a user that is not allowed to log in and will own no files.


Report this post to a moderator | IP: Logged

btmiller is offline New Post 07-17-2004 03:49 AM
Click Here to See the Profile for btmiller Click here to Send btmiller a Private Message Click Here to Email btmiller Visit btmiller's homepage! Find more posts by btmiller Add btmiller to your buddy list 114616 - no Affero username Edit/Delete Message Reply w/Quote
heals1ic
Newbie

Registered: Jul 2004
Location:
Distribution:
Posts: 2
HCL Entries: 0
Reviews: 0

( post #11)

cannot delete directory as it says it is not empty.

try ls /dev/null and it returns nothing (indicating that there is no contents in the directory)

How do I deal with these conflicting reports?


Report this post to a moderator | IP: Logged

heals1ic is offline New Post 07-17-2004 03:58 AM
Click Here to See the Profile for heals1ic Click here to Send heals1ic a Private Message Click Here to Email heals1ic Find more posts by heals1ic Add heals1ic to your buddy list 128706 - no Affero username Edit/Delete Message Reply w/Quote
frob23
Member

Registered: Jan 2004
Location: Roughly 29.467 / -81.206
Distribution: FreeBSD, NetBSD (the ones I do work on)
Posts: 305
HCL Entries: 1
Reviews: 3

( post #12)

cd /dev
rm -rvf null/

And for god's sakes... be careful with that command. More sysadmins have killed their systems with than than {cr,h}ackers ever will.


The reason it says the directory isn't empty is because it probably has some hidden files.


Now... follow the mknod and chmod commands listed above... then reboot.

EDIT: While it is not wise to have a usr directory of /dev/null it can be done. As long as that directory stays as a device. Any files saved will be thrown away and any attempts to read files will find none. But it is wiser to create a folder like, /tmp/emptydir and make that the home directory.

Last edited by frob23 on 07-17-2004 at 11:11 AM

Report this post to a moderator | IP: Logged

frob23 is online now New Post 07-17-2004 11:08 AM
Click Here to See the Profile for frob23 Click here to Send frob23 a Private Message Click Here to Email frob23 Find more posts by frob23 Add frob23 to your buddy list Rate frob23 HCL Entries Reviews Entries Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 05:24 AM.    Post A Reply
Last Thread   Next Thread
View New Posts
LinuxQuestions.org > Forums > Linux - General > /dev/null not writable

Forum Sponsor: ASL, Inc.
Leaders in Linux since 1995, our philosophy is to redefine Linux performance by providing leading-edge technology and extensive system customization at competitive prices.
ASL, Inc.
 
Similar Threads
Thread Thread Starter Forum Replies Last Post
where is /dev/mixer? shtik Slackware 2
missing devices in /dev/snd superandrzej Slackware 1
device /dev/dsp can't be opened Benedictus Linux - Hardware 9
the purpose of /dev/shm blackcrow Linux - General 1
Need help: fstab, /dev, and /mount are all HIGGLEDY-PIGGLEDY! tigerflag Slackware 7
/dev/fd0 gone! I can't mount floppy! robbow52 Debian 7

Show Printable Version | Email this Page | Subscribe to This Thread

Forum Jump:
Rate This Thread:
Search this Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
Please do not post your thread in more than one forum.
 
  Main Menu
· Linux Forums
· Search
· Linux HCL
· Linux Tutorials
· Linux Wiki
· Distro Reviews
· Book Reviews
· Download Linux
· Press Releases
· Login
· Home
  My LQ
· Login
· Register
  Main Menu
· LQ Calendar
· Site FAQ
· Linux Links
· View New Posts
· 0 Reply Threads
· LQ Wiki Most Wanted
· Jeremy's Blog

  RSS1   Atom


< LinuxQuestions Merchandise - Linux Man Pages>
< Contact Us - Rules - LinuxQuestions.org - Free Email >
< Linux Wiki - Donations - Advertising - LQ Teams - Contributing Member >

Based on: vBulletin (© Jelsoft Enterprises)
Copyright ©2000 - 2004, LinuxQuestions.org.