Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Deleted /lib -> /mnt/livecd/lib symlink - any way to fix?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
gregp01
Tux's lil' helper
Tux's lil' helper


Joined: 23 Feb 2004
Posts: 103

PostPosted: Mon Aug 01, 2005 4:57 pm    Post subject: Deleted /lib -> /mnt/livecd/lib symlink - any way to fix? Reply with quote

This isn't an urgent matter, but I thought I'd see if anyone knows of a way to fix this. I was working on one of my systems (booted into the 2005.0 AMD64 LiveCD) via SSH, and I wanted to run bonnie++ to stress-test a drive. Unfortunately, it needs some libraries not included on the LiveCD.

So, I figured, why not create a new lib directory with symlinks to the CD for each library, and copy the libraries I needed into the new directory? Well, stupid me deleted the /lib and /lib64 symlinks as the first step, and now nothing can find the libraries.

So, no ln, no cp, no nothing. I have the one instance of bash running in my logged-in SSH session, but that's it. Every command I try to run results in the same error:

Code:
livecd / # ln -s /mnt/livecd/lib lib
-bash: /bin/ln: No such file or directory

livecd # /mnt/livecd/bin/ln -s /mnt/livecd/lib lib
-bash: /mnt/livecd/bin/ln: No such file or directory


All I have is the statically linked copy of netcat I dumped on the machine yesterday, and whatever bash's internal commands let me do.

I've already tried creating an NFS mount so that I could re-create the link from another machine:

Code:
livecd # echo '/    192.168.1.106(rw,sync)' > /etc/exports


Then, on another machine:

Code:
livecd # mount 192.168.1.107:/ /mnt/temp2
mount: 192.168.1.107:/ failed, reason given by server: Permission denied


I can't kill -HUP or /etc/init.d/nfsd restart because I can't run anything...

So, does anyone have any ideas? Like I said above, this isn't urgent--I'll be able to reboot the machine later today--I'm really just curious if it's even possible to fix this.
Back to top
View user's profile Send private message
LoDown
Apprentice
Apprentice


Joined: 26 Oct 2004
Posts: 189
Location: Louisville, Ky

PostPosted: Wed Aug 03, 2005 3:11 pm    Post subject: Reply with quote

What I would do, is reboot (however you have to) and boot into the LiveCD. Then, mount the hard drive installation of Gentoo, add the symlinks that you need, then 'chroot' back into your installed enviroment. If something doesn't work, just type 'exit' and you will be back into the LiveCD.
_________________
Please remember to add [SOLVED] to your topic subject line when it is solved.
Back to top
View user's profile Send private message
gregp01
Tux's lil' helper
Tux's lil' helper


Joined: 23 Feb 2004
Posts: 103

PostPosted: Wed Aug 03, 2005 5:45 pm    Post subject: Reply with quote

I think you misunderstood my first post. My problem was that I didn't have a hard drive installation. I wanted to do some performance testing with bonnie++ before installing anything, but bonnie++ requires libstdc++ (among others), which isn't on the Gentoo LiveCD. My plan was to create a new lib directory on the tmpfs, with symlinks to all the libs on the LiveCD.

Unfortunately, I didn't think it through before acting, and I deleted the /lib -> /mnt/livecd/lib symlink as the first step. As a result, nothing could find the shared libraries, and nothing would load. (Note that this is one of the symlinks which allows the LiveCD root ( / ) to be read-write, even though all the libraries, binaries, etc. are on a read-only ISO filesystem. Since I hadn't yet done any of the Gentoo install steps, I didn't have any symlinks to or from anything on my hard drive.)

This problem is already "solved", in the sense that as soon as I got home I rebooted the machine with the LiveCD. However, I'm still curious if anyone knows of any way I could have solved this problem without rebooting, using only the built-in capabilities of bash and my statically linked copy of netcat (or anything else I hadn't thought of). All that was needed was a way to create a new /lib -> /mnt/livecd/lib symlink, but without that symlink there was no way to run ln to create the link - a catch-22.

So, I appreciate your suggestion, but it isn't at all what I was looking for...
Back to top
View user's profile Send private message
LoDown
Apprentice
Apprentice


Joined: 26 Oct 2004
Posts: 189
Location: Louisville, Ky

PostPosted: Wed Aug 03, 2005 6:12 pm    Post subject: Reply with quote

Ah, see, I am not used to having people post questions that are well thought out intellectual puzzles, so I apologize for making assumptions about your problem.

I hope that someone does come up with an answer, because I am sure there is a way. An egg or chicken kind or problem you had there....
_________________
Please remember to add [SOLVED] to your topic subject line when it is solved.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum