You are not logged in.

#1 2011-06-14 17:14:53

marian1
Member
Registered: 2011-06-14
Posts: 5

System overwrite

Hi,
I have a serious problem with the system - I accidentally ran rsync in the wrong way and instead copy the files to the remote server i copiedf from remote machine few system files and of course my system is now brok  (remote server is running gentoo so there is no compability).
https: / / wiki.archlinux.org / index.php / Pacman_Tips https: / / wiki.archlinux.org / index.php / Pacman
I was looking for anything meaningful in wiki but unfortunately I found nothing (I tried pacman -Syu, pacman -S $(pacman -Qeq) but still have some bin and config files from gentoo hmm)
Examples:

New password:
/ usr / lib / cracklib_dict.pwd.gz: No such file or directory
PWOpen: No such file or directory


:: Stopping the Secure Shell Daemon [FAIL]
:: Starting the Secure Shell Daemon [BUSY] PRNG is not seeded

What should I do?
m.

Last edited by marian1 (2011-06-14 17:15:18)

Offline

#2 2011-06-14 17:20:25

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: System overwrite

you can chroot into your system to rescue it.

Use a live cd and then install pacman using the -r flag. Once you have pacman, you can see if you can re-install the programs. however, how much of it you will be able to fix depends on how much you screwed up.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#3 2011-06-14 17:22:58

marian1
Member
Registered: 2011-06-14
Posts: 5

Re: System overwrite

Inxsible wrote:

you can chroot into your system to rescue it.

Use a live cd and then install pacman using the -r flag. Once you have pacman, you can see if you can re-install the programs. however, how much of it you will be able to fix depends on how much you screwed up.

I have working pacman but i do not quite know how to rebuild the system.

[root@rescue /]# pacman -Syy
:: Synchronizing package databases...
testing                                                                                                                                  70.5K   11.6M/s 00:00:00 [#####################################################################################################] 100%
core                                                                                                                                     36.9K   11.6M/s 00:00:00 [#####################################################################################################] 100%
extra                                                                                                                                   467.1K   11.3M/s 00:00:00 [#####################################################################################################] 100%
community-testing                                                                                                                        12.4K   12.1M/s 00:00:00 [#####################################################################################################] 100%
community                                                                                                                               446.6K   11.2M/s 00:00:00 [#####################################################################################################] 100%
[root@rescue /]# pacman -Syu
:: Synchronizing package databases...
testing is up to date
core is up to date
extra is up to date
community-testing is up to date
community is up to date
:: Starting full system upgrade...
there is nothing to do

Last edited by marian1 (2011-06-14 17:30:35)

Offline

#4 2011-06-14 18:41:30

Wey
Member
Registered: 2011-04-22
Posts: 217

Re: System overwrite

Hello marian,
try

pacman -Qk

it checks for missing files. Fix damaged packages if needed.

Next, use a script to identify obsolete files on your system not associated with any package. I like to use this one: http://archlinux.spider007.net/pacman-f … unowned.sh (credits to the authors).

Edit:
Note that pacman -Qk doesn't check file integrity. So it's aprecondition you already successfully run pacman -S $(pacman -Qqe). That may have failed if you have packages from the aur installed. in that case try this one:

pacman -S $(comm -23 <(pacman -Qqe) <((pacman -Qqm) | sort))

Also be aware that the suggestions above may fail if one of the packages in pacmans toolchain is corrupted. See the output of:

pactree -l pacman

Finally, process any pacnew and pacsave files on your filesystem, in case an important configuration file has been overwritten with gentoo's one.

Last edited by Wey (2011-06-14 19:33:25)

Offline

#5 2011-06-14 19:53:32

marian1
Member
Registered: 2011-06-14
Posts: 5

Re: System overwrite

Wey wrote:

Hello marian,
try

pacman -Qk

All seems to be ok here.

Next, use a script to identify obsolete files on your system not associated with any package. I like to use this one: http://archlinux.spider007.net/pacman-f … unowned.sh (credits to the authors).

Edit:
Note that pacman -Qk doesn't check file integrity. So it's aprecondition you already successfully run pacman -S $(pacman -Qqe). That may have failed if you have packages from the aur installed. in that case try this one:

pacman -S $(comm -23 <(pacman -Qqe) <((pacman -Qqm) | sort))

I dont use packages from aur but still I get some errors here.

pacman -S $(pacman -Qqe)
Targets (133): linux-api-headers-2.6.39.1-1  tzdata-2011g-1  glibc-2.14-2  attr-2.4.46-1  acl-2.2.51-1  zlib-1.2.5-3  gcc-libs-4.6.0-7  pcre-8.12-1  apache-2.2.19-1  ncurses-5.9-1  readline-6.2.001-1  bash-4.2.010-1  atop-1.26-1  bind-9.8.0.P2-1  binutils-2.21-9
               bzip2-1.0.6-1  db-5.1.25-1  cracklib-2.8.18-1  pam-1.1.3-1  shadow-4.1.4.3-1  coreutils-8.12-3  cpio-2.11-2  dash-0.5.6.1-2  filesystem-2011.04-1  dbus-core-1.4.8-1  dcron-4.5-2  util-linux-2.19.1-2  pciutils-3.1.7-4  udev-171-2  device-mapper-2.02.85-2
               dhcpcd-5.2.12-1  dialog-1.1_20110302-1  diffutils-3.0-2  dnsutils-9.8.0.P2-1  e2fsprogs-1.41.14-1  ekg-1.7-6  ekg2-0.3.0-2  file-5.07-3  findutils-4.4.2-3  gawk-3.1.8-2  gcc-4.6.0-7  gdbm-1.8.3-8  gen-init-cpio-2.6.36-1  gettext-0.18.1.1-3  grep-2.8-1
               perl-5.14.0-1  groff-1.21-1  sed-4.2.1-3  grub-0.97-17  gzip-1.4-2  hdparm-9.37-1  htop-0.9-2  iproute2-2.6.38-3  kbd-1.15.3-1  sysvinit-2.88-2  initscripts-2011.06.4-1  iptables-1.4.10-1  iptraf-ng-1.0.2-2  sysfsutils-2.1.0-6  iputils-20101006-1
               irssi-0.8.15-5  jfsutils-1.1.15-2  less-443-2  lftp-4.2.3-1  libarchive-2.8.4-2  libfetch-2.33-3  libgpg-error-1.9-3  libgcrypt-1.4.6-3  libpcap-1.1.1-2  libusb-1.0.8-1  licenses-2.8-1  links-2.3pre2-1  popt-1.16-3  logrotate-3.7.9-1  lsof-4.84-3
               lvm2-2.02.85-2  lynx-2.8.7-4  lzo2-2.05-1  make-3.82-3  man-db-2.6.0.2-2  man-pages-3.32-1  mc-4.7.5.2-1  mdadm-3.2.1-3  which-2.20-4  mkinitcpio-0.6.14-1  mlocate-0.24-1  mysql-5.5.13-1  nano-2.2.6-1  net-tools-1.60-18  nmap-5.51-1  ntp-4.2.6.p3-3
               oidentd-2.0.8-4  tcp_wrappers-7.6-12  openssh-5.8p2-7  pacman-mirrorlist-20110324-1  pacman-3.5.3-1  pam-krb5-4.4-2  patch-2.6.1-2  perl-text-iconv-1.7-6  php-5.3.6-4  php-apache-5.3.6-4  php-curl-5.3.6-4  php-embed-5.3.6-4  php-gd-5.3.6-4
               php-geoip-1.0.7-2  php-gmp-5.3.6-4  php-mcrypt-5.3.6-4  php-memcache-3.0.6-1  php-pear-5.3.6-4  php-suhosin-0.9.32.1-1  phpmyadmin-3.4.2-1  postfix-2.8.3-3  procinfo-ng-2.0.304-2  procps-3.2.8-3  psmisc-22.13-1  quota-tools-3.17-2  reiserfsprogs-3.6.21-3
               rpmextract-1.0-4  rsync-3.0.8-2  screen-4.0.3-11  sdparm-1.06-1  strace-4.6-1  syslog-ng-3.2.4-1  tar-1.26-1  unrar-4.0.7-1  unzip-6.0-5  usbutils-002-3  vi-1:050325-1  vim-7.3.206-1  wget-1.12-7  whois-5.0.11-1  xfsprogs-3.1.5-1  zsh-4.3.12-1

Total Download Size:    0.00 MB
Total Installed Size:   533.67 MB
(  3/133) upgrading glibc                                                                                                                                          [#####################################################################################################] 100%
init: /dev/initctl: No such file or directory
Generating locales...
Generation complete.             
 20/133) upgrading shadow                                                                                                                                         [#####################################################################################################] 100%
warning: directory permissions differ on etc/cron.daily/
filesystem: 750  package: 755
Fixing gshadow file ...                                                                                                                                    [#####################################################################################################] 100%
( 24/133) upgrading filesystem                                                                                                                                     [#####################################################################################################] 100%
groupadd: GID '19' already exists
chage: user 'ftp' does not exist in /etc/passwd                                                                                                                                   [#####################################################################################################] 100%
( 26/133) upgrading dcron                                                                                                                                          [#####################################################################################################] 100%
warning: directory permissions differ on etc/cron.daily/
filesystem: 750  package: 755                                                                                                                                    [#####################################################################################################] 100%
( 29/133) upgrading udev                                                                                                                                           [#####################################################################################################] 100%
ATTENTION UDEV:
---------------
Arch's custom blacklisting logic has been removed. MOD_AUTOLOAD and
blacklisting in MODULES no longer works.
See 'man modprobe.conf' for a replacement to blacklisting.
To disable a module mod1 on the kernel command line, use
mod1.disable=1
or
modprobe.blacklist=mod1
  --
The following modules are no longer unconditionally loaded:
  pcspkr irtty-sir analog lp ppdev ide-generic
Add them to MODULES in rc.conf if you need them.
---------------
( 46/133) upgrading perl                                                                                                                                           [#####################################################################################################] 100%
- The directories /usr/lib/perl5/current, /usr/lib/perl5/site_perl/current,
  /usr/lib/perl5/site_perl/5.10.1, and /usr/share/perl5/site_perl/5.10.1
  have been removed from @INC.
- The script/binary directories are now /usr/bin/*_perl instead of
  /usr/lib/perl5/*_perl/bin which will be eventually removed.
( 55/133) upgrading sysvinit                                                                                                                                       [#####################################################################################################] 100%
init: /dev/initctl: No such file or directory
error: command failed to execute correctly
( 74/133) upgrading logrotate                                                                                                                                      [#####################################################################################################] 100%
warning: directory permissions differ on etc/cron.daily/
filesystem: 750  package: 755
postalias: fatal: open /etc/aliases: No such file or directory

Also be aware that the suggestions above may fail if one of the packages in pacmans toolchain is corrupted. See the output of:

pactree -l pacman

Finally, process any pacnew and pacsave files on your filesystem, in case an important configuration file has been overwritten with gentoo's one.

[root@rescue ~]# pactree -l pacman
pacman
bash
readline
glibc
linux-api-headers
tzdata
ncurses
glibc
glibc
libarchive
zlib
glibc
bzip2
glibc
xz
bash sh
acl
attr
glibc
openssl
perl
gdbm
glibc
bash sh
db
gcc-libs
glibc
bash sh
coreutils
glibc
shadow
bash
pam
glibc
db
cracklib
glibc
zlib
pam
acl
gmp
gcc-libs
bash sh
libcap
glibc
attr
glibc
bash sh
expat
glibc
libfetch
openssl
pacman-mirrorlist

Last edited by marian1 (2011-06-14 19:54:06)

Offline

#6 2011-06-14 20:21:26

Wey
Member
Registered: 2011-04-22
Posts: 217

Re: System overwrite

As Inxsible suggested, try to use an linux medium that has a working pacman on it (live cd, official installation cd). Mount your broken arch, then invoke the sane pacman specifying your mountpoint:

pacman --root /mnt/ -S $(pacman --root /mnt/ -Qqe)

Though, you may still need to deal with some of the errors manually.

Offline

#7 2011-06-14 20:48:42

marian1
Member
Registered: 2011-06-14
Posts: 5

Re: System overwrite

Unfortunately I dont have the possibility to boot system directly from the ISO image in OVH.
I am surprised that there is no possibility of simply overwriting whole packages as it happens during installation.
Thanks for your help

Offline

#8 2011-06-14 21:42:55

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: System overwrite

marian1 wrote:

i copiedf from remote machine few system files

Do you know which files were copied?

Offline

#9 2011-06-14 23:24:10

marian1
Member
Registered: 2011-06-14
Posts: 5

Re: System overwrite

tomk wrote:
marian1 wrote:

i copiedf from remote machine few system files

Do you know which files were copied?

Most files in /bin/ and /etc/.
Every attempt to replace or update packages through pacman gives nothing.
Now think about install base system on my local computer and then copy everything on the server of course without /etc/fstab, kernel, etc.

Offline

#10 2013-04-11 18:18:49

mrded
Member
Registered: 2013-04-11
Posts: 1

Re: System overwrite

You should create the word indexes that get used by CrackLib.

create-cracklib-dict /usr/share/dict/*
mkdict /usr/share/dict/* | packer /usr/lib/cracklib_dict

These commands should create the following files:

/usr/lib/cracklib_dict.hwm
/usr/lib/cracklib_dict.pwd
/usr/lib/cracklib_dict.pwi

Offline

#11 2013-04-11 18:40:28

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,642

Re: System overwrite

mrded,

Welcome to Arch Linux.  Watch the date on threads.  Linux changes fast in Linux and todays solutions might not be relevant to yesteryear's problems.  I don't think the OP is even still around.

If you should have a something related to an old thread, feel free to open a new thread and link back to the ancient one for reference.  Thanks.
Our Policy
Closing.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB