You are not logged in.

#26 2020-11-15 09:09:51

seth
Member
Registered: 2012-09-03
Posts: 51,605

Re: [SOLVED] I messed up permissions in /usr

What happens if you just press enter?

Online

#27 2020-11-15 09:11:45

fire100265
Member
Registered: 2020-10-05
Posts: 95

Re: [SOLVED] I messed up permissions in /usr

I can't. The prompt does not allow me to respond and is instead answered with the hash.

Offline

#28 2020-11-15 09:16:43

seth
Member
Registered: 2012-09-03
Posts: 51,605

Re: [SOLVED] I messed up permissions in /usr

Of course you can "just press enter" - the question is what happens next.

Please make a photo, only post a link.

Online

#29 2020-11-15 09:26:06

fire100265
Member
Registered: 2020-10-05
Posts: 95

Re: [SOLVED] I messed up permissions in /usr

https://imgur.com/a/Qg3PDiW

I couldn't press enter to respond.

Offline

#30 2020-11-15 09:30:13

seth
Member
Registered: 2012-09-03
Posts: 51,605

Re: [SOLVED] I messed up permissions in /usr

There's an input problem and you're back at the root prompt.
(You should be able to issue another command now?)

Please post an image of the command you actually enter.

Online

#31 2020-11-15 09:37:03

fire100265
Member
Registered: 2020-10-05
Posts: 95

Re: [SOLVED] I messed up permissions in /usr

https://imgur.com/a/3y2ojzB

Yes I can type commands.

Offline

#32 2020-11-15 09:59:07

seth
Member
Registered: 2012-09-03
Posts: 51,605

Re: [SOLVED] I messed up permissions in /usr

Sone stray nonsense in the output of the package list?

pacman -r /mnt -Qnq > /tmp/packages.text

Lookat and upload that file. Also pay attention to whether that command leaves you w/ a similar hash.

Online

#33 2020-11-15 10:11:23

fire100265
Member
Registered: 2020-10-05
Posts: 95

Re: [SOLVED] I messed up permissions in /usr

There were no error when executing the command. Here is the link: http://ix.io/2Ee7

Offline

#34 2020-11-15 10:14:41

seth
Member
Registered: 2012-09-03
Posts: 51,605

Re: [SOLVED] I messed up permissions in /usr

can you

pacman --sysroot /mnt -S - < /tmp/packages.text

?

Online

#35 2020-11-15 10:19:17

fire100265
Member
Registered: 2020-10-05
Posts: 95

Re: [SOLVED] I messed up permissions in /usr

I still get the hash. Is it better if I reinstall Arch?

Last edited by fire100265 (2020-11-15 10:20:23)

Offline

#36 2020-11-15 10:58:00

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: [SOLVED] I messed up permissions in /usr

seth wrote:

can you

pacman --sysroot /mnt -S - < /tmp/packages.text

?

I think there may be a hidden bug in there, the process lies in the background, and does not accept terminal input, it's like it's still listening to the redirection...

Let's do it in a way that I haven't managed to replicate that issue.

killall pacman # you probably have a couple of these lingering
rm /mnt/var/lib/pacman/db.lck # remove the lock, it may or may not be there
pacman --sysroot /mnt -S $(pacman -r /mnt -Qnq) # notice that this does not have redirection

My reposSome snippets

Heisenberg might have been here.

Offline

#37 2020-11-15 11:08:27

fire100265
Member
Registered: 2020-10-05
Posts: 95

Re: [SOLVED] I messed up permissions in /usr

Thank you so much! I can now press enter to start the download. This time I get another error though:

error: could not open file: /etc/mtab: No such file or directory
error: could not determine filesystem mount points

Last edited by fire100265 (2020-11-15 11:08:47)

Offline

#38 2020-11-15 11:14:26

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: [SOLVED] I messed up permissions in /usr

Post output of

stat /mnt/etc/mtab

After that, since this is keeping up for quite long with the inevitable outcome:

pacstrap /mnt $(pacman -r /mnt -Qnq)
arch-chroot /mnt
pacman -Qkk | curl -F 'f:1=<-' ix.io # post the link

seth: pacman does not remain alive when calling in a root shell like that, but sudo is an example of something that will make it stay alive. I'll report in the bugtracker.

EDIT: Discard the alive, it was an one time thing it seems.

Last edited by GaKu999 (2020-11-15 11:40:51)


My reposSome snippets

Heisenberg might have been here.

Offline

#39 2020-11-15 11:48:28

fire100265
Member
Registered: 2020-10-05
Posts: 95

Re: [SOLVED] I messed up permissions in /usr

Thank you so much! I can boot in and it works now. Output for the first command:

  File: /etc/mtab -> ../proc/self/mounts
  Size: 19              Blocks: 0          IO Block: 4096   symbolic link
Device: 815h/2069d      Inode: 6422560     Links: 1
Access: (0777/lrwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2020-11-16 03:35:40.601152256 +0900
Modify: 2020-09-03 06:30:21.000000000 +0900
Change: 2020-11-16 03:33:59.164484446 +0900
 Birth: 2020-11-16 03:33:59.164484446 +0900

Link for the second command: http://ix.io/2EeP

Offline

#40 2020-11-15 12:03:39

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: [SOLVED] I messed up permissions in /usr

Good to know, now be careful with recursive commands!


My reposSome snippets

Heisenberg might have been here.

Offline

#41 2020-11-15 12:18:59

fire100265
Member
Registered: 2020-10-05
Posts: 95

Re: [SOLVED] I messed up permissions in /usr

I will. Thanks to all of you who helped me.

Offline

#42 2020-11-15 14:06:34

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

Re: [SOLVED] I messed up permissions in /usr

Sorry about the -r vs --sysroot issue.  I suggested the wrong one.

As for the original issue - recursive commands are certainly risky, but honestly everything in your first post would have been fairly easy to recover from *except* the chmod 4755 command.  Adding that 4 (setuid / stickybit) opened a much much bigger can of worms which resulted in a couple of us suggesting that'd be best to just delete the entire /usr and rebuild it.

The general lesson is simply never run commands (especially as root) if you don't understand what they are doing.  And that's even the case when seasoned members of this community give suggestions - they are suggestions for you to understand first, then implement.  As you can see we all make mistakes and give the wrong flag for a command sometimes (and I even editted it a couple times just after posting as I forgot the 'q' in 'Qnq' which would have also caused failure).  Don't blindly trust anyone's advice on what commands to run as root.


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

Offline

Board footer

Powered by FluxBB