You are not logged in.

#1 2013-09-01 20:04:04

Dorian_Hawkmoon
Member
Registered: 2013-09-01
Posts: 18

Reinstall a part of Arch [Resolved]

Hi everyone!

I have a laptop with a ssd, so I separate /var and /tmp to another disc. I don't know what happened, but those partitions became corrupted. I made a fsck with --rebuild-tree and copied /var from an arch's cd live.

Now, I can start the graphics and login in, but I can't start wicd so I have no internet. The worst part is pacman don't works, always show "database file for 'multilib' does not exist" (and another repository). I can't install, update or something and solutions I have read don't work.

I don't want to reinstall the system, so my idea is to reinstall only /var. If I can, how I should make this?
Another option is install arch in a partition and copy the /var folder to my system. It will work?

Any ideas?

Last edited by jasonwryan (2013-09-01 23:19:58)

Offline

#2 2013-09-01 20:22:59

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,548
Website

Re: Reinstall a part of Arch [Resolved]

Have you tried `pacman -Syyu`, that will recreate the missing databases, if that is the only issue.

Then use `pacman -Qk` to see what is missing.  (edit, nevermind this one, this will fail).

EDIT: Syyu will recreate the sync database and allow you to (re)install packages, but there is no way to reconstruct your local database aside from reinstalling everything from memory.  You could also get pacman up and running, then look for unmanaged files (there will be a lot of them), then identify which package they would belong to, then reinstall that package.  I suspect a small script or a complex one-liner could do this.

Last edited by Trilby (2013-09-01 20:58:53)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2013-09-01 20:35:11

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Reinstall a part of Arch [Resolved]

/var is very installation specific. That is, what is in my /var will certainly not mirror what is I. your /var, nor will you have matching /var's between two of your own machines. So copying /var from something like archiso is not the best idea in the world.

You might be able to get the basic file system heirarcy back by reinstalling all packages that are on your system. The problem there is that the list of installed packages (used to) live in /var/lib/pacman/, so you are likely going to have to just try to remember what packages you have installed. I like to have a periodic cron job write a list of all installed packages periodically, which I keep in bit torrent sync (I used to use dropbox).

Offline

#4 2013-09-01 21:19:42

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,893
Website

Re: Reinstall a part of Arch [Resolved]

There is Xyne's package detection script which can generate a list of packages based on what's on your system, not sure how well it will work though.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2013-09-01 23:17:57

Dorian_Hawkmoon
Member
Registered: 2013-09-01
Posts: 18

Re: Reinstall a part of Arch [Resolved]

Trilby, 'pacman -Syyu' didn't work, I have to change few directions in mirrorlist with their ip (like google.com ->8.8.8.8), but then i had problem with gpg and sign. Solved it and fixed the original problem with databases.

But the problems still continues, can't install anything, almost all of the packages installed seems lost, error with mtab existing, a very high list of directories conflicting... I have to admit that the system is too damaged, so I will reinstall archlinux.

WonderWoofy, thank you, i use cron (forget to configure this ocasion), but using an online sync seems a great idea!

WorMzy, in my case that package don't work, but thank anyway.

I close this thread (If I can). Thank you for the replies!

PD: I'm not a native English, sorry if I made mistakes ^^U

Offline

Board footer

Powered by FluxBB