Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: HELP..!! I broke my system.. *I think*

  1. #1
    Join Date
    Jan 2008
    Beans
    9

    HELP..!! I broke my system.. *I think*

    Hi everyone, I am a bit of a newbie here and while I'm learning things pretty quick, I think I did something pretty bad. I was trying to get an application to work and I was following some online instructions to fix it.

    The instructions called for downloading an archive file that had a folder called /lib in it. I was to move this to my /usr/lib folder.

    So I downloaded it, opened up a terminal and went over to the directory it was in and typed

    sudo mv /lib /usr/lib

    Now, no commands work whatsoever. I cant run programs, open up a terminal or anything. Any time I try anything I get this error

    If I type the command : ls

    I get

    bash: /bin/ls: No such file or directory

    Funny thing is, the command "cd" works.

    I have a nautilus window open and I went to my home folder and looked in the "bin" folder and the command "ls" and "sudo" (another command that doesnt work) are both there. There is no "cd" though.

    Funny thing is, I dont even understand what I did wrong. Perhaps if I did, I might be able to find a solution.

    So, can someone please help me understand:

    1) What I did wrong (I didnt even TOUCH the "bin" folder)

    2) Any way to get things working again..

    I dont want to reinstall if at all possible, I have about 80 gigs of photos, music and settings from over 6 months on this, and am unable to copy my home folder to anywhere else.

  2. #2
    Join Date
    Sep 2007
    Beans
    268

    Re: HELP..!! I broke my system.. *I think*

    Have you tried rebooting?

  3. #3
    Join Date
    Jan 2008
    Beans
    9

    Re: HELP..!! I broke my system.. *I think*

    No I havent.. I'm just worried that if I log out, I wont be able to log back in or something. Then I'd really be screwed.. Should I..?

    I dont even know what I did wrong..?

  4. #4
    Join Date
    Sep 2007
    Beans
    268

    Re: HELP..!! I broke my system.. *I think*

    Quote Originally Posted by samdavid6 View Post
    No I havent.. I'm just worried that if I log out, I wont be able to log back in or something. Then I'd really be screwed.. Should I..?

    I dont even know what I did wrong..?
    Yeah you should. Worst case scenario, you can boot up from LiveCD and bak up your stuff but the chance of something screwing up is very very low.

    I suggest you go ahead and reboot, that should fix it.

  5. #5
    Join Date
    Jan 2008
    Beans
    9

    Re: HELP..!! I broke my system.. *I think*

    Dang, I just realised. I dont have a liveCD. I upgraded to Hardy over the internet. I cant even download the cd and burn it (I tried starting CD/DVD creator or Brasero, but I get a "/usr/bin/brasero: No such file or directory". So it looks like files in /usr/bin are messed up too.

    What exactly did I do with one command..?

  6. #6
    Join Date
    Sep 2007
    Beans
    268

    Re: HELP..!! I broke my system.. *I think*

    Its probably just a bug. If you are really unsure, I wont push you, but I would reboot. There is absolutely no chance that your data will vaporize.

  7. #7
    Join Date
    Sep 2007
    Beans
    268

    Re: HELP..!! I broke my system.. *I think*

    On second thoughts, just as a precaution, tell us what you were trying to download and where you got it - viruses that came disguised as packages are not so uncommon.

  8. #8
    Join Date
    Jul 2006
    Beans
    890
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: HELP..!! I broke my system.. *I think*

    Another edit: Can you run the 'ln' command? try it with this:

    Code:
     ln --help
    If you can run this command then try this:

    Code:
     sudo ln -s /usr/lib/lib /lib
    This should link the new position to the old one and hopefully get things working again.



    Out of curiosity how is rebooting going to solve this problem? He's moved his /lib folder, rebooting won't move it back. Your best bet is to boot from a LiveCD (The installer disc is good if you still have it about) and to move the folder back to where it was.

    Can you boot up a LiveCD, goto a terminal (Applications > Accessories > Terminal) and run this command:

    Code:
    sudo fdisk -l
    And post the output here? This will let us figure out which drive you need to access from the LiveCD and hopefully help you sort this all out.

    Try this AFTER you post the output of the last command and I get back to you.
    Make sure you replace <hd> in the commands with the name of the hard drive we find from the earlier command.

    You should be able to fix it reasonably easily if you boot the LiveCD up, open a terminal (Applications > Accessories > Terminal) and run these commands:

    Code:
    sudo mkdir /media/ubuntu
    Code:
    sudo mount /dev/<hd> /media/ubuntu
    Code:
    sudo mv /media/ubuntu/usr/lib/lib /media/ubuntu/
    This should move your /lib folder back to the correct place. After this you should be able to restart the computer and Ubuntu should be working again.

    Good luck.

    Edit: You moved the libaries for most programs from the place they are expected to be. Which unfortunately is the rough equivilent of taking a cars engine and putting it on the roof. It's still an engine but it's not going to be looked for there and it isn't in the right place to do anything useful.
    Last edited by shad0w_walker; May 2nd, 2008 at 11:55 AM.

  9. #9
    Join Date
    Oct 2007
    Beans
    56
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: HELP..!! I broke my system.. *I think*

    It could be recoverable. If the command mv still works then you should be able to sort it out.

    What your original command
    Code:
    sudo mv /lib /usr/lib
    will have done is moved the lib folder from the root directory into /usr/lib, so you should now have a /usr/lib/lib folder.

    Provided mv still works then all you should need to do to restore it is run
    Code:
    sudo mv /usr/lib/lib /
    That should move the lib directory back to the root folder.

    If you then reboot it should be fine.

  10. #10
    Join Date
    Sep 2007
    Beans
    247
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HELP..!! I broke my system.. *I think*

    mv won't probably work either... cd worked because it is a bash internal command, not a separate program.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •