View previous topic :: View next topic |
Author |
Message |
ChiaJesus n00b
Joined: 08 Jun 2002 Posts: 51
|
Posted: Sat Sep 06, 2003 8:23 pm Post subject: Deleted /var :( |
|
|
Hello,
Well I just did a really stupid thing. While trying to rearrange partitions on one of my hard drive I accidently wiped out my /var partition. Grrrr. I can't believe I did that! Needless to say I'm having a few MAJOR problems here. Is there any way of building the var structure back without having to resort to reinstalling? Does anyone have any ideas? Thanks! And sorry if this looks a little strange - I'm using Lynx to post this and I'
not too sure how well its going to turn out.
-Chia |
|
Back to top |
|
|
Jeedo Apprentice
Joined: 02 May 2003 Posts: 202 Location: Akureyri, Iceland
|
Posted: Sat Sep 06, 2003 8:58 pm Post subject: |
|
|
you could uncompress only the /var folders of the stagex tarball by ediding the tarball
i think it can be done
tar --help |
|
Back to top |
|
|
ChiaJesus n00b
Joined: 08 Jun 2002 Posts: 51
|
Posted: Mon Sep 08, 2003 5:43 pm Post subject: |
|
|
Thanks for the suggestion. Unfortunately it didn't work. My system seems to be running OK except for a few minor quirks. Unfortunately since the qpkg database is toast Portage doesn't think I have anything installed. I have searched everywhere and it doesn't look like there really is a solution to that except for recompiling everything from scratch. I hope I'm wrong. |
|
Back to top |
|
|
_Nomad_ Guru
Joined: 11 Apr 2003 Posts: 571
|
Posted: Sat May 08, 2004 8:48 pm Post subject: lost /var |
|
|
I know that this is a dupe... But as the topics state I lost my /var partition... damn hdd broke down...
Anyway, I've read all about regenworld and qpkg -I -nc >/var/... But as I lost my entire /var partition neither of it works.
I've injected all the dependencies of kde and xfree and a few more so most of my packages should be in there by now. But I'm still wondering if anyone know of a way to rebuild the world file without /var/db/... as I probably missed quite a few. |
|
Back to top |
|
|
tomk Bodhisattva
Joined: 23 Sep 2003 Posts: 7221 Location: Sat in front of my computer
|
Posted: Sun May 09, 2004 12:33 pm Post subject: |
|
|
Have a look in /usr/share/doc/ most packages will put a directory in there with the package name and version, which you can use to inject them. It probably won't get every package, but most of them are there. _________________ Search | Read | Answer | Report | Strip
Last edited by tomk on Thu Jul 28, 2005 9:46 pm; edited 1 time in total |
|
Back to top |
|
|
_Nomad_ Guru
Joined: 11 Apr 2003 Posts: 571
|
Posted: Mon May 10, 2004 6:18 am Post subject: |
|
|
Thanks... I belive I have most of it back now |
|
Back to top |
|
|
xentric Guru
Joined: 16 Mar 2003 Posts: 410 Location: Netherlands
|
Posted: Sat Jun 12, 2004 6:11 pm Post subject: |
|
|
Read /etc/make.profile/packages to see what packages
belong to the "base" system profile and inject those too.
I have the same problem, lost the complete var partition.
(I needed some diskspace and removed my /var backup
just 5 minutes prior to losing the /var partition...)
I copied the /var directory from the LiveCD,
fixed the "locate database" and rebuilt some directories
by hand because I had some "ls output" on one of my
consoles... but I have lost a lot (website and cgi's) and
totally borked portage, but I'm going to see if this is
fixable before resorting to a clean install.
Thanks for the tip about /usr/share/doc ! _________________ When all else fails, read the manual...
Registered Linux User #340626 |
|
Back to top |
|
|
robmoss Retired Dev
Joined: 27 May 2003 Posts: 2634 Location: Jesus College, Oxford
|
Posted: Sun Jun 13, 2004 1:59 am Post subject: |
|
|
Once you reckon you've finished, do an "emerge -e world". That will regenerate /var/db for you properly. Then, once you've done that, use ecatmur's "cruft" script (search the forums) to look for files which don't belong to any package which portage installed. There'll be plenty, but some of them will belong to packages which you really DO want installed. Add those to your world file in the proper fashion by just re-emergeing them (trust me, it's easier in the long run to do it like that!).
Good luck... _________________ Reality is for those who can't face Science Fiction.
emerge -U will kill your Gentoo
ecatmur, Lord of Portage Bash Scripts |
|
Back to top |
|
|
Souperman Guru
Joined: 14 Jul 2003 Posts: 449 Location: Cape Town, South Africa
|
Posted: Mon Jun 14, 2004 8:01 am Post subject: |
|
|
I had the same problem. Let's just say experimenting with reiser4 and not making backups (I know, I know ) do not make for a pleasant experience.
I started the repair attempt with an emerge -e system and then started emerging stuff based on memory and the contents of /usr/share/doc. When I was done I still had this feeling in the back of my mind that I'd inevitably forgotten something so I just did a backup of a few dirs and started over from stage 1.
Lucky I didn't hose anything important. I really need to work out some sort of backup system. _________________ moo |
|
Back to top |
|
|
codergeek42 Bodhisattva
Joined: 05 Apr 2004 Posts: 5142 Location: Anaheim, CA (USA)
|
Posted: Tue Aug 10, 2004 9:25 pm Post subject: |
|
|
If you lost /var, perhaps you may want to use qpkg, as desribed in Gentoo FAQ GF16: https://forums.gentoo.org/viewtopic.php?t=136627 _________________ ~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF |
|
Back to top |
|
|
tomk Bodhisattva
Joined: 23 Sep 2003 Posts: 7221 Location: Sat in front of my computer
|
Posted: Tue Aug 10, 2004 10:11 pm Post subject: |
|
|
That doesn't work as qpkg uses the information from /var/db/pkg, same goes for regenworld which uses information from /var/log/emerge.log:
_Nomad_ wrote: | Anyway, I've read all about regenworld and qpkg -I -nc >/var/... But as I lost my entire /var partition neither of it works. |
_________________ Search | Read | Answer | Report | Strip |
|
Back to top |
|
|
codergeek42 Bodhisattva
Joined: 05 Apr 2004 Posts: 5142 Location: Anaheim, CA (USA)
|
Posted: Tue Aug 10, 2004 10:33 pm Post subject: |
|
|
tomk wrote: |
That doesn't work as qpkg uses the information from /var/db/pkg, same goes for regenworld which uses information from /var/log/emerge.log:
_Nomad_ wrote: | Anyway, I've read all about regenworld and qpkg -I -nc >/var/... But as I lost my entire /var partition neither of it works. |
| =( _________________ ~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF |
|
Back to top |
|
|
wangxiaohu Apprentice
Joined: 15 Nov 2003 Posts: 248
|
Posted: Sun Nov 07, 2004 10:21 pm Post subject: |
|
|
I have the same problem here. My /var is completed deleted during emerge sync.
I am not going to do anything with it. I think I want to install some other Linux distribution on this slow laptop, to overwrite Gentoo. However, I will keep Gentoo in my desktop...
I think portage system can have a new directory portage under /etc, and put a copy of world file there. So in case /var/lib/portage/world is lost or damaged, there is always a backup. |
|
Back to top |
|
|
bigbob73 Guru
Joined: 31 Dec 2004 Posts: 332 Location: Under the Lone Star
|
Posted: Mon Jan 16, 2006 10:03 pm Post subject: deleted /var |
|
|
subject says it all. I untared a stage 2 to another partition and copied /var back to my root, but I think that is far from a solution. any suggestions? _________________ A computers attention span is only as long as it's electrical cord (Murphy) |
|
Back to top |
|
|
frostschutz Advocate
Joined: 22 Feb 2005 Posts: 2977 Location: Germany
|
Posted: Mon Jan 16, 2006 10:22 pm Post subject: |
|
|
Reinstall? |
|
Back to top |
|
|
bigbob73 Guru
Joined: 31 Dec 2004 Posts: 332 Location: Under the Lone Star
|
Posted: Mon Jan 16, 2006 11:51 pm Post subject: |
|
|
frostschutz wrote: | Reinstall? |
Headed that way. Gives me a chance to re-arrange my disk. I'd like to try reiser4 and gcc 4. Incedently, most everything works, however world got borked. Portage wants to re-install a ton. It's probably as quick to start over.
Cheers! _________________ A computers attention span is only as long as it's electrical cord (Murphy) |
|
Back to top |
|
|
frostschutz Advocate
Joined: 22 Feb 2005 Posts: 2977 Location: Germany
|
Posted: Tue Jan 17, 2006 8:11 am Post subject: |
|
|
bigbob73 wrote: | I'd like to try reiser4 and gcc 4. Incedently, most everything works, however world got borked. Portage wants to re-install a ton. It's probably as quick to start over. |
It'd be safer to start over, if it weren't for the reiser4 and gcc4 part. *ducks&covers&runs away* |
|
Back to top |
|
|
bigbob73 Guru
Joined: 31 Dec 2004 Posts: 332 Location: Under the Lone Star
|
Posted: Tue Jan 17, 2006 12:25 pm Post subject: |
|
|
frostschutz wrote: | bigbob73 wrote: | I'd like to try reiser4 and gcc 4. Incedently, most everything works, however world got borked. Portage wants to re-install a ton. It's probably as quick to start over. |
It'd be safer to start over, if it weren't for the reiser4 and gcc4 part. *ducks&covers&runs away* |
I'll keep my old system as it's working pretty good. as for the other, it's fun to live on the edge! _________________ A computers attention span is only as long as it's electrical cord (Murphy) |
|
Back to top |
|
|
8-bitDesigner n00b
Joined: 14 Jan 2006 Posts: 25 Location: Orange, CA
|
Posted: Thu Feb 16, 2006 5:59 pm Post subject: Umm... yeah, I deleted my /var directory. |
|
|
Not the smartest of things, I've done, but regardless, I was swapping partitions around last night now that the new kernel finally supports my SATA VT6421 card properly, and moved /var to its own partition. Well, the partition fluked out and I had to reformat it, leaving me without a /var directory.
Which is bad.
I booted the live CD and copied its /var out to the new partition, but a handful of programs are complaining (soon to be silenced with the swift justice that is "emerge") and now my Portage updates take a fair bit longer than they should.
Is there any chance that I'm missing anything vital? As per my understanding, /var is for temporary-ish files and therefore isn't exceedinly important, but I could be completely bonkers here. Any ideas? |
|
Back to top |
|
|
Albert_g n00b
Joined: 02 Feb 2006 Posts: 60 Location: Somewhere over the ...
|
Posted: Thu Feb 16, 2006 6:02 pm Post subject: |
|
|
Hi
#emerge -e world
should help a lot
Albert. |
|
Back to top |
|
|
ecatmur Advocate
Joined: 20 Oct 2003 Posts: 3595 Location: Edinburgh
|
Posted: Thu Feb 16, 2006 6:06 pm Post subject: |
|
|
You'll have lost your world file (/var/lib/portage/world). Unfortunately you won't be able to restore it with regenworld because /var/log/emerge.log will be gone as well. I hope you remember how you set your system up.
You've lost /var/cache/edb/dep, which is why initial portage updates took a while; once the cache is regenerated things should be OK.
You've lost /var/db/pkg, which records the installed packages. This is not a good thing. The only way to recover it is to recreate your world file and run emerge -e world.
/var is worthy of backing up! _________________ No more cruft
dep: Revdeps that work
Using command-line ACCEPT_KEYWORDS? |
|
Back to top |
|
|
8-bitDesigner n00b
Joined: 14 Jan 2006 Posts: 25 Location: Orange, CA
|
Posted: Thu Feb 16, 2006 6:37 pm Post subject: |
|
|
Hmm... this is new and interesting news to me.
Bugger.
Okay, so I need to recreate my world file. I have a pretty good idea of how my system is set up, and could probably figure out which pakcages I have installed. So, do I re-emerge all my installed files to recreate this log, or is there a utility I can use for this?
Thanks for all the help! :) |
|
Back to top |
|
|
Albert_g n00b
Joined: 02 Feb 2006 Posts: 60 Location: Somewhere over the ...
|
Posted: Thu Feb 16, 2006 6:45 pm Post subject: |
|
|
hi
the world file is a text file with the name ( section/name) of the packages
so vi could be very handy here
you could also list the packages to a file and remove the unwanted ones ...
all deppends on how many you got.
Albert |
|
Back to top |
|
|
8-bitDesigner n00b
Joined: 14 Jan 2006 Posts: 25 Location: Orange, CA
|
Posted: Thu Feb 16, 2006 6:50 pm Post subject: |
|
|
List pakages to a file and then cull out the uninstalled ones? Well, I'm going to wager that's a lot of files, especially to cull through and pull out non-installed packages.
Do you know where I could find a copy of a world file? If the syntax is simple enough, I could just skim through and manually add the few files I have installed (less than 20 packages, I believe).
Cheers |
|
Back to top |
|
|
UncleOwen Veteran
Joined: 27 Feb 2003 Posts: 1493 Location: Germany, Hamburg
|
Posted: Thu Feb 16, 2006 6:54 pm Post subject: |
|
|
The syntax is really easy:
Code: | $ head -n 10 /var/lib/portage/world
net-analyzer/ethereal
media-sound/alsa-utils
games-emulation/dosbox
app-text/ghostview
games-fps/ut2004-redorchestra
x11-plugins/gaim-otr
media-libs/alsa-oss
gnome-extra/gnome-games
app-text/dos2unix
x11-apps/xmodmap |
|
|
Back to top |
|
|
|