Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
recovering a broken gentoo system (missing files)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
azo
n00b
n00b


Joined: 30 Jul 2007
Posts: 5

PostPosted: Fri Jun 12, 2009 10:08 am    Post subject: recovering a broken gentoo system (missing files) Reply with quote

Hello,

I'm using gentoo for a few years now. Yesterday I've tried to install Ubuntu on some other partition and accidentally specifed the partition on which gentoo is installed. I haven't marked the partition to be formated and I've discovered the mistake fairly quickly. I've ended up with a partial gentoo system - not everything is missing (the only two things I don't see are /etc and /boot). It also seems that all the applications remained installed.

I'm now wondering, what's the best way to recover the system? I'd like to keep all the old files as I have some applications that cannot be installed.

What would be the fastest way to get a working system while keeping the present files?
Back to top
View user's profile Send private message
MaximeG
l33t
l33t


Joined: 15 Apr 2008
Posts: 722
Location: Belgium

PostPosted: Fri Jun 12, 2009 11:27 am    Post subject: Reply with quote

Hi,

For the /boot tree, it will be fairly straightforward.

But for the /etc one, it will be harder. It was containing almost all your configuration files.
Perhaps with re-unzipping a stage tarball, you may recover your start/default config files.

What do you mean by applications cannot be installed by the way ?

Regards,
Maxime
_________________
Future is wide open.
Back to top
View user's profile Send private message
g.e.n.t.u.x.
Guru
Guru


Joined: 21 Aug 2006
Posts: 410
Location: Berlin

PostPosted: Fri Jun 12, 2009 11:49 am    Post subject: Reply with quote

what u cant see u cant keep, cant u? maybe u use the ubuntu partition to extract a stageball and copy the /etc from this to your targat partion. in this moment u have the configuration files from the main system. after that is revdep-rebuild and emerge -uNe World your best friend. i cant imagine that portage/emerge has an way to only get the etc files seperatly.

take a backup after that and dont forget the make.conf. me know why. i have sitting two times for the same system use collection.
Back to top
View user's profile Send private message
dastergon
Developer
Developer


Joined: 22 May 2009
Posts: 12

PostPosted: Fri Jun 12, 2009 11:57 am    Post subject: Reply with quote

you can recover your partition with the 'testdisk' program. But some files may be corrupted. check here : http://www.cgsecurity.org/wiki/TestDisk
Back to top
View user's profile Send private message
g.e.n.t.u.x.
Guru
Guru


Joined: 21 Aug 2006
Posts: 410
Location: Berlin

PostPosted: Fri Jun 12, 2009 12:01 pm    Post subject: Reply with quote

Quote:
you can recover your partition with the 'testdisk' program. But some files may be corrupted. check here : http://www.cgsecurity.org/wiki/TestDisk


when he can install these software you are right
Back to top
View user's profile Send private message
azo
n00b
n00b


Joined: 30 Jul 2007
Posts: 5

PostPosted: Fri Jun 12, 2009 3:05 pm    Post subject: Reply with quote

I don't need to receover the old files I just want to be able to install the removed files and get a working system.

I booted a liveCD and untared all the missing files into the broken system. Then I wanted to proceed as written in the installation handbook, but emerge doesn't want to work:

If I want to emerge something, I get an error

Code:

Traceback (most recent call last):
  File "/usr/bin/emerge", line 6971, in ?
    retval = emerge_main()
  File "/usr/bin/emerge", line 6965, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/bin/emerge", line 6232, in action_build
    retval, favorites = mydepgraph.select_files(myfiles)
  File "/usr/bin/emerge", line 2112, in select_files
    if not self.validate_blockers():
  File "/usr/bin/emerge", line 2563, in validate_blockers
    blocker_cache.flush()
  File "/usr/bin/emerge", line 1327, in flush
    cPickle.dump(self._cache_data, f, -1)
cPickle.PicklingError: Can't pickle <type 'method-wrapper'>: attribute lookup __builtin__.method-wrapper failed


Any clues?
Back to top
View user's profile Send private message
g.e.n.t.u.x.
Guru
Guru


Joined: 21 Aug 2006
Posts: 410
Location: Berlin

PostPosted: Fri Jun 12, 2009 4:17 pm    Post subject: Reply with quote

what for an system u got.

please post make.conf and look for /usr/portage/profile(s)/ if it exist and cotains something. are you sure that no libraries has leave the root tree?

please install a minimal system from livecd at another partition and copie all to the root partition. then emerge is ok and a emerge -uNe world functionize and you are with the same system. as alternativ way.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing 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