Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
recovering after crash [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
pholthau
Guru
Guru


Joined: 27 Nov 2005
Posts: 361
Location: Bielefeld, Germany

PostPosted: Fri Jan 26, 2007 5:28 pm    Post subject: recovering after crash [solved] Reply with quote

today my hd crashed and i was unable to boot properly. with the help of an "emerge -e system"
most of the things work now. one problem is left:

Code:

emerge -av ipw3945d

[..]
>>> Install ipw3945d-1.7.22-r4 into /var/tmp/portage/net-wireless/ipw3945d-1.7.22-r4/image/ category net-wireless
>>> Completed installing ipw3945d-1.7.22-r4 into /var/tmp/portage/net-wireless/ipw3945d-1.7.22-r4/image/


 * QA Notice: Pre-stripped files found:
 * /var/tmp/portage/net-wireless/ipw3945d-1.7.22-r4/image/sbin/ipw3945d
Traceback (most recent call last):
  File "/usr/bin/emerge", line 5270, in ?
    retval = emerge_main()
  File "/usr/bin/emerge", line 5265, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/bin/emerge", line 4732, in action_build
    retval = mergetask.merge(pkglist, favorites, mtimedb)
  File "/usr/bin/emerge", line 2980, in merge
    prev_mtimes=ldpath_mtimes)
  File "/usr/lib/portage/pym/portage.py", line 3674, in doebuild
    vartree=vartree, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/portage.py", line 3882, in merge
    mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/portage.py", line 7723, in merge
    cleanup=cleanup, mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/portage.py", line 7133, in treewalk
    slot_matches = self.vartree.dbapi.match(
  File "/usr/lib/portage/pym/portage.py", line 5169, in match
    mymatch = [cpv for cpv in mymatch \
  File "/usr/lib/portage/pym/portage.py", line 5262, in aux_get
    for k, v in izip(aux_keys, self._aux_get(mycpv, aux_keys)):
  File "/usr/lib/portage/pym/portage.py", line 5275, in _aux_get
    raise KeyError(mycpv)
KeyError: 'net-wireless/ipw3945d-1.7.22-r4'


i need help. can anyone tell me how to solve this?
_________________
The message is Feierei, alder! The message is Gude Laune, alder! [Sven]


Last edited by pholthau on Thu Feb 01, 2007 8:08 am; edited 1 time in total
Back to top
View user's profile Send private message
hielvc
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2805
Location: Oceanside, Ca

PostPosted: Sat Jan 27, 2007 12:40 am    Post subject: Reply with quote

Try " rm -r /var/tmp/portage/* ". Then retry your emerge.
_________________
An A-Z Index of the Linux BASH command line
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Sat Jan 27, 2007 6:10 am    Post subject: Reply with quote

I found that when this happens to me an

Code:
emerge portage


usually fixes the problem.

If that does not work, definitely try the above...
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
pholthau
Guru
Guru


Joined: 27 Nov 2005
Posts: 361
Location: Bielefeld, Germany

PostPosted: Sat Jan 27, 2007 2:05 pm    Post subject: Reply with quote

thanks guys. i tried both.

but sadly it did not help... :(
could it be that something in /etc/profile is broken?

EDIT:
emerging portage gives a similar error:
Code:

[..]

>>> sys-apps/portage-2.1.2-r4 merged.

>>> No packages selected for removal by clean
>>> Auto-cleaning packages...
Traceback (most recent call last):
  File "/usr/bin/emerge", line 5270, in ?
    retval = emerge_main()
  File "/usr/bin/emerge", line 5265, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/bin/emerge", line 4742, in action_build
    ldpath_mtimes)
  File "/usr/bin/emerge", line 3325, in unmerge
    slotmap[myslot][localtree.dbapi.cpv_counter(mypkg)]=mypkg
  File "/usr/lib/portage/pym/portage.py", line 4920, in cpv_counter
    return long(self.aux_get(mycpv, ["COUNTER"])[0])
ValueError: invalid literal for long():
thrall ~ #

_________________
The message is Feierei, alder! The message is Gude Laune, alder! [Sven]
Back to top
View user's profile Send private message
pholthau
Guru
Guru


Joined: 27 Nov 2005
Posts: 361
Location: Bielefeld, Germany

PostPosted: Sun Jan 28, 2007 10:21 pm    Post subject: Reply with quote

after emerge -e world, portage can be merged fine again.

but my wireless lan is still broken. please, anyone at least an idea! :(
_________________
The message is Feierei, alder! The message is Gude Laune, alder! [Sven]
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Mon Jan 29, 2007 2:02 am    Post subject: Reply with quote

For that I believe we will need more info. Being that I have not installed a wireless driver in gentoo in over 2 years and I do not currently have any wireless cards this will be difficult for me to help you with. My first question is when you type ifconfig does the wireless card show up as an interface? If not is the ipw driver loaded? You can check that with lsmod. I believe the driver starts with ipw. If not can you run the following command and see if the driver exists:

Code:
modprobe -l ipw*

_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
pholthau
Guru
Guru


Joined: 27 Nov 2005
Posts: 361
Location: Bielefeld, Germany

PostPosted: Mon Jan 29, 2007 6:47 pm    Post subject: Reply with quote

Okay, sorry for my late answer but i was really busy today. :(

Code:

thrall ~ # lsmod | grep ipw
ipw3945                98272  0
ieee80211              26440  1 ipw3945


so now i try to tell you how things got bad:

1. i did something very harmful for my system:
while the computer was going to "suspend to disk" mode (suspend2 sources) i pressed the power off button.
i did this because the system did not respond at all (black screen) after coming from suspend mode.
so i pressed the power button for 5 seconds but as i started to press it, the suspend procedure began.

2. at reboot there were some errors while checking the disk (/ (ext3), /home (ext3)). so i had to manually run fsck.
while doing this i had to repair MANY inode entries and stuff. after doing this i rebooted.

3. this time there were a LOT of error messages at boot time. so i booted a livecd to check my disk again.
fsck told me there were no errors.

4. i dont know exactly how i figured it out but i realized that /etc/profile was seriously damaged.
i made a backup of it and booted the livecd again (2005.1 min). then i replaced my /etc/profile with the one on the livecd.
you can find the backup and the current version here (with a .txt appended).

5. i rebooted and suprisingly there were some fewer errors (mostly about kernel modules that coudl not be found)
and i got onto a login console. i recompiled my kernel + modules and ran modules-update -f. no more kernel module errors.

6. i did an emerge --sync, emerge -e system, and an emerge -e world. most of the packages installed fine but ipw3945d refuses to.

i hope that i remembered all the steps i went through but i think thats it. if you need more information/config files etc. please tell me.

thanks you...

EDIT another question (though i guess the answer is no): is it possible/recommended to extract a recent stage3 tarball to overwrite possibly damaged files?
_________________
The message is Feierei, alder! The message is Gude Laune, alder! [Sven]
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Mon Jan 29, 2007 9:24 pm    Post subject: Reply with quote

Can you post the output of
Quote:
emerge --info


Also after reemerging your system did you run either conf-update or dispatch-conf ?

Quote:
EDIT another question (though i guess the answer is no): is it possible/recommended to extract a recent stage3 tarball to overwrite possibly damaged files?


Definitely not with the 2005.1 disk as it certainly cause you problems as anything emerged after 2005.1 was released will be downgraded to that version without telling portage or updating the system in a clean manner.
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
pholthau
Guru
Guru


Joined: 27 Nov 2005
Posts: 361
Location: Bielefeld, Germany

PostPosted: Mon Jan 29, 2007 10:20 pm    Post subject: Reply with quote

here it comes:

Code:

thrall ~ # emerge --info
Portage 2.1.2-r5 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.5-r0, 2.6.19-suspend2-r1 i686)
=================================================================
System uname: 2.6.19-suspend2-r1 i686 Intel(R) Core(TM)2 CPU         T7200  @ 2.00GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Mon, 29 Jan 2007 19:50:01 +0000
ccache version 2.4 [disabled]
dev-java/java-config: 1.3.7, 2.0.31-r3
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.19.2-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -msse3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -march=pentium-m -msse3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="ftp://pandemonium.tiscali.de/pub/gentoo http://pandemonium.tiscali.de/pub/gentoo/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LINGUAS="de"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/migrated-java-experimental-overlay"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="X aac aalib acpi alsa arts berkdb bitmap-fonts bluetooth cairo cdr cli cracklib crypt cups dbus dlloader dri dv dvb dvd dvdr eds emboss encode fam ffmpeg firefox fortran gdbm gif gnome gpm gstreamer gtk gtk2 hal iconv ieee1394 ipv6 isdnlog java jpeg kde kdgraphics ldap libg++ logitech-mouse mad mikmod mmx mp3 mpeg mysql ncurses nls nptl nptlonly nsplugin offensive ogg opengl oss pam pcmcia pcre pdf perl png ppds pppd python qt qt3 qt4 quicktime readline real reflection samba sdl session sndfile spell spl sse sse2 ssl svg tcpd tetex truetype truetype-fonts type1-fonts udev unicode usb userlocales v4l v4l2 vorbis wifi win32codecs x86 xml xorg xprint xscreensaver xv zlib" ALSA_CARDS="usb-audio hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" DVB_CARDS="usb-wt220u" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="nvidia fbdev vesa"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS

ccache was enabled during emerge system but i disabled it to test whether it may cause troubles...

and yes, i did run etc-update. with a recent snapshot i meant "stage3-x86-2006.1.tar.bz2" which is available via the mirrors and 2006.1 livecd.
_________________
The message is Feierei, alder! The message is Gude Laune, alder! [Sven]
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Mon Jan 29, 2007 10:30 pm    Post subject: Reply with quote

Quote:
with a recent snapshot i meant "stage3-x86-2006.1.tar.bz2" which is available via the mirrors and 2006.1 livecd.


There will still be problems when versions of a package are not the same as the one that portage thinks is installed and the biggest problem will be glibc as the 2006.1 cd has glibc-2.4. Downgrading glibc will certainly break a lot of things that are not in the stage3.
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
pholthau
Guru
Guru


Joined: 27 Nov 2005
Posts: 361
Location: Bielefeld, Germany

PostPosted: Mon Jan 29, 2007 10:34 pm    Post subject: Reply with quote

another thing:
i synced today and when i try to update world (-avNDu) emerge tells me that there are
problems with my world file. however if i run the following nothing changes:

Code:

thrall ~ # emaint --check world
Checking world for problems
Finished
thrall ~ # emaint --fix world
Attempting to fix world
Finished

_________________
The message is Feierei, alder! The message is Gude Laune, alder! [Sven]
Back to top
View user's profile Send private message
pholthau
Guru
Guru


Joined: 27 Nov 2005
Posts: 361
Location: Bielefeld, Germany

PostPosted: Tue Jan 30, 2007 8:37 pm    Post subject: Reply with quote

maybe it could help if you have a look at my world file. i will upload it, too.
i cant figure out, where a problem could be...
you can find it (like the /etc/profile) here.
_________________
The message is Feierei, alder! The message is Gude Laune, alder! [Sven]
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Wed Jan 31, 2007 3:40 am    Post subject: Reply with quote

I see nothing obviously wrong with your world file even after looking at it sorted.
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
zmedico
Developer
Developer


Joined: 02 Jan 2004
Posts: 352
Location: California USA

PostPosted: Wed Jan 31, 2007 10:33 pm    Post subject: Re: recovering after crash Reply with quote

pholthau wrote:

Traceback (most recent call last):
File "/usr/bin/emerge", line 5270, in ?
retval = emerge_main()
File "/usr/bin/emerge", line 5265, in emerge_main
myopts, myaction, myfiles, spinner)
File "/usr/bin/emerge", line 4732, in action_build
retval = mergetask.merge(pkglist, favorites, mtimedb)
File "/usr/bin/emerge", line 2980, in merge
prev_mtimes=ldpath_mtimes)
File "/usr/lib/portage/pym/portage.py", line 3674, in doebuild
vartree=vartree, prev_mtimes=prev_mtimes)
File "/usr/lib/portage/pym/portage.py", line 3882, in merge
mydbapi=mydbapi, prev_mtimes=prev_mtimes)
File "/usr/lib/portage/pym/portage.py", line 7723, in merge
cleanup=cleanup, mydbapi=mydbapi, prev_mtimes=prev_mtimes)
File "/usr/lib/portage/pym/portage.py", line 7133, in treewalk
slot_matches = self.vartree.dbapi.match(
File "/usr/lib/portage/pym/portage.py", line 5169, in match
mymatch = [cpv for cpv in mymatch \
File "/usr/lib/portage/pym/portage.py", line 5262, in aux_get
for k, v in izip(aux_keys, self._aux_get(mycpv, aux_keys)):
File "/usr/lib/portage/pym/portage.py", line 5275, in _aux_get
raise KeyError(mycpv)
KeyError: 'net-wireless/ipw3945d-1.7.22-r4'


That KeyError is thrown because some IOError occurs when accessing the directory located at '/var/db/pkg/net-wireless/ipw3945d-1.7.22-r4'. You need to fix whatever filesystem or disk corruption is there.
_________________
Zac
Back to top
View user's profile Send private message
zlin
Retired Dev
Retired Dev


Joined: 05 Dec 2005
Posts: 35
Location: Aalborg, Denmark

PostPosted: Wed Jan 31, 2007 11:42 pm    Post subject: Reply with quote

pholthau wrote:
EDIT another question (though i guess the answer is no): is it possible/recommended to extract a recent stage3 tarball to overwrite possibly damaged files?

Certainly not! http://dev.gentoo.org/~marienz/stage-tarball-is-not-a-rescue-tarball.txt
Back to top
View user's profile Send private message
pholthau
Guru
Guru


Joined: 27 Nov 2005
Posts: 361
Location: Bielefeld, Germany

PostPosted: Thu Feb 01, 2007 8:04 am    Post subject: Re: recovering after crash Reply with quote

zmedico wrote:

That KeyError is thrown because some IOError occurs when accessing the directory located at '/var/db/pkg/net-wireless/ipw3945d-1.7.22-r4'. You need to fix whatever filesystem or disk corruption is there.


I think i found a solution (at least for the ipw3945d program). '/var/db/pkg/net-wireless/ipw3945d-1.7.22-r4' was a _file_ instead of a directory. Removing it did help. The package emerged fine. Wireless is back to work.

Thank you all for your hints and tips. I certainly will reinstall next week. Maybe there are some other things broken, so lets stay on the safe side.
_________________
The message is Feierei, alder! The message is Gude Laune, alder! [Sven]
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