You are not logged in.

#1 2015-08-15 00:12:01

bmentink
Member
From: New Zealand
Registered: 2009-08-23
Posts: 442

System borked after pacman -Syu

Hi All,

Just did a system upgrade and now I can't boot with "failed to execute /init" in grub.

So, I am trying to rescue it by booting up an Arch boot USB stick and have chroot'ed in using systemd-nspawn -D /mountpoint
I have tried doing a "mkinitcpio -p linux" and that suceeds fine ...

I tried doing a "pacman -S base" but that fails with "error: extract: not overwriting dir with file /usr/lib64"

Bit of hystory before the upgrade.
I had installed the Adobe flash player, by extracting the downloaded tarball to /usr which borked a whole lot of permissions on /usr.. i get:

warning: directory permissions differ on /usr
filesystem: 775 package: 755

Maybe that issue has effected the new building of the initram device ..

I tried fixing all the permissions, but there are obviously some left ...

Anyone have any suggestions while I am in the chroot?

Offline

#2 2015-08-15 00:39:21

Silkworm205
Member
From: UK
Registered: 2012-05-21
Posts: 267

Re: System borked after pacman -Syu

Assuming permissions were set on the directories non-recursively, you could get a live system and duplicate the permissions set on each folder manually.
If they were set recursively, or any subfolders have had permissions modified, you're in for a bad time.
Maybe try forcing pacman to install the base group? The force flag is dangerous, so make sure you're careful with it, and that the pacman package list is up to date.


I think I know enough to know I don't know enough.

Offline

#3 2015-08-15 00:48:09

bmentink
Member
From: New Zealand
Registered: 2009-08-23
Posts: 442

Re: System borked after pacman -Syu

Tried pacman -S --force base, and I get the same error regarding /usr/lib64

I am a bit at a loss ..

Offline

#4 2015-08-15 00:57:51

bmentink
Member
From: New Zealand
Registered: 2009-08-23
Posts: 442

Re: System borked after pacman -Syu

Fixed it!!

I got rid of the affending /usr/lib64 directory as it only contained a lib installed from the adobe install I did .. nothing else was in there ..
I then did a "pacman -S base", exited the chroot, unmounted my root directory, and rebooted ... all good.

I still need to fix permissions in /usr somehow, though. I wish I could think of a script that went though and changed the offending ones for me ...

Thanks, marking this thread as solved.

EDIT: My network is not longer working. Is there something that has to be re-done after the base install?

Last edited by bmentink (2015-08-15 01:08:24)

Offline

#5 2015-08-15 11:33:29

CjStaal
Member
Registered: 2015-06-01
Posts: 14

Re: System borked after pacman -Syu

Why don't you use sudo chown to fix the perms on the offending directories?

Offline

#6 2015-08-15 20:23:29

bmentink
Member
From: New Zealand
Registered: 2009-08-23
Posts: 442

Re: System borked after pacman -Syu

CjStaal wrote:

Why don't you use sudo chown to fix the perms on the offending directories?

Because if I "sudo chmod 755 /usr -R" then It stuffs up some executables in /usr/bin that need 4755 permissions like "sudo" itself, which I found out the hard way.
I then had to log back in as root and fix sudo .. there was also some other programs that no longer ran because they needed 4755 permissions ..

As far as I can tell, all the sub directories of /usr have the correct permissions, I suspect it is just one file somewhere causing the issue, but I can't see it on manual inspection ..

Offline

#7 2015-08-15 21:32:29

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: System borked after pacman -Syu

I'm sure I've seen some one-liner involving pacman -Q and pacman -S - which reinstalls all packages, either here or on the wiki. This would fix all your problems in few minutes, provided that pacman is operational.

Last edited by mich41 (2015-08-15 21:33:41)

Offline

#8 2015-08-17 07:41:41

bmentink
Member
From: New Zealand
Registered: 2009-08-23
Posts: 442

Re: System borked after pacman -Syu

Thanks,

I tried

 # pacman -Qenq | pacman -S - 

But the reinstall did not help, still the same error. Still at a loss on how to fix.

Offline

#9 2015-08-17 12:07:23

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: System borked after pacman -Syu

This only reinstalls manually installed packages, not all. You probably need to drop -e. IIRC manual reinstallation of an already installed package doesn't mark this package as manually installed so it should be safe, although you may want to verify this on some single package first smile.

Reinstallation of everything should fix all wrong permissions and missing files in /usr so if something still won't work afterwards (e.g. network) then it must be a matter of config files in /etc or maybe kernel bug pulled by the update.

Offline

#10 2015-08-17 15:14:00

Silkworm205
Member
From: UK
Registered: 2012-05-21
Posts: 267

Re: System borked after pacman -Syu

I don't think pacman overrides filesystem permissions. I once manually set /usr/share/backgrounds to be read/writable for my account so lightdm-ubuntu could display user wallpapers properly and any update that did something to it gave a message along the lines of

Warning: file permissions differ on package: gnome-wallpapers 755 /usr/share/background 775

It never changed the permissions. Which is a good thing as the only changes that would occur are ones set by users. Either accidentally or purposefully. tongue

Going to the network issue, do you have network manager installed? I'm not sure if it's part of base or not but all my installs have ended up with it. You may have to start the systemD module for it, i.e systemctl enable NetworkManager (case sensitive, that's the first one I've seen with capitals)

Last edited by Silkworm205 (2015-08-17 15:14:15)


I think I know enough to know I don't know enough.

Offline

#11 2015-08-17 17:35:19

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: System borked after pacman -Syu

That's interesting, I did few quick experiments and it seems that directory permissions indeed aren't restored, but file permissions are. I guess there must be deep reasons for that.

Anyway, the OP asked for some way to get a list of directories with wrong permissions and there it is smile

Offline

#12 2015-08-17 18:57:08

bmentink
Member
From: New Zealand
Registered: 2009-08-23
Posts: 442

Re: System borked after pacman -Syu

Hi Guys,

Thanks for all the replies.

My system is fully operational including the network, for some reason I had to re-enable the networkmanager service ..
So everything I can tell works, I only get the permission warning on /usr when I am installing stuff from pacman ..

I have checked all directories under /usr manually for 755 permissions, but going through every file is just too hard ..
I am reluctant to remove the -e from the pacman -Q command and restore everything as that could mean a lot of work re-installing stuff that I had installed in AUR or elsewhere ..

There must be a better way to search a filesystem (in this case just /usr and below) for all files having 775 permissions ....

Cheers,

Last edited by bmentink (2015-08-17 18:57:47)

Offline

#13 2015-08-17 22:01:10

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: System borked after pacman -Syu

bmentink wrote:

I had installed the Adobe flash player, by extracting the downloaded tarball to /usr which borked a whole lot of permissions on /usr..

That, sir, was an idiotic thing to do and is likely very closely related to the subsequent issues.  I hope you have learned to not touch any part of your file-system outside of /home unless you understand the consequences or are actually using pacman which is the tool for those areas.  A bit blunt but I think you've already learned your lesson.

Offline

#14 2015-08-17 22:22:05

bmentink
Member
From: New Zealand
Registered: 2009-08-23
Posts: 442

Re: System borked after pacman -Syu

headkase wrote:
bmentink wrote:

I had installed the Adobe flash player, by extracting the downloaded tarball to /usr which borked a whole lot of permissions on /usr..

That, sir, was an idiotic thing to do and is likely very closely related to the subsequent issues.  I hope you have learned to not touch any part of your file-system outside of /home unless you understand the consequences or are actually using pacman which is the tool for those areas.  A bit blunt but I think you've already learned your lesson.

Thanks for abuse ... much appreiated.

Just for your info, I am not a Linux newbie, I have worked with Linux since it first came out. Since the Adobe flash code uncompressed to a "usr" folder, it was a natural assumption to make, to copy that over /usr. (we all make mistakes, or are you immune?)
Maybe it would be more useful for you to give "helpful" suggestions, rather than abuse ..

If you continue in this vein ... you will be reported ..

Last edited by bmentink (2015-08-17 22:22:26)

Offline

#15 2015-08-17 22:27:16

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: System borked after pacman -Syu

bmentink wrote:

Thanks for abuse ... much appreiated.

Just for your info, I am not a Linux newbie, I have worked with Linux since it first came out. Since the Adobe flash code uncompressed to a "usr" folder, it was a natural assumption to make, to copy that over /usr. (we all make mistakes, or are you immune?)
Maybe it would be more useful for you to give "helpful" suggestions, rather than abuse ..

If you continue in this vein ... you will be reported ..

I chose my words carefully.  I didn't say you were an idiot, I said the action was idiocy.  Besides /etc, /home, and very few other places only pacman should be used to manipulate the contents.  We all make mistakes and learning from them is what is important.  This is constructive criticism, not abuse.  Abuse is two doors down.

Offline

#16 2015-08-17 22:33:34

bmentink
Member
From: New Zealand
Registered: 2009-08-23
Posts: 442

Re: System borked after pacman -Syu

headkase wrote:
bmentink wrote:

Thanks for abuse ... much appreiated.

Just for your info, I am not a Linux newbie, I have worked with Linux since it first came out. Since the Adobe flash code uncompressed to a "usr" folder, it was a natural assumption to make, to copy that over /usr. (we all make mistakes, or are you immune?)
Maybe it would be more useful for you to give "helpful" suggestions, rather than abuse ..

If you continue in this vein ... you will be reported ..

I chose my words carefully.  I didn't say you were an idiot, I said the action was idiocy.  Besides /etc, /home, and very few other places only pacman should be used to manipulate the contents.  We all make mistakes and learning from them is what is important.  This is constructive criticism, not abuse.  Abuse is two doors down.

My point was, that your comments were not helpful! I perfectly well know that I made a mistake, I don't need you or anyone else to rub it in ..
Come back when you have something constructive to add ....

I can and will  do what I like to my file system, I do not agree with you that only pacman can touch root, it's my consequence to bear,  not yours, stay out of my decisions.  EOM.

Offline

#17 2015-08-17 22:38:20

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: System borked after pacman -Syu

bmentink wrote:

My point was, that your comments were not helpful! I perfectly well know that I made a mistake, I don't need you or anyone else to rub it in ..
Come back when you have something constructive to add ....

I can and will  do what I like to my file system, I do not agree with you that only pacman can touch root, it's my consequence to bear,  not yours, stay out of my decisions.  EOM.

Well, your thread will hopefully be helpful at least as a warning for future novices.

Offline

#18 2015-08-17 23:15:52

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,237
Website

Re: System borked after pacman -Syu

May I remind you both of our forum etiquette please: https://wiki.archlinux.org/index.php/Fo … ther_users

bmentink wrote:

I can and will  do what I like to my file system, I do not agree with you that only pacman can touch root, it's my consequence to bear,  not yours, stay out of my decisions.  EOM.

That's fine -- but you've not owned this mistake and it's consequences; instead you've come here and asked for help to resolve an issue caused by your actions.
headkase is entirely correct in saying that you should leave pacman to manage /usr -- changes from the system admin should go to /usr/local that is why it exists.

Offline

#19 2015-08-17 23:17:16

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: System borked after pacman -Syu

Understood fukawi2, I will not antagonize further.

Offline

#20 2015-08-18 00:06:42

bmentink
Member
From: New Zealand
Registered: 2009-08-23
Posts: 442

Re: System borked after pacman -Syu

fukawi2 wrote:

May I remind you both of our forum etiquette please: https://wiki.archlinux.org/index.php/Fo … ther_users

Fair enough.

.. but you've not owned this mistake and it's consequences; instead you've come here and asked for help to resolve an issue caused by your actions.

Actually I did: "I perfectly well know that I made a mistake," .. and I did own the consequences:  " it's my consequence to bear"

But that does not stop me asking for help to repair my mistake ... which is why this thread exists ..
I have owned the mistake AND asked for help .. surely I can do both ... wink

PS: And I am very grateful to the others posters for their positive contributions to fixing this mess ..

Last edited by bmentink (2015-08-18 00:14:16)

Offline

#21 2015-08-18 00:29:21

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,237
Website

Re: System borked after pacman -Syu

bmentink wrote:

I have owned the mistake AND asked for help .. surely I can do both ... wink

You may find in the future that members of the community are less willing to assist if you choose to deliberately ignore sound advice about how to avoid these problems in the first place.

Offline

#22 2015-08-18 00:35:25

bmentink
Member
From: New Zealand
Registered: 2009-08-23
Posts: 442

Re: System borked after pacman -Syu

fukawi2 wrote:
bmentink wrote:

I have owned the mistake AND asked for help .. surely I can do both ... wink

You may find in the future that members of the community are less willing to assist if you choose to deliberately ignore sound advice about how to avoid these problems in the first place.

As I mentioned earlier: I only deliberately installed the Adobe Flash plugin to /usr because the package maintainer intended it to go there .... why would I do otherwise?
Yes, normally I would put custom changes into /usr/local as you stated ..

I have installed tar-balls in the past where the instructions where to un-tar it into /usr, and I never had issues in the past. Maybe, I was missing a flag that preserved permissions ... and that is the REAL issue ..

I will no longer be doing that practice for obvious reasons, so point conceded  ....

EDIT: The instructions on the Adobe Flash Linux version tar-ball was to  un-tar the file and do the following:

 sudo cp -r usr/* /usr 

and that is what I did ... Maybe some of the blame could be directed Adobe's way  .. wink

EDIT2: In fact, the un-packing of the tar-ball should have been done as root, not as normal user as per the Adobe instructions !!!

Last edited by bmentink (2015-08-18 01:00:29)

Offline

#23 2015-08-18 01:04:04

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,219

Re: System borked after pacman -Syu

Hindsight is always 20/20.  What I've learned from my short journey with Arch is to never trust external pages by default, especially directions on writing into /usr that was written in 2011.

The archwiki is known for its collective guides and explanations.  There is even one about browser plugins.  As Headkase mentioned, this thread can serve as a reminder to newcomers to Arch to keep it simple™.

Offline

#24 2015-08-18 01:06:16

bmentink
Member
From: New Zealand
Registered: 2009-08-23
Posts: 442

Re: System borked after pacman -Syu

frank604 wrote:

Hindsight is always 20/20.  What I've learned from my short journey with Arch is to never trust external pages by default, especially directions on writing into /usr that was written in 2011.

The archwiki is known for its collective guides and explanations.  There is even one about browser plugins.  As Headkase mentioned, this thread can serve as a reminder to newcomers to Arch to keep it simple™.

Good point. But the reason I went down this path is that the Arch flash package (flashplugin) would not work in Firefox for DRM flash content, and I was directed to the Adobe site to install the LATEST plugin.

 The NPAPI version can be installed with the flashplugin package. This plugin was discontinued by Adobe and is stuck at version 11.2; although, Adobe will provide security updates for 5 years after its release (i.e. until March 2017[1][2]).

Firefox also directed me to the Adobe site.

NOTE: For anyone reading this thread who wants to install the flash player from the Adobe site, just un-tar the tarball and copy the libflashplayer.so to the Firefox plugin directory. Do NOT touch the usr folder from the tarball, it is not actually needed.
.. and of course for DRM content you must have the hal-flash package from AUR installed.

Last edited by bmentink (2015-08-18 01:26:51)

Offline

#25 2015-08-18 01:31:05

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,219

Re: System borked after pacman -Syu

@bmentink, Ah I do not dabble in DRM content.  I was about to suggest you add that to the wiki but the wiki gods have created it here.

Offline

Board footer

Powered by FluxBB