Announcement

Collapse
No announcement yet.

Directories disappear from dev and now OS won't load

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Directories disappear from dev and now OS won't load

    For some reason a bunch of directories suddenly vanished out of /dev, and naturally kubuntu won't load. Instead it just dumps me into a shell. (BusyBox v1.13.3 if you need to know)
    I'm currently running off the intallation CD and can't work out how to fix this problem. I don't know my way around linux commands nearly well enough to copy the missing directories from the CD onto my hard drive where they belong; I can't even work out how to get the right permissions! (On my own machine! Oh the irony!)
    And even if I do get it fixed, I would love to know how the hell it happened in the first place, and how to stop it happening again!
    Does anyone have any ideas?
    The directories missing out of /dev are:
    block
    bus
    char
    disk
    input
    mapper
    net
    pktcdvd
    snd

    As far as I know there may be more things missing from elsewhere too. These are just the ones I worked out.

    #2
    Re: Directories disappear from dev and now OS won't load

    I would love to know how the hell it happened in the first place, and how to stop it happening again!
    There are several possible causes:
    1) Your HD is beginning to fail, or other hardware problems
    2) Your FS is corrupt and/or you have delayed write to disk and forced a power cycle.
    3) You tried to install alien software (software NOT in the repository for your version of Kubuntu)
    4) YOU were doing root work in a console or with Dolphin and inadvertently deleted those (and other?) directories & files.

    I noticed in one of your posts from a year ago you tried to install an older version of GTK+ so you could run a version of XMMS that is compatible with it. That is an example of problem #3.

    As far as permissions being an "irony", that is resolved by self-education: http://permissions-calculator.org/

    My suggestion is that the easiest way for you to recover is to save off to CD or USB stick those files you need to keep and then reinstall the latest Kubuntu, Lucid Lynx 9.10 from a daily LiveCD: http://cdimage.ubuntu.com/kubuntu/daily-live/current/ Besides, it is an LTS version (Long Term Support).

    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      Re: Directories disappear from dev and now OS won't load

      Thanks for the help!
      1) I don't think it's the HD, because it's only about two years old.
      2) I have no idea what this means! (Real noob...)
      3) Possible. I haven't tried installing anything new in a while though. The last thing that was installed on my machine was an automatic firefox update. Could this be the culprit?
      4) I try to steer well clear of root work when I can as I know I'm a total noob and am likely to break something!

      I think I will have to reinstall. I was an inch away from doing it anyway when I decided it might pay off to post my question here

      Thanks again!

      Comment


        #4
        Re: Directories disappear from dev and now OS won't load

        Originally posted by LonePiper
        Thanks for the help!
        1) I don't think it's the HD, because it's only about two years old.
        Still a possibility, though.

        2) I have no idea what this means! (Real noob...)
        To increase the speed of HD I/O the writeback delay delay can be set for any period of time, from 0 (no delay - slow) to several minutes. Wikipedia explains:
        Writeback (highest risk)
        Only metadata is journaled; file contents are not. The contents might be written before or after the journal is updated. As a result, files modified right before a crash can become corrupted. For example, a file being appended to may be marked in the journal as being larger than it actually is, causing garbage at the end. Older versions of files could also appear unexpectedly after a journal recovery. The lack of synchronization between data and journal is faster in many cases.
        If, after the meta data is journaled, an unruly app locks up your machine, the Elephant dance on the keyboards doesn't work, and you are forced to cycle the power, your File System *may* become corrupted. This could result, among other things, in random file and directory deletions. In 12 years of using Linux (ext2, ReiserFSv3, ext3 and ext4) I've had this happen only once, while testing a release using EXT4 in its alpha phase, and I have no qualms about using a power cycle on Ext4, usually for lightening fast shutdowns in order to unplug my equipment from the power lines because of nearby Lightening strikes. Lincoln is a hotbed for Thunderstorms and Tornadoes. I've seen thunderstorms AND HAIL in January!

        3) Possible. I haven't tried installing anything new in a while though. The last thing that was installed on my machine was an automatic firefox update. Could this be the culprit?
        Highly unlikely. FireFox is well designed to be distro neutral, and if you updated through the repository then that version of FireFox has been customized for Kubuntu. A couple computer generations ago all distros were pretty much the same: they used the same file hierarchy, they used LILO to boot, inittab to control run levels, spawning, etc, and /etc/profile or /home/youracct/.profile or .bashrc to start the xserver and run either GNOME or KDE or one of the other 20 or so xclients. Now, there can be LARGE differences in the way various distros start. Most use GRUB or GRUB2 in place of LILO. K/Ubuntu use Canonical's "Upstart" in place of inittab. Rather than let the user configure peripherals individually using console or GUI tools, some distros use "HAL"-like or udev type applications which diagnose the hardware and auto-configure it. This can be a boone for those whose hardware is perfectly configured, or a nightmare for those not so lucky. For example, you might be forced to use the LiveCD of another distro that still creates and uses /etc/X11/xorg.conf so that you can borrow it to configure your video chip under Kubuntu.

        I say that to say this: if you try to install an app from a distro that expects certain files and directories to be present (I'm not talking about "dependencies"), and you give it root permission, you may have systems files created that are unnecessary or harmful to Kubuntu, or you may have files necessary for Kubuntu modified, overwritten or deleted.

        Ergo, don't install apps from outside the repository UNLESS you are a programmer and know what you are doing. Even then, I've seen programmers bork their system and had to reinstall... :-X

        That said, part of the FUN of Linux is KNOWING that you can play around and learn, and if you happen to bork your system you KNOW that it won't cost you "another license fee" to install. Just remember to backup your important data before you play!


        4) I try to steer well clear of root work when I can as I know I'm a total noob and am likely to break something!
        The most common commands to run as root in a Konsole are;
        sudo apt-get update
        sudo apt-get upgrade
        sudo apt-get dist-upgrade
        sudo apt-get autoclean
        sudo updatedb (in order to freshen the database that the "locate" command uses)
        sudo lsmod
        sudo ifconfig
        sudo iwlist scanning
        sudo iwconfig

        Non-root commands are:
        ls
        dir
        vdir
        cd
        locate (fast "find" command in Linux)


        But, as a noob, and as a general rule, never do in a Konsole what you can do with a GUI. Specifically, use Synaptic to add, remove or clean up your installation. Use wicd or knetworkmanager to configure your Internet connections, CUPS for your printer setup. and Systemsettings or dolphin for everything else.


        I think I will have to reinstall. I was an inch away from doing it anyway when I decided it might pay off to post my question here
        Excellent choice!

        Thanks again!
        Our pleasure. That's what this forum is for! 8)
        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
        – John F. Kennedy, February 26, 1962.

        Comment

        Working...
        X