You are not logged in.

#1 2015-11-24 21:56:49

rosenpin
Member
Registered: 2015-08-30
Posts: 29

Can't boot after doing a lot of stupid things

I ran

sudo  chown -R myusername /usr

by mistake,  after reboot I couldn't get the system to fully load but i could get into the terminal so i logged in as root and ran

 chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo

And now the system would get stuck at "Dependency failed for /mnt/489C52...." and i cant seem to be able to get into the terminal using the normal keyboard shortcut.
Please help.

Last edited by rosenpin (2015-11-24 21:57:18)

Offline

#2 2015-11-24 22:02:44

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

Re: Can't boot after doing a lot of stupid things

Reinstall.


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

#3 2015-11-24 22:04:25

rosenpin
Member
Registered: 2015-08-30
Posts: 29

Re: Can't boot after doing a lot of stupid things

ewaller wrote:

Reinstall.

Is that really the only solution..?

Offline

#4 2015-11-24 22:09:28

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

Re: Can't boot after doing a lot of stupid things

You could boot from your install media. chroot in to your system and try to reinstall all the packages on your system.  I am not certain if pacman will work in this state or not.

Do you have a separate home partition?


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

#5 2015-11-24 22:12:16

rosenpin
Member
Registered: 2015-08-30
Posts: 29

Re: Can't boot after doing a lot of stupid things

ewaller wrote:

You could boot from your install media. chroot in to your system and try to reinstall all the packages on your system.  I am not certain if pacman will work in this state or not.

Do you have a separate home partition?

I do have a separate home partition.

Offline

#6 2015-11-24 23:10:47

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

Re: Can't boot after doing a lot of stupid things

I would make a tar archive of of /etc.  You may have to do that from a live media.  I would format your root partition, do a pacstrap, restore the etc from the archive and reinstall any packages you had installed.  Note that the /etc/fstab might no longer be correct so you will have to check that and fix as required.

It really is the path of least resistance.


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

#7 2015-11-24 23:51:47

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Can't boot after doing a lot of stupid things

ewaller wrote:

You could boot from your install media. chroot in to your system and try to reinstall all the packages on your system.  I am not certain if pacman will work in this state or not.

Do you have a separate home partition?

Either way, you should be able to do

pacman -Qqnr /mnt/brokensystem | pacman -r /mnt/brokensystem -S -

Last edited by eschwartz (2015-11-24 23:52:46)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#8 2015-11-25 00:30:56

loqs
Member
Registered: 2014-03-06
Posts: 19,184

Re: Can't boot after doing a lot of stupid things

Eschwartz wrote:

Either way, you should be able to do

pacman -Qqnr /mnt/brokensystem | pacman -r /mnt/brokensystem -S -

That seems like it would result in all native packages being marked as explicitly installed.

Offline

#9 2015-11-25 00:39:48

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Can't boot after doing a lot of stupid things

No, reinstalling or updating a package does not cause it to be marked as explicit.
Only explicitly installing a not-currently-installed program without the --asdeps switch marks a package as explicitly installed.


For more or less the exact problem you thought of, I would assume.
I can't see any reason why one would want to have dependency packages marked as explicitly installed when reinstalled, but as is self-evident here, there are reasons to want to reinstall packages without modifying their Install Reason.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB