You are not logged in.

#1 2013-06-04 12:32:49

saalty
Member
Registered: 2012-04-06
Posts: 90

Deleted /usr/bin files

Hi all

Yesterday accidentaly I deleted most of files from /usr/bin directory (including pacman), and my system crached. I tried to copy the content of this directory from LiveCD, and my system is booting but not started because some of errors. Is there any way to restore my system or I must reinstall? I found the topic from a few years ago about this problem, but as I wrote pacman is missing too.

Offline

#2 2013-06-04 13:16:41

jakobcreutzfeldt
Member
Registered: 2011-05-12
Posts: 1,042

Re: Deleted /usr/bin files

saalty wrote:

not started because some of errors.

Fascinating. Some errors, you say?

Would you care to enlighten us as to what the errors might say? How else are we to help you?

edit: Sorry, that attitude wasn't very constructive. But please do tell us what errors you actually saw, otherwise we can't really know what's going on

Last edited by jakobcreutzfeldt (2013-06-04 13:41:37)

Offline

#3 2013-06-04 13:38:24

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: Deleted /usr/bin files

What I would do is mount in a live environment. Extract packages under /tmp. Copy the files in the extracted usr/bin over.

mod action: Moving from Installation to Newbie Corner.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#4 2013-06-04 14:18:16

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: Deleted /usr/bin files

boot install cd, mount stuff to /mnt, pacman -r /mnt -Qkq | pacman -r /mnt -Syu -


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#5 2013-06-04 15:34:49

saalty
Member
Registered: 2012-04-06
Posts: 90

Re: Deleted /usr/bin files

Thank you for replies. I started to work on it, but after the installation of conky I got an error like

 error: target not found: /mnt/usr/bin/[ 

I don't know which package is needed. Any idea?

Last edited by saalty (2013-06-04 15:46:50)

Offline

#6 2013-06-04 16:23:37

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: Deleted /usr/bin files

what I said should solve it

But there is ofcourse also pkgfile and pacman -Qo

Last edited by Mr.Elendig (2013-06-04 16:23:55)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#7 2013-06-04 20:23:11

saalty
Member
Registered: 2012-04-06
Posts: 90

Re: Deleted /usr/bin files

Thank you, I'm over with package reinstallation. When I restart my laptop this error is happen:

 INIT: Entering runlevel: 3 
/etc/rc.multi: /etc/rc.multi: cannot execute binary file 

I couldn't update filesystem package, others are done....

Offline

#8 2013-06-04 20:30:45

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,680

Re: Deleted /usr/bin files

*sigh*

What would posses you to reboot before installing the filesystem package. I hope you have a boot disk handy.

And what are you still doing running initscripts?

Online

#9 2013-06-05 09:32:21

saalty
Member
Registered: 2012-04-06
Posts: 90

Re: Deleted /usr/bin files

Finally I think the best way is to reinstall the system, but I broked my system accidentally because of the new "rule" that all binaries must be in /usr/bin....This is not really clear to me, I'm using arch linux for a few years but I'm not a linux expert. so if I reinstall the system,  may I install few packages what I installed from AUR (tint2-svn, evince2-light, e4rat) like before or I must change something, and if yes what?

Offline

#10 2013-06-05 09:51:00

crazyg4merz
Member
Registered: 2013-04-14
Posts: 40

Re: Deleted /usr/bin files

I also deleted my /lib and /lib64 after upgrading the filesystem before. But managed to recover it using a live cd, mount the /dev/sda1 (which is my / folder) to /mnt and make a symlink from /mnt/var/cache/pacman/pkg to /var/cache/pacman/pkg (because I don't want to redownload the packages) and do a pacstrap -i /mnt base to reinstall the base packages and had my /lib and /lib64 folders recovered. Maybe u can try. Good luck :-)

Offline

#11 2013-06-05 10:36:19

saalty
Member
Registered: 2012-04-06
Posts: 90

Re: Deleted /usr/bin files

Thank you but I decided to reinstall. But I don't know if I want to use the mentioned packages from AUR should I chnage something during installation

Offline

#12 2013-06-05 10:56:42

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,386
Website

Re: Deleted /usr/bin files

The PKGBUILD should all be updated to put binaries in the /usr/bin directory. If they haven't, you should either contact the maintainer and let them know that they need to update it, and/or modify the PKGBUILD yourself.


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

#13 2013-06-05 11:14:02

saalty
Member
Registered: 2012-04-06
Posts: 90

Re: Deleted /usr/bin files

Than I need for yaourt in PKGBUILD modify what?

# Author: Julien MISCHKOWITZ <wain@archlinux.fr>
# Author: tuxce <tuxce.net@gmail.com>

pkgname=yaourt
pkgver=1.3
pkgrel=1
pkgdesc="A pacman wrapper with extended features and AUR support"
arch=('any')
url="http://www.archlinux.fr/yaourt-en/"
license=(GPL)
depends=('diffutils' 'pacman>=4.1' 'package-query>=1.0' 'gettext')
optdepends=('aurvote: vote for favorite packages from AUR'
      'customizepkg: automatically modify PKGBUILD during install/upgrade'
      'rsync: retrieve PKGBUILD from official repositories')
backup=('etc/yaourtrc')
source=(http://mir.archlinux.fr/~tuxce/releases/$pkgname/$pkgname-$pkgver.tar.gz)
md5sums=('972173967acd160c987c6dce15a431f8')

build() { 
  cd "$srcdir/$pkgname-$pkgver/"
  make PREFIX=/usr sysconfdir=/etc localstatedir=/var 
}

package() {
  cd "$srcdir/$pkgname-$pkgver/"
  make PREFIX=/usr sysconfdir=/etc localstatedir=/var DESTDIR="$pkgdir" install
}

# vim:set ts=2 sw=2 et:

Last edited by saalty (2013-06-05 11:43:58)

Offline

#14 2013-06-05 11:39:50

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,386
Website

Re: Deleted /usr/bin files

No, you've downloaded the wrong thing. Read this: https://wiki.archlinux.org/index.php/AUR paying particular attention to the "acquire build files" section.

If you have any more questions about building packages from the AUR, you should probably open a new topic, unless they directly relate to the /usr/bin merge.


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

#15 2013-06-05 11:45:00

saalty
Member
Registered: 2012-04-06
Posts: 90

Re: Deleted /usr/bin files

Sorry.... Please read my previous post

Offline

#16 2013-06-05 11:52:51

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,386
Website

Re: Deleted /usr/bin files

You don't need to modify anything, it doesn't place binaries in /bin, /sbin, or /usr/sbin.

What you should keep an eye out for, is configure flags like --bindir=/bin or --sbindir=/usr/sbin, or install statements like 'install -D -m755 filename "$pkgdir/usr/sbin/filename"'. You don't need to worry, most active packages will (hopefully) have already been updated if they needed to be.


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

#17 2013-06-05 12:03:36

saalty
Member
Registered: 2012-04-06
Posts: 90

Re: Deleted /usr/bin files

Thank you !!!

Offline

#18 2013-06-05 12:31:16

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,386
Website

Re: Deleted /usr/bin files

WorMzy wrote:

The PKGBUILD should all be updated to put binaries in the /usr/bin directory. If they haven't, you should either contact the maintainer and let them know that they need to update it, and/or modify the PKGBUILD yourself.

Actually, in a bid to satisfy my own curiosity, I tried installing an old package that places binaries in the /usr/sbin, and it installed fine. So it seems that you don't need to worry about it at all.

If you find packages that place binaries in the depreciated locations, you could still ask the maintainer to fix them, but, assuming that you're on a system that already has the up-to-date filesystem package installed, it won't cause any problems if they don't.


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

#19 2013-06-05 14:53:01

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,283

Re: Deleted /usr/bin files

WorMzy wrote:

If you find packages that place binaries in the depreciated locations, you could still ask the maintainer to fix them, but, assuming that you're on a system that already has the up-to-date filesystem package installed, it won't cause any problems if they don't.

It *will* cause problems once pacman 4.2 is released, since it won't install files through symlinks. So they will have to be fixed anyway sooner or later.

Offline

#20 2013-06-05 14:59:08

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,386
Website

Re: Deleted /usr/bin files

I wasn't aware of that, thanks for the heads up.


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

Board footer

Powered by FluxBB