Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
etc-update == hell!
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
genewbie
n00b
n00b


Joined: 26 Jan 2004
Posts: 27
Location: Albany, NY

PostPosted: Tue Feb 10, 2004 1:34 am    Post subject: etc-update == hell! Reply with quote

Per a suggestion in the following thread....

https://forums.gentoo.org/viewtopic.php?t=133987

I ran etc-update with -5...i tried doing it with -3 option, but for one I had 80+ files that supposedly needed updating, and secondly, when I tried it prompted me if I wanted to overwrite fstab...when I answered no, it kept asking me the same question over and over so I quit the -3 option and saved fstab make.conf and rc.conf, the only files I knowingly changed, and ran etc-update with -5 and rebooted....couldn't even get into X so I copied those files back over the updated ones and it booted into kde...i then opened a konsole and tried to switch to root entering the password i used since the install and no luck!! i can't change to the root user!! i also can't get out to the internet and lord knows what else!! why do i have to update these files? isn't there any easier way of doing it? why doesn't the -3 option work? how, when the -3 option does work, am i supposed to know whether or not to accept the "update"? what files should i just not mess with? PLEASE HELP!!! Thanks =)
_________________
"The people at the zoo are very nice Penguin. They'll treat you real respectable like." -Billy Madison
Back to top
View user's profile Send private message
numerodix
l33t
l33t


Joined: 18 Jul 2002
Posts: 743
Location: nl.eu

PostPosted: Tue Feb 10, 2004 1:37 am    Post subject: Reply with quote

I agree it's a pain, I'd love a way to check which files have been modified, even if that involved marking the file manually somehow. I use it with colordiff, which makes it somewhat easier.
_________________
undvd - ripping dvds should be as simple as unzip
Back to top
View user's profile Send private message
robmoss
Retired Dev
Retired Dev


Joined: 27 May 2003
Posts: 2634
Location: Jesus College, Oxford

PostPosted: Tue Feb 10, 2004 1:38 am    Post subject: Reply with quote

I would suggest NEVER using etc-update, and instead using dispatch-conf. With regards your knackered system, you'll just have to go through and redo all the config files that you've overwritten. Sounds like you're no longer a member of the wheel group - usermod can help you there. Also you've lost /etc/conf.d/net.eth0. Repair that, too.
_________________
Reality is for those who can't face Science Fiction.

emerge -U will kill your Gentoo
ecatmur, Lord of Portage Bash Scripts
Back to top
View user's profile Send private message
genewbie
n00b
n00b


Joined: 26 Jan 2004
Posts: 27
Location: Albany, NY

PostPosted: Tue Feb 10, 2004 1:40 am    Post subject: Reply with quote

How do I "redo" all the configuration files I've overwritten?

....and once I "redo" them, is it going to tell me they need updating again?
_________________
"The people at the zoo are very nice Penguin. They'll treat you real respectable like." -Billy Madison
Back to top
View user's profile Send private message
alexraasch
Tux's lil' helper
Tux's lil' helper


Joined: 14 Nov 2003
Posts: 94
Location: Rostock, Germany

PostPosted: Tue Feb 10, 2004 2:01 am    Post subject: Reply with quote

Hi, I just ran into the very same problem you did. For the network etc-update changed my /etc/conf.d/net, so you'll want to check it.

I don't get why this overwriting of config files is necessary, escpecially if it's fstab and rc.conf. In my case it just replaced it with the originals ones you get after bootstrap. What's the f*** sense in doing that? Somewhere I read that it is supposed to merge your current configuration with the changes necessary after emerge -u, yet I have NEVER seen that actually work!
Back to top
View user's profile Send private message
bos_mindwarp
Apprentice
Apprentice


Joined: 19 Oct 2002
Posts: 275
Location: stockholm, sweden

PostPosted: Tue Feb 10, 2004 4:00 am    Post subject: Reply with quote

What sucks the most is when etc-update prompts for a new version of config file, just because the comment in it has changed (usually a CVS header).
Back to top
View user's profile Send private message
Nuwen
Tux's lil' helper
Tux's lil' helper


Joined: 20 Mar 2003
Posts: 123

PostPosted: Tue Feb 10, 2004 5:24 am    Post subject: Reply with quote

Using those 'automatic update' options is almost always a really bad idea. If you don't use those, etc-update will tell you which files have changed, and let you chose whether to leave the file unmodified, use the new version, or manually merge the changes.

I agree that dispatch-conf is better for other reasons, but I'd used etc-update for a long time before that with no problems. I don't think I ever used the -* options. I'm not sure why people keep getting confused by this, do you really need a big red blinking warning to let you know that automatically overwriting fstab is bad :?:

To fix it, you'll basically have to edit any config files you've ever edited over again. Then just stop using those -* options, and maybe give dispatch-conf a shot too.
Back to top
View user's profile Send private message
genewbie
n00b
n00b


Joined: 26 Jan 2004
Posts: 27
Location: Albany, NY

PostPosted: Tue Feb 10, 2004 11:46 am    Post subject: Reply with quote

As I said, I saved fstab, rc.conf, and make.conf...the only files I knew I edited in case of trouble like this. But apparantley a lot more is messed up here. How did I lose the ability to login as root? How exactly do I get out to the internet? What else is likely screwed up that I haven't noticed yet? Why didn't the -3 option work with etc-update?
_________________
"The people at the zoo are very nice Penguin. They'll treat you real respectable like." -Billy Madison
Back to top
View user's profile Send private message
Nuwen
Tux's lil' helper
Tux's lil' helper


Joined: 20 Mar 2003
Posts: 123

PostPosted: Tue Feb 10, 2004 3:33 pm    Post subject: Reply with quote

genewbie wrote:
As I said, I saved fstab, rc.conf, and make.conf...the only files I knew I edited in case of trouble like this. But apparantley a lot more is messed up here. How did I lose the ability to login as root? How exactly do I get out to the internet? What else is likely screwed up that I haven't noticed yet? Why didn't the -3 option work with etc-update?

My first guesses would be /etc/passwd and everything in /etc/conf.d/. Basically anything that has been changed since you installed your system might be reset to defaults. Running passwd as root should let you log in, and you'll probably have to add any user accounts and groups you want over again.

The problem isn't that the -3 option doesn't work, it just doesn't do what people seem to keep thinking it does. At least as I understand it, those options are supposed to do what you're complaining about, it's just that the prompt doesn't make this immediately obvious if you haven't used the program before.

What you really want to do is just press enter at that prompt, then follow the directions. That or type a number, as the directions suggest. Repeat as necessary, and eventually the program will exit.
Back to top
View user's profile Send private message
robmoss
Retired Dev
Retired Dev


Joined: 27 May 2003
Posts: 2634
Location: Jesus College, Oxford

PostPosted: Tue Feb 10, 2004 3:48 pm    Post subject: Reply with quote

Nuwen wrote:
What you really want to do is just press enter at that prompt, then follow the directions. That or type a number, as the directions suggest. Repeat as necessary, and eventually the program will exit.


Actually, what you really want to do is Ctrl-C, and then run dispatch-conf instead :P
_________________
Reality is for those who can't face Science Fiction.

emerge -U will kill your Gentoo
ecatmur, Lord of Portage Bash Scripts
Back to top
View user's profile Send private message
genewbie
n00b
n00b


Joined: 26 Jan 2004
Posts: 27
Location: Albany, NY

PostPosted: Tue Feb 10, 2004 4:35 pm    Post subject: Reply with quote

How do I run passwd as root when I can't log in as root? How often am I going to have to "update" these configuration files? It seems like a real hassle, especially when you supposedly have 80 files that need "updating". I don't remember what exactly the prompt said when using the -3 option, but it was something like....Do you want to change fstab(y/n)? And when I entered n it just kept going back. Seems strange to me. Thanks for all your help, but really I have no idea how I'm supposed to go back and fix my config files. Reinstall Gentoo? Why not, it only took me a week after work!!
_________________
"The people at the zoo are very nice Penguin. They'll treat you real respectable like." -Billy Madison
Back to top
View user's profile Send private message
allucid
Veteran
Veteran


Joined: 02 Nov 2002
Posts: 1314
Location: atlanta

PostPosted: Tue Feb 10, 2004 4:58 pm    Post subject: Reply with quote

You had so many files to update because when you updated your system you emerged the new baselayout. This doesn't happen often and when it does you just have to deal with it. There is an option when using etc-update to delete the updated file and leave the original. If you select this option and then type "y" when it asks if you are sure you should be ok as long as there aren't any significant changes between file versions. This is probably how you should have changed fstab, group, rc.conf, etc.

Now, to fix stuff. Log out completely and log in as root (you can't su into root because your group file got over written and you are no longer a member of the "wheel" group). If you are using a login manager (gdm, kdm, xdm) then use Ctrl+Alt+F2 to get to a terminal where you can login outisde of X (Ctrl+Alt+F7 to get back to X). You can always log into root as long as you know the password. Now that we are root, to quickly get your internet running try "dhcpcd eth0". Now open up the install documetation in a browser somehow (try emerging lynx or links you are stuck in a terminal, and you can use Ctrl+Alt+F(1-7) to get to another terminal) and search for the fstab part, the make.conf part, the net.eth0 part, and the useradd part. You will either need to re-add your user using useradd (and the same username) or use usermod (man usermod) as root to change which groups your user belongs to. You should belong to the following groups: users, wheel, audio, portage. Those should fix your major problems.
Back to top
View user's profile Send private message
JonR800
n00b
n00b


Joined: 09 Feb 2004
Posts: 8

PostPosted: Tue Feb 10, 2004 6:47 pm    Post subject: Reply with quote

I don't mean to be rude. But please take the time to review what changes are being made to your configuration files when running etc-update. If it looks like there's something in there that you specifically defined then don't update the file.

And never... run -5.. .unless you've looked over that list of changed config files 5 times over.

This may be a pain compared to other distros, but at least gentoo makes the effort to keep your configs current while most others just leave them untouched.
Back to top
View user's profile Send private message
praioz
n00b
n00b


Joined: 28 Apr 2003
Posts: 20
Location: germany

PostPosted: Tue Feb 10, 2004 6:58 pm    Post subject: Reply with quote

i'm not really sure, if thats 100% correct.
kind of long time ago
somebody showed me. and it worked pretty well. but never used it again, since rarely updating my system :(

i think he didnt use '-3' i think he used '3'

what it did.
it showed the changeable files in a list.
enter number for file
get a menu same style, options for files.
( overwrite with new, keep old and so on )

it takes more time indeed, but it'S kind of safer then automaticly be done.


but pls, check somewhere online, which options rc-update has, before trying the 3 or soomething.

hope it helps.
praioz
Back to top
View user's profile Send private message
Nuwen
Tux's lil' helper
Tux's lil' helper


Joined: 20 Mar 2003
Posts: 123

PostPosted: Tue Feb 10, 2004 8:40 pm    Post subject: Reply with quote

praioz wrote:
what it did.
it showed the changeable files in a list.
enter number for file
get a menu same style, options for files.
( overwrite with new, keep old and so on )

That sounds like what etc-update always does. And BTW, dispach-conf is almost exactly the same in this respect, it just leaves off the -3 and -5 options and uses different prompts.

You just need to pay attention, it's not that hard.
Back to top
View user's profile Send private message
genewbie
n00b
n00b


Joined: 26 Jan 2004
Posts: 27
Location: Albany, NY

PostPosted: Tue Feb 10, 2004 9:16 pm    Post subject: Reply with quote

Thank you to everyone who posted on this. Obviously I didn't realize what I was getting into when I started the whole etc-update thing. It can be very confusing.

Quote:
The problem isn't that the -3 option doesn't work, it just doesn't do what people seem to keep thinking it does. At least as I understand it, those options are supposed to do what you're complaining about, it's just that the prompt doesn't make this immediately obvious if you haven't used the program before.


Perhaps this is what happened to me. The important thing is trying to get my machine back up and running and I've got some good advice now on how to start that process. Hopefully when it comes time to run etc-update again I'll have a better understanding on what to do. It still worries me though that I won't know exactly what files I should be updating and which files I should just leave alone. Thanks again.
_________________
"The people at the zoo are very nice Penguin. They'll treat you real respectable like." -Billy Madison
Back to top
View user's profile Send private message
allucid
Veteran
Veteran


Joined: 02 Nov 2002
Posts: 1314
Location: atlanta

PostPosted: Tue Feb 10, 2004 9:59 pm    Post subject: Reply with quote

here's some system-related files you don't want to overwrite:
/etc/fstab <-- describes the layout of your file system
/etc/make.conf <-- personalized portage settings (USE flags, CFLAGS, etc)
/etc/group <-- contains group info for all users
/etc/passwd <-- contains other user settings
/etc/rc.conf <-- global config settings (login manager, keyboard map, etc)
/etc/conf.d/net <-- network card settings
Back to top
View user's profile Send private message
Nuwen
Tux's lil' helper
Tux's lil' helper


Joined: 20 Mar 2003
Posts: 123

PostPosted: Tue Feb 10, 2004 10:52 pm    Post subject: Reply with quote

I think allucid covered the main files to watch out for pretty well, but the line is really pretty blurry. For instance, you never want to overwrite /etc/make.conf, but you might also run into trouble if you update portage and don't update it.

Once you see the diffs, it's usually pretty easy to remember what you changed, and see what needs to be changed. If not, just read the docs or ask someone.

Config file management is just about the worst part of Gentoo IMHO, so I definitely understand why you're frustrated with this. Just try to keep things from building up too much, and you'll learn to live with it after a while.
Back to top
View user's profile Send private message
yuza
Apprentice
Apprentice


Joined: 17 Dec 2003
Posts: 210
Location: Rome, in front of my comp...

PostPosted: Tue Feb 10, 2004 10:58 pm    Post subject: Reply with quote

Do yourself a favor and use cfg-update instead of etc-update. It's a lot safer and easier and will save you a lot of time and headaches. You can find it here:
https://forums.gentoo.org/viewtopic.php?t=86622
You won't have this kind of problems anymore...
Back to top
View user's profile Send private message
praioz
n00b
n00b


Joined: 28 Apr 2003
Posts: 20
Location: germany

PostPosted: Wed Feb 11, 2004 1:30 pm    Post subject: Reply with quote

praioz wrote:
i'm not really sure, if thats 100% correct.
kind of long time ago
somebody showed me. and it worked pretty well. but never used it again, since rarely updating my system :(

i think he didnt use '-3' i think he used '3'

what it did.
it showed the changeable files in a list.
enter number for file
get a menu same style, options for files.
( overwrite with new, keep old and so on )

it takes more time indeed, but it'S kind of safer then automaticly be done.


but pls, check somewhere online, which options rc-update has, before trying the 3 or soomething.

hope it helps.
praioz


k, here the correct version.

etc-update
decide number of merging file (like fstab mostly 1))
then, it shows the entries it will replace.
'-' entry be deleted/overwritten
'+' entry which will be filled
enter 3 for 'interactively merge original with update
now it will show u mostly starting with the header two lines. beside each other
left is YOUR line at the moment
right is the new line merge wants to update
choose 'l' (L) or 'r' (R) for either line u want to have in ur file
then after the header, it will show u the part of the config u have and the new one.
keeping old? choose 'l' (L)
after your done with merging that choose '3' again and repeat all to be safe.
after that, choose '1' for "replace path/to/config with merged file"
submit that
and exit to main menu

its lot of work if there a lot of files to merge

but ur on the safe side with this.

my opinion == its a lot safer than automerging shit :)

hope it helps
_________________
-create ya own matrix-
Back to top
View user's profile Send private message
shraps
n00b
n00b


Joined: 16 Jan 2004
Posts: 25
Location: St. Louis, MO

PostPosted: Thu Feb 12, 2004 11:07 pm    Post subject: Reply with quote

in order to be able to 'su root' again, you will have to edit /etc/group and add yourself after root in the wheel group.

Ex:

wheel::10:root,yournamehere

hope that helps some of your problems...

-shraps
Back to top
View user's profile Send private message
Danathan
Tux's lil' helper
Tux's lil' helper


Joined: 08 Mar 2004
Posts: 120

PostPosted: Thu Apr 15, 2004 4:47 pm    Post subject: Reply with quote

numerodix wrote:
I agree it's a pain, I'd love a way to check which files have been modified, even if that involved marking the file manually somehow. I use it with colordiff, which makes it somewhat easier.


The easiest way I've found to do this is to sign all the changes I make to my conf files -- just put a line before all changes that's a comment saying the date I changed it on. Also, if you leave example lines as they are, that makes life a little simpler. So it's a little hackneyed, but if the original is like this:

Code:

#uncomment the following line to enable a feature
#feature=off


I'd change it ot:
Code:

#uncomment the following line to enable a feature
#feature=off
#FEATURE TURNED ON BY CHECK 04/15/04
feature=on


Then on merges, you'll be able to easily see changes what changes were made to the underlying file as opposed to your edits of said underlying file.
Back to top
View user's profile Send private message
tsawyer
n00b
n00b


Joined: 06 Jun 2002
Posts: 22

PostPosted: Sat May 01, 2004 4:28 am    Post subject: Config File Management Reply with quote

Wouldn't it be great if portage or portage-ng would create a checksum of config files when they are installed. Then etc-update or some similar function could compare the current config file to the checksum at install to see if local modifications were made. Seems that in most cases if a file hasn't changed since install time, then it shouldn't be a problem to overwrite that file. Then maybe we could flag files like .fstab to never update. Config File Management, or lack there of, is my only gripe about Gentoo.
_________________
There are 10 types of people in this world, those who understand binary and those who do not.
Back to top
View user's profile Send private message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Sat May 01, 2004 6:07 am    Post subject: Reply with quote

dispatch-conf has this feature - and more.
Quote:

# Automerge files comprising only CVS interpolations (e.g. Header or Id)
# (yes or no)
replace-cvs=yes

# Automerge files comprising only whitespace and/or comments
# (yes or no)
replace-wscomments=yes

# Automerge files that the user hasn't modified
# (yes or no)
replace-unmodified=yes

_________________
No more cruft
dep: Revdeps that work
Using command-line ACCEPT_KEYWORDS?
Back to top
View user's profile Send private message
gbu
n00b
n00b


Joined: 18 May 2004
Posts: 25
Location: Between UCI and UCLA

PostPosted: Sat May 22, 2004 5:36 am    Post subject: Reply with quote

The only problem with dispatch-conf (other than incomprehensible
instructions---see the way debian [debconf] does this; it's much clearer)
is that when you use the RCS archiving method, it sometimes fails to
merge the files properly, and puts >>>>>>>>>> <<<<<< lines
in the configuration file. If the configuration file happens to actually
be a binary/executable (like, say, /etc/.../xkbcomp), it's very easy to
miss the >>>> lines and accept the changes. After this happens, it's hard to
recover from it (especially since I find the menu options difficult to
interpret...). For this reason I switched back to etc-update pending
some dispatch-conf documentation...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum