[arch-general] /var lost, how "reinstal" Archlinux?
Hello, I've lost content of /var, other partitions are ok, so system somewhat boots up (to recovery mode). What is the less pain method to get it again up and running? The problem I see are pacman list of installed packages? Any other notes on what important things could be missing? Thank you very much for any help, Mark PS: no backups :-/ -- Marek Otahal :o)
In a slim install, you're unlikely to have lost much due to the nature of /var (only variable data, aka no "installed files"). If you had a database on disk you did lose that, eg postgres. Also firewall rules and all logs. Try pacman -Ql | grep /var to see what owns stuff in there. J. Leclanche On Thu, Apr 3, 2014 at 10:22 AM, Marek Otahal <markotahal@gmail.com> wrote:
Hello,
I've lost content of /var, other partitions are ok, so system somewhat boots up (to recovery mode). What is the less pain method to get it again up and running? The problem I see are pacman list of installed packages? Any other notes on what important things could be missing?
Thank you very much for any help, Mark
PS: no backups :-/
-- Marek Otahal :o)
Or better, check with the command that tests all packages' files for presence. # pacman -Qk | grep -v '0 missing files' cheers! mar77i
It might actually be easier to reinstall than to go through "pacmanning" everything that's been lost, individually. Sent from my iPhone
On 3 Apr 2014, at 10:28, Martti Kühne <mysatyre@gmail.com> wrote:
Or better, check with the command that tests all packages' files for presence.
# pacman -Qk | grep -v '0 missing files'
cheers! mar77i
On Thu, Apr 3, 2014 at 11:38 AM, Jeff Daniel Rollin-Jones <jeff.rollin@gmail.com> wrote:
It might actually be easier to reinstall than to go through "pacmanning" everything that's been lost, individually.
Do you mean `pacman -S $(pacman -Qq)`? cheers! mar77i
Am 03.04.2014 11:28, schrieb Martti Kühne:
Or better, check with the command that tests all packages' files for presence.
# pacman -Qk | grep -v '0 missing files'
LOL. Where do you think that information is stored? I'll give you a subtle hint: It's /var. OP is basically screwed. There is no easy way to get his stuff back into working order. There is not even an easy way to determine which packages have been installed.
On Thu, Apr 3, 2014 at 11:43 AM, Thomas Bächler <thomas@archlinux.org> wrote:
Am 03.04.2014 11:28, schrieb Martti Kühne:
Or better, check with the command that tests all packages' files for presence.
# pacman -Qk | grep -v '0 missing files'
LOL. Where do you think that information is stored? I'll give you a subtle hint: It's /var.
Now that you mention it... okay.jpg cheers! mar77i
On 03/04/14 05:22 AM, Marek Otahal wrote:
Hello,
I've lost content of /var, other partitions are ok, so system somewhat boots up (to recovery mode). What is the less pain method to get it again up and running? The problem I see are pacman list of installed packages? Any other notes on what important things could be missing?
Thank you very much for any help, Mark
PS: no backups :-/
You can install a fresh install on top of the old install by using `pacstrap`. I would boot up a live cd, move /etc to /etc_old, then remove all other top levels directories other than /home, and install again with pacstrap. The pacman database was in /var so there's little point in trying to reinstall the same packages, and it doesn't seem very important anyway - you'll remember what you used when it's missing, and it's trivial to install it again.
The pacman database was in /var so there's little point in trying to reinstall the same packages
What about software updates, security fixes, etc? ;-)
What is the less pain method to get it again up and running? The problem I see are pacman list of installed packages?
Although you don't know what packaged you had (/var lost), you may use /usr/bin/pkgfile to determine what package a file belongs to, e.g. % pkgfile /usr/lib/liblink-grammar.so extra/link-grammar Run this across all the files in /usr, /etc and others, and you have a list of the packages that need to be installed again. Note: you need pkgfile, which means you need it from pacman, which means you need to pacstrap. Daniel wrote how to do it. -- Kind regards, Damian Nowak StratusHost www.AtlasHost.eu
On 03/04/14 01:36 PM, Nowaker wrote:
The pacman database was in /var so there's little point in trying to reinstall the same packages
What about software updates, security fixes, etc? ;-)
Which is why I'm suggesting a reinstall with pacstrap.
What is the less pain method to get it again up and running? The problem I see are pacman list of installed packages?
Although you don't know what packaged you had (/var lost), you may use /usr/bin/pkgfile to determine what package a file belongs to, e.g.
% pkgfile /usr/lib/liblink-grammar.so extra/link-grammar
Run this across all the files in /usr, /etc and others, and you have a list of the packages that need to be installed again.
You won't have a list of which ones are explicit vs. implicit though. IMO there's not much harm in simply reinstalling base along with the packages are actually wanted. If nothing else, it's an involuntary spring cleaning.
On Thu, Apr 3, 2014 at 11:22 AM, Marek Otahal <markotahal@gmail.com> wrote:
Hello,
I've lost content of /var, other partitions are ok, so system somewhat boots up (to recovery mode). What is the less pain method to get it again up and running? The problem I see are pacman list of installed packages? Any other notes on what important things could be missing?
Thank you very much for any help, Mark
PS: no backups :-/
-- Marek Otahal :o)
If you have enough time, I would try using pkgfile to recover the installed packages. I thing something like this should suffice: # update the pkgfile database pkgfile -u # find the package names for all binaries find /usr/bin -type f -exec pkgfile '{}' ';' | uniq I assume that the libs would be installed as depends for the programs that has a binary in /usr/bin Lukas
On Thu, Apr 3, 2014 at 9:12 PM, Lukas Jirkovsky <l.jirkovsky@gmail.com> wrote:
If you have enough time, I would try using pkgfile to recover the installed packages. I thing something like this should suffice: # update the pkgfile database pkgfile -u # find the package names for all binaries find /usr/bin -type f -exec pkgfile '{}' ';' | uniq
Good idea. But just a little correction, use `sort` or else `uniq` will not work properly: find /usr/bin -type f -exec pkgfile '{}' ';' | sort | uniq -- Rodrigo
Am 04.04.2014 23:24, schrieb Rodrigo Rivas:
On Thu, Apr 3, 2014 at 9:12 PM, Lukas Jirkovsky <l.jirkovsky@gmail.com> wrote:
If you have enough time, I would try using pkgfile to recover the installed packages. I thing something like this should suffice: # update the pkgfile database pkgfile -u # find the package names for all binaries find /usr/bin -type f -exec pkgfile '{}' ';' | uniq
Good idea. But just a little correction, use `sort` or else `uniq` will not work properly:
find /usr/bin -type f -exec pkgfile '{}' ';' | sort | uniq
or use only "| sort -u" instead
I've lost content of /var, other partitions are ok, so system somewhat boots up (to recovery mode). What is the less pain method to get it again up and running?
If you have enough time, I would try using pkgfile to recover the installed packages. I thing something like this should suffice: # update the pkgfile database pkgfile -u # find the package names for all binaries find /usr/bin -type f -exec pkgfile '{}' ';' | uniq
I assume that the libs would be installed as depends for the programs that has a binary in /usr/bin
this seemed like a clever idea, so I gave it a try: 0. Adding -L to the 'find' helped slightly 1. For some binaries pkgfile returns a list, e.g. $ pkgfile /usr/bin/emacs extra/emacs community/emacs-nox on my system this is the case for 69 out of 2891 files under /usr/bin, with jack/jack2 and gcc/gcc-multilib responsible for 47 of that 69. So, just a bit of manual intervention is needed to select the appropriate package in these cases. 2. Some files in /usr/bin had no package that pkgfile could find. Most were from AUR, but there was also this: $ pkgfile /usr/bin/init.lxc $ pacman -Qo /usr/bin/init.lxc /usr/bin/init.lxc is owned by lxc 1:1.0.3-1 It seems the 'lxc' package installs 'init.lxc' into /usr/sbin, which symlinks to /usr/bin. Not knowing anything about how these tools work, I'm more surprised that 'pacman -Qo' figured this out, than I am that 'pkgfile' didn't. 3. Ultimately the packages that pkgfile computed from /usr/bin, along with their dependencies, represented about 94% of the packages on my system. The missing packages (listed below) were mostly: dependencies for things I've installed outside of pacman (e.g. AUR) gstreamer bits desktop/X-related (e.g. some fonts, themes) misc. perl modules Overall conclusion - potentially useful, and I hope I never have to deploy it in real life... Carl aspell-en docbook-xml docbook-xsl gstreamer0.10-base-plugins gstreamer0.10-ffmpeg gstreamer0.10-good gtk-engine-murrine gtk-engines gvfs-smb hunspell-en lib32-gcc-libs lib32-glib lib32-glibc lib32-libstdc++5 lib32-zlib libmspack libreoffice-extension-nlpsolver libreoffice-gnome libtracker-sparql libva-intel-driver libvisual licenses linux linux-firmware linux-headers man-pages mate-icon-theme mate-themes perl-io-socket-ssl perl-lwp-protocol-https perl-mozilla-ca perl-net-ssleay perl-text-csv perl-timedate ttf-arphic-uming ttf-baekmuk ttf-hannom ttf-sazanami ttf-tibetan-machine ttf-tlwg x11-ssh-askpass xaw3d xorg-fonts-type1
On Mon, Apr 14, 2014 at 11:03:52PM -0400, Carl Schaefer wrote:
2. Some files in /usr/bin had no package that pkgfile could find. Most were from AUR, but there was also this:
$ pkgfile /usr/bin/init.lxc $ pacman -Qo /usr/bin/init.lxc /usr/bin/init.lxc is owned by lxc 1:1.0.3-1
It seems the 'lxc' package installs 'init.lxc' into /usr/sbin, which symlinks to /usr/bin. Not knowing anything about how these tools work, I'm more surprised that 'pacman -Qo' figured this out, than I am that 'pkgfile' didn't.
It seems a packaging bug; I think that `configure' needs: --sbindir=/use/bin You should open a bug report. pkgfile reads the repo database so it cannot find /usr/bin/init.lxc; it's installed as /usr/sbin/init.lxc pacman (see pacman(8)): QUERY OPTIONS -o, --owns <file> Search for packages that own the specified file(s). The path can be relative or absolute and one or more files can be specified. So it it looks like every path/link is resolved before the search.
participants (12)
-
Alessandro Doro
-
Carl Schaefer
-
Daniel Micay
-
Jeff Daniel Rollin-Jones
-
Jerome Leclanche
-
Lukas Jirkovsky
-
Marek Otahal
-
Martti Kühne
-
Nowaker
-
Rodrigo Rivas
-
Simon Brand
-
Thomas Bächler