Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
libattr.so.1 Problems [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
kienjakenobi
n00b
n00b


Joined: 25 Dec 2007
Posts: 28

PostPosted: Wed Feb 20, 2008 10:28 pm    Post subject: libattr.so.1 Problems [solved] Reply with quote

I was initially unable to emerge attr 2.4.39 so my stupid Windoze brain told me that unmerging attr and then trying the emerge again would be a good idea. Unfortunately in the time between unmerging attr and the time I tried to emerge attr again, the system was restarted, so libattr.so.1 is no longer loaded into memory. Apparently, this library is needed to do nearly anything. I can not start KDE, nor can I connect to the Internet (From Gentoo).

Trying to emerge anything, including attr, gives this error:

Code:
mv: error while loading shared libraries: libattr.so.1 cannot open shared object file: file does not exist


Therefore, to be able to install attr I need attr, and I do not currently have any version of attr installed. Any ideas on how to get around this? I realize my initial inability to emerge attr was probably due to the fact that I have emerged about 230 programs and I have yet to use revdep-rebuild even once! I can fix that as soon as I have attr installed (revdep-rebuild requires libattr.so.1)
_________________
Avatar: Background = Adobe stock photo Tux = Vector by Anja Gerwinski (http://ngc224.gerwinski.de/~anja/gnuart/penguin/)


Last edited by kienjakenobi on Thu Feb 21, 2008 7:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43042
Location: 56N 3W

PostPosted: Wed Feb 20, 2008 11:16 pm    Post subject: Reply with quote

kienjakenobi,

You need a binary for your arch sys-apps/attr.
Try here or you can unpick a stage 3 tarball by untarring it into a chroot in a file.

Once you have your tarball, untar it to your root (/) directory.
If its a Gentoo binary package, ignore the warning from tar about extra garbage at end ignored.

You can do all this from a liveCD or you may be able to boot into a busybox shell.
busybox also provides tar.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
kienjakenobi
n00b
n00b


Joined: 25 Dec 2007
Posts: 28

PostPosted: Thu Feb 21, 2008 7:10 pm    Post subject: Reply with quote

Thank you! Thank you very much! I was not able to find an attr binary through the link you gave me so I downloaded a stage3 tarball and used my minimal installation CD to unpack the tarball. I believe that did fix the attr problem, but when I first mounted my root partition (ext3) on the Minimum Install CD I received a warning that the filesystem had been mounted a maximum number of times and that I should run e2fsck, so I ran e2fsck on my root partition. Then when I rebooted from the Minimal Install CD and booted Gentoo it was unable to mount the root filesystem. I think I might have really done some damage to the filesystem because I tried to mount it using my Parted Magic Live CD and it gave the same error. I will simply delete that partition and start a new Gentoo installation. That is alright though. Knowing what I do now I can create a cleaner installation.
_________________
Avatar: Background = Adobe stock photo Tux = Vector by Anja Gerwinski (http://ngc224.gerwinski.de/~anja/gnuart/penguin/)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43042
Location: 56N 3W

PostPosted: Thu Feb 21, 2008 9:50 pm    Post subject: Reply with quote

kienjakenobi,

e2fsck is not needed on ext3 filesystems. It should be harmless ....

The idea is this. To ensure a ext2 filesystem is self consistant, e2fsck must read the entire filesystem
This takes a long time with large filesystems. With big filesystems on older hardware, cases of it taking days were reported.
If things needed to be fixed, the time extends further.

The journal gets round this issue by keeping track of incomplete filesystem changes, thus its only required to replay the journal to know that a journalled filesystem is self consistant. ext3 is ext2 with a journal.

There are reasons why you might want to force e2fsck to run on an ext3 filesystem but not because a certain mount count has been reached.
You can turn off that warning with tune2fs
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
kienjakenobi
n00b
n00b


Joined: 25 Dec 2007
Posts: 28

PostPosted: Fri Feb 22, 2008 2:34 am    Post subject: Reply with quote

Thank you for the explanation of e2fsck. I always wondered why it was not called e3fsck if it was meant of ext3. I now realize that there was no filesystem damage at all. When I unpacked the stage3 tarball it created a new /etc/fstab that did not have the needed filesystem locations. I just needed to replace "ROOT" with "hda4!" In my haste I missed this.
_________________
Avatar: Background = Adobe stock photo Tux = Vector by Anja Gerwinski (http://ngc224.gerwinski.de/~anja/gnuart/penguin/)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43042
Location: 56N 3W

PostPosted: Fri Feb 22, 2008 2:18 pm    Post subject: Reply with quote

kienjakenobi,

Thats why I suggested you create a file to do the unpack in. Untarring a stage3 into your root filesystem overwrites all the files found in the stage 3.

If you make an empty file, format the file as ext2, you can mount the file as if it were a partition.
Now its safe to put the stage 3 there and untar it as it stays safely in the file away from your root filesystem.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
kienjakenobi
n00b
n00b


Joined: 25 Dec 2007
Posts: 28

PostPosted: Fri Feb 22, 2008 2:56 pm    Post subject: Reply with quote

I see now...

If I unpacked the stage3 into a file, how would I get the needed attr files out of it and into my root system?
_________________
Avatar: Background = Adobe stock photo Tux = Vector by Anja Gerwinski (http://ngc224.gerwinski.de/~anja/gnuart/penguin/)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43042
Location: 56N 3W

PostPosted: Fri Feb 22, 2008 3:39 pm    Post subject: Reply with quote

kienjakenobi,

You run
Code:
quickpkg sys-apps/attr
to make a tarball in /usr/portage/packages then from outside your chroot in a file, you untar it to your root.

The chroot in a file behaves in every respect like a new gentoo install with the exception that you cannot boot directly into it.

In detail, the steps to recover a broken system like this are:-
boot the liveCD
Mount some space at /mnt/gentoo I asssume you use your normal root. (Allow 5G of empty space but thats because I don't know how much you really need.)
Make an empty file.
Code:
dd if=/dev/zero/ of=/mnt/gentoo/rescue bs=1024000 count=5000 
thats about 5G, now format it
Code:
mke2fs /mnt/gentoo/rescue
Do not use a journalled fs. Everything in linux is a file. Mount it. We need a mount point as we are already using /mnt/gentoo
Code:
mkdir /mnt/dontpanic
mount -o loop -t ext2 /mnt/gentoo/rescue   /mnt/dontpanic
Its going to become a chroot soon
Get the stage3 tarball into /mnt/dontpanic and untar it (follow the manual install guide)
mount /dev and /proc as the guide tells you to.
bind mount your existing /usr/portage inside /mnt/dontpanic, this saves you getting a snapshot and you have all your distfiles too
Code:
mkdir /mnt/dontpanic/usr/portage
mount -o bind /usr/portage /mnt/dontpanic/usr/portage

Next
Code:
chroot /mnt/dontpanic /bin/bash
env-update
source /etc/profile
export PS1="Don't Panic! $PS1"

You are now inside your chroot in a file, with /dev /proc as provided by the liveCD and /usr/portage from your own broken install.
Code:
quickpkg sys-apps/attr
makes your tarball.
You may need to emerge gentoolkit to get quickpkg
This method works for gcc, glibc ... any critcal system file.
If you must have the right version, as you would with glibc, just emerge it before you quickpkg. The bind mount of /usr/portage gives you your distfiles and portage tree, so there should be nothing to download.

Outside the chroot, your tarball is at /mnt/gentoo/usr/portage/packages/All/....
Copy it to /mnt/gentoo
Code:
cd /mnt/gentoo
tar xvjpf <tarball>
and ignore the warning about extra garbage at the end being ignored.

Reboot to test. If it works, you can remove /rescue and get your 5G back, if not, chroot, rinse and repeat.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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