LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 09-01-2004, 05:30 PM   #1
yelgnits
LQ Newbie
 
Registered: Jul 2004
Distribution: Fedora
Posts: 10

Rep: Reputation: 0
AaaaAAAaah help, I made a huge mistake :( accidentally moved /bin!


Okay, so I was trying to move all of the files from a folder to another folder on my hd to another folder:
mv ./* /music/new
But instead (i was logged in as root) I typed
mv /* /music/new
Thus moving a lot of the file system, including the /bin folder, to that folder! Now, I can't figure out a way to move them back (mv doesn't work...it was in /bin) and when I try to access the stuff that's now in /music/new/bin, it an't find /lib/ld-linux.so.2 (obviously, since it was moved!) So...am I totally screwed? Is there any possible way that I could move the stuff back at all without reistalling the OS? Wow, thanks a lot...Cody
 
Old 09-01-2004, 05:32 PM   #2
Blinker_Fluid
Member
 
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 682

Rep: Reputation: 63
Full path?
Somthing like:
/music/new/bin/mv /music/new/bin /bin
 
Old 09-01-2004, 05:36 PM   #3
yelgnits
LQ Newbie
 
Registered: Jul 2004
Distribution: Fedora
Posts: 10

Original Poster
Rep: Reputation: 0
Well...

^^ Like I said above, this produces the error
bash: /music/new/bin/mv: /iib/ld-linux.so.2: bad ELF interpreter: No such file or directory
Makes sense, cause I moved /lib, too...freakin typo...any suggestions?
 
Old 09-01-2004, 06:19 PM   #4
yelgnits
LQ Newbie
 
Registered: Jul 2004
Distribution: Fedora
Posts: 10

Original Poster
Rep: Reputation: 0
Nobody has any ideas then....???
 
Old 09-01-2004, 06:32 PM   #5
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
You might try: export LD_LIBRARY_PATH="/music/new/lib:$LD_LIBRARY_PATH"
and then try /music/new/bin/mv

No idea if this will work, though.

Another option is to boot up with a liveCD, mount your root drive and move the files.

Last edited by mikshaw; 09-01-2004 at 06:34 PM.
 
Old 09-01-2004, 06:45 PM   #6
yelgnits
LQ Newbie
 
Registered: Jul 2004
Distribution: Fedora
Posts: 10

Original Poster
Rep: Reputation: 0
Okay, I think I screwed up your command somehow...I executed
export LD_LIBRARY_PATH="/music/new/lib:$LD_LIBRARY_PATH"
then:
/music/new/bin/mv
which gave the same error as before...echo $LD_LIBRARY_PATH gives:
/music/new/lib:/music/new/lib
which doesn't look right
 
Old 09-01-2004, 06:47 PM   #7
dos1
Member
 
Registered: May 2003
Location: Auckland, New Zealand
Posts: 49

Rep: Reputation: 15
Reinstall
 
Old 09-01-2004, 06:50 PM   #8
yelgnits
LQ Newbie
 
Registered: Jul 2004
Distribution: Fedora
Posts: 10

Original Poster
Rep: Reputation: 0
Oy vey!

No way I'm reinstalling unless it's the absolute last thing I can do...I have a ton of data and stuff configured on there that would take forever to redo...!
 
Old 09-01-2004, 06:54 PM   #9
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
I think that's just because $LD_LIBRARY_PATH was not already set.
Like I said, I have no idea if it will work on a broken system...it's just something I use sometimes to tell apps where to find libs if I happen to copy a pre-compiled binary onto another system.

Still, I'd recommend you download a liveCD if you don't have one. It's invaluable in situations like this, and who knows when you might want it in the future.
If downloading a whole CD isn't something you want to do right now, you could try http://damnsmalllinux.org
It's only 50mb, and is a fully functional general purpose graphical system.
 
Old 09-02-2004, 06:50 AM   #10
mhearn
Guru
 
Registered: Nov 2002
Location: Durham, England
Distribution: Fedora Core 4
Posts: 1,565

Rep: Reputation: 47
Try this

/music/new/lib/ld-linux.so.2 --library-path=/music/new/lib /music/new/bin/mv /music/new/lib /lib

Be warned, this tip comes with no warranty

Alterantive is to boot with a Live CD, mount the hard disk, and then move your stuff back. This is probably the easier way, actually ....
 
Old 09-02-2004, 07:08 AM   #11
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
yip, boot from cd-> mount HD -> chroot /mntpoint/music/new/
think that should work....

egag
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mistake I made with Mouse dolphans1 Mandriva 3 11-20-2005 08:33 AM
made a time mistake speel Linux - Newbie 2 04-30-2005 03:20 AM
I made a big mistake? BajaNick Linux - Software 8 12-28-2003 09:18 PM
I made a mistake! Need help now jcksrobbins Mandriva 8 08-30-2003 10:17 PM
I made a mistake need help here ikw38 Linux - Networking 4 06-16-2003 01:06 PM


All times are GMT -5. The time now is 04:38 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration