View previous topic :: View next topic |
Author |
Message |
eje211 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/180102691242483397868c8.gif)
Joined: 09 Sep 2004 Posts: 128 Location: London, UK
|
Posted: Tue Apr 04, 2006 7:42 pm Post subject: /dev almost empty |
|
|
I had to reboot my computer after it crashed due to (I think) the binary nVidia driver. During reboot, the / directory is mounted with its contents, but the filesystems cannot be remounted during the boot process. The boot script offers me to fsck it. When I enter the system as root during boot, and ls the /dev directory, here's ALL that's in it:
console
core
fd
initctl
null
pts
shm
stderr
stdin
stdout
zero
no hd*, nothing else at all. I can't mount without a /dev; actually, I can't do much of anything without it. I seem to be able to use the emerge command. I tried to unmerge and remerge udev. Note that / is fully populated. What should I do? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
asiB4 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 16 Jan 2006 Posts: 370 Location: Inside the electric circus
|
Posted: Tue Apr 04, 2006 8:15 pm Post subject: |
|
|
check in /lost+found _________________ Registered Linux User #332738
Last edited by asiB4 on Tue Apr 04, 2006 8:18 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
swingkyd Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 13 Jan 2005 Posts: 334
|
Posted: Tue Apr 04, 2006 8:16 pm Post subject: |
|
|
have you compiled your kernel recently? Are you using UDEV? what version of nvidia drivers are you using? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
erik258 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/18778702754589d89edad52.gif)
Joined: 12 Apr 2005 Posts: 2650 Location: Twin Cities, Minnesota, USA
|
Posted: Tue Apr 04, 2006 8:19 pm Post subject: had this problem |
|
|
i've been in that exact situation (though for a completely different reason).
i have a good hack, although I am without a real fix. Hard to fix a problem that stops you from booting. ; ).
so boot from a CD and then edit your /etc/init.d/checkroot : Quote: |
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend() {
before *
}
start() {
##ok here's the hack
/sbin/devfsd /dev;
##ok that's it
local retval=0
if [[ ! -f /fastboot && -z ${CDBOOT} ]] && ! is_net_fs / ; then
if touch -c / >& /dev/null ; then
ebegin "Remounting root filesystem read-only"
mount -n -o remount,ro /
eend $?
fi
if [[ -f /forcefsck ]] || get_bootparam "forcefsck" ; then
ebegin "Checking root filesystem (full |
btw if you want to know what's going on:
that line runs /sb/in/devfsd. I don't know wheter udev/whatever and for the purpose of my router didn't really care at the time. The argument, '/dev', will be populated with /dev/hd[a-z][0-9]? and all your symlink friends in /dev ; )>. (that's supposed to be a smirk) This probably -isnt- how to correct that problem, i wouldn't be surprised if it would be a kernel thing to fix or something similar.. that's what wonton emerge system does. But it works well to get you back off the ground. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
eje211 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/180102691242483397868c8.gif)
Joined: 09 Sep 2004 Posts: 128 Location: London, UK
|
Posted: Tue Apr 04, 2006 9:08 pm Post subject: |
|
|
Thanks for all of your answers!
swingkyd:
1. I did not compile my kernel recently (about six months ago).
2. I'm nowhere near using the nVidia drivers now. They caused a freeze but don't prevent the reboot.
3. I'm using udev; it shows up when I run the "mount" command and ps ax.
asiB4:
What should I look FOR in lost+found (I've had a similar problem earlier and there's a LOT in the l+f.)
erik258:
I'll try your hack. I don't need a boot disk, that the weird thing. I get a full shell, only not the end of the boot process. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
swingkyd Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 13 Jan 2005 Posts: 334
|
Posted: Tue Apr 04, 2006 9:15 pm Post subject: |
|
|
It's just that udev was recently updated and possibly something went wrong in the update. Just out of curiosity, is it a pure udev system? Just a guess, does etc-update have anything for the udev rules? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
erik258 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/18778702754589d89edad52.gif)
Joined: 12 Apr 2005 Posts: 2650 Location: Twin Cities, Minnesota, USA
|
Posted: Tue Apr 04, 2006 9:19 pm Post subject: you think so, huh? |
|
|
Quote: | I don't need a boot disk, that the weird thing. I get a full shell, only not the end of the boot process. |
i hope in fact you do have write support at the console at which you ended up. I do indeed hope you do, for your sake.
But i worry for you, eje211; i worry that you do not in fact have write support. I worry that the exact circumstances of your boot failure were incorrectly diagnosed by myself. I worry most of all that my hack will not work and you have bigger problems, like filesystem corruption perhaps. But do see if you can write to the file, and do use a boot cd / disk if you find that you can't.
can you get the output of dmseg on the forum (that is if you keep having problems) ? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
eje211 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/180102691242483397868c8.gif)
Joined: 09 Sep 2004 Posts: 128 Location: London, UK
|
Posted: Tue Apr 04, 2006 9:32 pm Post subject: |
|
|
I have write access. I can start the scripts in /etc/init.d, but they don't seem to be enough to connect my main computer to the net. So I can't post dmesg. The disk seems to be OK. I can't fsck it because it doesn't show up in /dev. When I run devfsd from the command line, it complains about the file .devfsd not existing. I didn't find where to change it in the script. I'll look again.
etc-update says all is up to date. I don't know whether my system is "pure" udev. It IS udev, that I do know. How can tell whether it's pure udev? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
erik258 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/18778702754589d89edad52.gif)
Joined: 12 Apr 2005 Posts: 2650 Location: Twin Cities, Minnesota, USA
|
Posted: Tue Apr 04, 2006 9:52 pm Post subject: some more ideas |
|
|
eje211 wrote: | When I run devfsd from the command line, it complains about the file .devfsd not existing. |
from man devfsd
Quote: | DESCRIPTION
The devfsd programme is a daemon, run by the system boot scripts, which
can provide for intelligent management of device entries in the Device
Filesystem (devfs). It is desirable to start the daemon at the begin-
ning of the boot scripts, in particular before filesystem checks |
see the thing about running before filesystem checks? might be important.
aon another computer, upgraded recently, i did some sleuthing.
Code: | pascal ~ # cat /boot/.config | grep DEVFS
# CONFIG_DEVFS_FS is not set
pascal ~ # devfsd
-bash: devfsd: command not found
|
So i am just guessing that if devfsd is there, you need it. This is just a guess, however.
On the other hand, you seem to not be able to use it. Are you sure it doesn't help populate /dev ?
try 'mount' to see what's mounted.
try "mount /dev".
try 'init 3' to finish booting.
is 'pure' used here a distinction between devfs and udev?
is it possible that you should be running 'udev' or 'udevd' instead? manpages seem to present them of analogues of 'devfsd' Since it is running already it seems pretty likely.
can you check dmesg and see what exactly is failing to boot? Or maybe it's on the console and you can copy it over here, at least what's running that fails or some boot message? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
eje211 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/180102691242483397868c8.gif)
Joined: 09 Sep 2004 Posts: 128 Location: London, UK
|
Posted: Tue Apr 04, 2006 10:17 pm Post subject: |
|
|
I've looked at lot more closely at the boot sequence this time. It appears that there is a missing file /sbin/udevstart that is not made by "emerge udev". How can I get this file back? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
eje211 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/180102691242483397868c8.gif)
Joined: 09 Sep 2004 Posts: 128 Location: London, UK
|
Posted: Tue Apr 04, 2006 10:39 pm Post subject: [SOLVED] /dev almost empty |
|
|
I did it. I copied the tar file from /usr/portage/disfiles, compiled it and copied the missing file. I'm typing from the fixed computer now. Thanks to everyone who helped! (And sorry for missing the message during the boot sequence. I'm VERY tired.) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
asiB4 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 16 Jan 2006 Posts: 370 Location: Inside the electric circus
|
Posted: Tue Apr 04, 2006 11:26 pm Post subject: |
|
|
eje211 wrote: | Thanks for all of your answers!
swingkyd:
1. I did not compile my kernel recently (about six months ago).
2. I'm nowhere near using the nVidia drivers now. They caused a freeze but don't prevent the reboot.
3. I'm using udev; it shows up when I run the "mount" command and ps ax.
asiB4:
What should I look FOR in lost+found (I've had a similar problem earlier and there's a LOT in the l+f.)
erik258:
I'll try your hack. I don't need a boot disk, that the weird thing. I get a full shell, only not the end of the boot process. |
Well...glad you got it fixed, although my suggestion really was of no use...the reason I suggested looking in /lost+found is from what I understand and someone can correct me if I am wrong...is during a system crash such as this, you reboot and a file system check is performed...any corrupted and/or otherwise unuseable files are placed in /lost+found...thus allowing you to analyze and repair as necessary. I haven't had the need to do this...maybe someone with a little more experience can chime in and paint a better picture of how that could be utilized in a situation such as this...or how it would have been of no use.
http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/lostfound.html _________________ Registered Linux User #332738
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NonDucor n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/79257538240de13a5aadca.jpg)
Joined: 26 Jun 2004 Posts: 5 Location: Florianopolis, Brazil
|
Posted: Wed Apr 05, 2006 12:33 am Post subject: |
|
|
Ok, since the problem has been already solved, I probably have nothing else to do here....
But, one hour ago, I had the same problem. It happened because I updated to UDEV-089, which is not compatible with a 2.6.13 kernel. Just upgrading the kernel to 2.6.16 (I don't know if it would have worked with .15 or .14) solved the problem.
Was it your problem also ? Should we file a bug asking for a kernel version check in the ebuild ? (I don't even know if it is possible). Or at least a warning (I checked the ebuild a didn't find anything related...) _________________ When the gods wish to punish us, they answer our prayers.
Oscar Wilde |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
hrnick Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 31 Aug 2002 Posts: 429 Location: Sweden
|
Posted: Wed Apr 05, 2006 11:28 am Post subject: |
|
|
NonDucor wrote: | But, one hour ago, I had the same problem. It happened because I updated to UDEV-089, which is not compatible with a 2.6.13 kernel. Just upgrading the kernel to 2.6.16 (I don't know if it would have worked with .15 or .14) solved the problem.
|
I had the same problem when upgrading to udev-089 running 2.6.14-gentoo-r6 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
swingkyd Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 13 Jan 2005 Posts: 334
|
Posted: Wed Apr 05, 2006 3:05 pm Post subject: Re: [SOLVED] /dev almost empty |
|
|
eje211 wrote: | I did it. I copied the tar file from /usr/portage/disfiles, compiled it and copied the missing file. I'm typing from the fixed computer now. Thanks to everyone who helped! (And sorry for missing the message during the boot sequence. I'm VERY tired.) |
Before you did this, did you try to re-emerge udev?
Or was that part of the problem?
I was thinking, if there were no /dev/hd* devices, how is it that you had root? Are you running initrd?
Anyway, I'm glad you figured it out.
What I meant by "pure" udev was that you are not running devfsd and you are not saving your /dev in a tar ball. See the settings in
Code: | less /etc/conf.d/rc |
And search for TAR. If that flag is set to YES, then you are probably saving the /dev tree when you exit. I suspect you probalby aren't. Your problem seems like udev failed to install for some reason! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mariourk l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/17564073564d54f55cd1671.gif)
Joined: 11 Jul 2003 Posts: 807 Location: Urk, Netherlands
|
Posted: Wed Apr 05, 2006 4:11 pm Post subject: |
|
|
I fixed a similar problem by updating udev to the latest version, udev-089-r2
udev-089-r1 has problems with raid and older kernels (2.6.14 and older)
check, hope that helps someone ![Wink ;)](images/smiles/icon_wink.gif) _________________ If there is one thing to learn from history, it's that we usualy don't learn anything from it, at all. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bexamous2 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 18 Nov 2005 Posts: 80
|
Posted: Sat Apr 08, 2006 9:23 pm Post subject: |
|
|
Wow wtf I just got home from work today and my /dev was empty.
/dev/null and everything was gone there was one file, cannot remember what.
I googled and then searched these forums and found this thread.
I havn't updated anything for a week and have been having no problems. Computer hasn't been restarted for over a month. Nothing should have happened since last night that would cause /dev to be deleted heh.
I see these problems with udev89 however I'm at:
bexus / # udevinfo -V
udevinfo, version 079
Should I bother trying to update to 89? Is it masked?
Also after freaking out i tried /sbin/udevstart and dev got filled. That makes no sense to me. But things are still screwed I can't start any new xterms:
"
bexamous@bexus ~ $ screen -x
Must be connected to a terminal.
bexamous@bexus ~ $ screen
Must be connected to a terminal.
bexamous@bexus ~ $ xterm
xterm: Error 32, errno 2: No such file or directory
Reason: get_pty: not enough ptys
bexamous@bexus ~ $
"
This has to be some crazy udev problem, udev is the only thing that ever screws with me :/ I seriously have no idea what to try, and I'm afraid of rebooting now and not getting back in. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
erik258 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/18778702754589d89edad52.gif)
Joined: 12 Apr 2005 Posts: 2650 Location: Twin Cities, Minnesota, USA
|
Posted: Sun Apr 09, 2006 3:18 am Post subject: wow, wtf indeed |
|
|
i have in my few short years with linux never heard of that ; (
i would reinstall udev though, that will probably solve the problems |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bexamous2 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 18 Nov 2005 Posts: 80
|
Posted: Sun Apr 09, 2006 3:54 am Post subject: |
|
|
Well I have no idea what that was, after I did the /sbin/udevstart I had a /dev/null and emerge didn't freak out, so I re-emerged udev dealt with alot of ._cfg files.. rebooted and everything is fine. All is good now though, htnaks. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
erik258 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/18778702754589d89edad52.gif)
Joined: 12 Apr 2005 Posts: 2650 Location: Twin Cities, Minnesota, USA
|
Posted: Sun Apr 09, 2006 6:11 pm Post subject: way 2 go |
|
|
glad to hear you're back up and running.
happy computing! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|