You are not logged in.

#1 2013-08-05 18:23:42

prabuselva
Member
Registered: 2013-08-05
Posts: 22

[Solved] Pacdiff messed up \etc after texlive upgrade - Help needed

I performed upgrade after a month or so. My texlive got screwed up. Later I came to realise that I need to perform some pacdiff operation as mentioned in here
https://www.archlinux.org/news/texlive- … tervention.  So I executed

sudo pacdiff -l /etc/texmf

I was in bit hurry when I did this. It asked me whether to merge or overwrite or cancel it. I was really stupid to use overwrite option to all the files without looking at the filenames. Finally This replaced all my config files such as /etc/passwd,  /etc/sudoers, /etc/fstab/, /etc/shadow  and some more files too with the *.pacnew files. So the entire OS got screwed up. I somehow managed to get the passwd file up and running by booting live cd.

Now What I really need to know is that
"Is there anyway to revert all the config files back to what they ever before using pacdiff?" or
"Is there anyway to know which all files were overwritten during the pacdiff command? so that I can configure all those files manually?"

Important file such as fstab and systemctl configs are now empty. I cant figure out a way to revert everything back. This was my stupidity to use pacdiff and overwriting all files. Does pacdiff maintains any log files stating which files are modified or so?

Last edited by prabuselva (2013-08-07 10:24:18)

Offline

#2 2013-08-05 18:49:50

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

Re: [Solved] Pacdiff messed up \etc after texlive upgrade - Help needed

I've never used pacdiff, but I'd suspect (hope) that it had a log.

As for reverting files, do you have a backup?  If not, then no you'll have to recreate each file.  Many should be simple enough: for fstab you can use genfstab - this will be different for each file.

You might want to revise the title of this thread too.  While the latex update was what triggered this mistake, it is not otherwise relevant to it.  You indescriminately overwrote config files with pacnew files - in fact the latex configs are probably the only ones where this is *not* a problem.


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

Offline

#3 2013-08-05 19:10:41

prabuselva
Member
Registered: 2013-08-05
Posts: 22

Re: [Solved] Pacdiff messed up \etc after texlive upgrade - Help needed

Thanks for the reply Trilby....
I knew that the title may be misleading but intentionally I kept it because of the hope to find someone who might have made the same mistake as me. Pacdiff may be the real reason but i used the command only to repair the latex config files as asked by the Arch News regarding the texlive-2013 update in https://www.archlinux.org/news/texlive- … tervention
But I used the command in a wrong way.

Anyway if I know the location the log file of pacdiff, I hope i can bring my arch back to working state.

Offline

#4 2013-08-05 19:21:02

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: [Solved] Pacdiff messed up \etc after texlive upgrade - Help needed

I'm wondering why you had that many pacnew files in the first place? Have you just been ignoring them? If so, I'm surprised you haven't run into problems long before now.

Offline

#5 2013-08-05 19:54:55

prabuselva
Member
Registered: 2013-08-05
Posts: 22

Re: [Solved] Pacdiff messed up \etc after texlive upgrade - Help needed

Hi Scimmia,

Yes, You are right. I have been ignoring many pacnew files from the beginnning. To be honest, I never realised the importance of the pacnew files until today.
Btw, It should be around 8-12 files only. Right now I am trying to recollect the overwritten filenames from my mind.

Offline

#6 2013-08-05 20:01:23

fredre
Member
Registered: 2009-12-18
Posts: 45

Re: [Solved] Pacdiff messed up \etc after texlive upgrade - Help needed

Pacdiff doesn't have a log as far as I can tell.  However you can search your pacman.log for *.pacnew to see what might have been replaced.

Offline

#7 2013-08-05 20:05:26

prabuselva
Member
Registered: 2013-08-05
Posts: 22

Re: [Solved] Pacdiff messed up \etc after texlive upgrade - Help needed

@fredre , Ok I will have a look at pacman.log regarding *.pacnew files. As far as I looked into it earlier,  few *.pacnew files dated back to jan-2013. However, I will take a deep look into it now.

Offline

#8 2013-08-07 08:11:14

crosiv
Member
Registered: 2013-08-07
Posts: 2

Re: [Solved] Pacdiff messed up \etc after texlive upgrade - Help needed

I've solved this, rewriting (and recreating) some directories and my main user (besides root) as in Trilby comment.

First thing first (read all the steps before doing anything):

1. Follow the steps of https://wiki.archlinux.org/index.php/Password_Recovery invoke bash from GRUB (No need of a live-usb and don't forget to mount)
    This avoid 1.1. Chrooting as shown here https://wiki.archlinux.org/index.php/Change_Root

2. Use #passwd like this https://wiki.archlinux.org/index.php/Password_Recovery
    Now you have a password for root, everything is easy now

3. Reconfigure your /etc/fstab, for sure the one you have is empty (only a comented line), use this https://wiki.archlinux.org/index.php/Fstab

4. Now Recreate your user, this may be helpfull https://wiki.archlinux.org/index.php/Us … management 
   Don't forget to add the pertinent user groups, and choose wisely your login_shell

5. Set the password for your user (#passwd user)

6. Unmount and reboot (if everything is 0k you should gain acces to your system)

7. In my case I've some issues with the pacman-keys, so refresh your keys. EDIT your /etc/pacman/mirrorlist (uncomment your favorite servers),
    # pacman-key --refresh-keys

8. Now you are good to go


I'm glad not being the only one.

Offline

#9 2013-08-07 10:19:06

prabuselva
Member
Registered: 2013-08-05
Posts: 22

Re: [Solved] Pacdiff messed up \etc after texlive upgrade - Help needed

Hi crosiv,

Thanks for the steps. I did all those steps earlier and now recovered my arch linux. 
But now the problem is that my login shell is too slow.
It takes 4 min to login from slim login manager to xfce desktop. I dont know the reason for this slow startup.. I am following this thread https://bbs.archlinux.org/viewtopic.php?id=167733 who got the same problem as mine.

Did you happen to experience such slow start in your system?

Last edited by prabuselva (2013-08-07 10:20:50)

Offline

#10 2013-08-07 11:28:06

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

Re: [Solved] Pacdiff messed up \etc after texlive upgrade - Help needed

While those steps are well written and look great, they assume that everyone with this problem had the same set of pacnew files.  There is no reason to make this assumption.

If you were merging pacnew files as they were supposed to, the only pacnew files would be for texlive.  Unless you have specifically customized, these all can replace the old configs without any intervention.

If you have not been merging pacnew files - until now - then the depth of your problem depends entirely on how long you have gone without merging pacnew files.

The user management files (passwd, gpasswd, ...) were updated relatively recently, so most users who made this mistake may have to deal with those.  But virtually everything in /etc/ and files in several other locations all have had pacnew versions installed at some point.  Search through your pacman log for any potential candidates as there is no way for us to know which file would be the issue on your system.

If you are having issues with your login manager, I'd look specifically for pacnew files related to your login manager in your pacman log.


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

Offline

#11 2013-08-07 17:56:14

crosiv
Member
Registered: 2013-08-07
Posts: 2

Re: [Solved] Pacdiff messed up \etc after texlive upgrade - Help needed

prabuselva wrote:

Did you happen to experience such slow start in your system?

No, I did'n, and you're welcome

Trilby wrote:

While those steps are well written and look great, they assume that everyone with this problem had the same set of pacnew files.  There is no reason to make this assumption.

I feel flattered (regarding the first part), on the other hand, indeed you have a good point, my assumptions were based on the information provided and my own problem, but you can't deny, people can figure it out. (well I guess I'm getting presumptuous, you're right my bad)

Last edited by crosiv (2013-08-09 06:27:25)

Offline

Board footer

Powered by FluxBB