LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Brother soft linked some /etc files... cannot boot (https://www.linuxquestions.org/questions/linux-newbie-8/brother-soft-linked-some-etc-files-cannot-boot-760608/)

chris24300 10-08-2009 01:15 PM

Brother soft linked some /etc files... cannot boot
 
Hi,

My brother informed me that he soft linked some /etc files to our server to sync our network not knowing the networking doesn't start to later in boot process... I get an error like GDM user does not exist Please correct GDM configuration and restart GDM.

I cannot log into the systems he modified so I'm assuming he linked the /etc/passwd. How can I fix this? I tried using the CentOS installation disc but there is no liveCD feature. The rescue feature cannot locate any linux partitions so it just brings me to a shell console...

THANKS!
Chris

Doculus 10-08-2009 01:33 PM

Try to boot with any distro's livecd, and then mount the real harddisk rootdir into /mnt/root, then you can go and fix the links.
You can also try to give kernel command line option "init=1", but probably it does not help if the system is messed up so mutch.

Btw it is a vary bad idea to symlink /etc files to network mounted files, in performance, security and reliability.

madmadmod 10-08-2009 01:40 PM

Well, if "linux rescue" doesn't find a partition you might have a problem with your mbr? btw: what do you mean with "soft linked some /etc files to our server"?

chris24300 10-08-2009 01:57 PM

How would I mount the real hdd?

By soft link i meant symbolic link. It won't find a partition but if i go into the installation menu it sees my partitions.

lutusp 10-08-2009 02:41 PM

Quote:

Originally Posted by chris24300 (Post 3712525)
I cannot log into the systems he modified so I'm assuming he linked the /etc/passwd.

Honest to God.

1. Reinstall Linux.

2. Banish your brother from the computer room.

Doculus 10-08-2009 03:09 PM

You do not need to reinstall, yet. Probably your brother did symlink your /etc/fstab, too.
I would not call "brother" mine anymore if he do something like this;)

The question is if he made some backups about the files somewhere.
Boot from a good livecd, and do:

mkdir /mnt/root
mount /dev/XXX /mnt/root

where XXX is your partition.
Then you can go to /mnt/root/etc and try to fix files.
You can reach your network from livecd too, so you can find the files on the networked copies.
Btw. what kind of network copy he made? On a win share for example?;)

If he wants to do something he imagined, study NIS, or cfengine, or LDAP. But all is too complicated for a home setup.

lutusp 10-08-2009 04:20 PM

Quote:

Originally Posted by Doculus (Post 3712639)
You do not need to reinstall, yet. Probably your brother did symlink your /etc/fstab, too.

Symlinked files are essentially gone. I think he does need to reinstall, especially because a brother of this caliber won't be able to remember all the files he symlinked without creating backups.

And the fact that he symlinked /etc/passwd speaks volumes -- I don't want this person near my abacus, much less my computer.

madmadmod 10-09-2009 01:29 AM

yes, soft links are symbolic links, i know :-) I just don't understand what was linked to what. and why? did he link the files from a servers to your local / filesystem?

however, you should try to follow the instructions from Doculus, make a backup and then reinstall the os.

lutusp 10-09-2009 02:08 AM

Quote:

Originally Posted by madmadmod (Post 3713118)
yes, soft links are symbolic links, i know :-) I just don't understand what was linked to what. and why? did he link the files from a servers to your local / filesystem?

however, you should try to follow the instructions from Doculus, make a backup and then reinstall the os.

Hmm, that sounds familiar. :)

i92guboj 10-09-2009 04:21 AM

Quote:

Originally Posted by madmadmod (Post 3713118)
yes, soft links are symbolic links, i know :-) I just don't understand what was linked to what. and why? did he link the files from a servers to your local / filesystem?

He probably linked some files from a remote volume that was mounted locally as nfs, which means that those files will not be available until nfs is up and hence the links will be pointing to the void. Of course the system won't boot and nfs won't be up so the links will continue to be invalid and the system won't bootup and the links will be invalid, you get the idea.

Restoring the files is certainly possible, but, unless...
  • he knows exactly which files he destroyed, and
  • he did backups

The thing is going to be really difficult. However if the intention was to symlink the files from the remote server, there's a chance that he did something ok, and you might be able to:
  • boot a livecd
  • mount your local drive
  • mount the nfs volume
  • delete the links and copy the files from the remote server to the local one

Assuming that they are correctly set up for your local box it could work. You could as well copy them on a pendrive or whatever if you can't raise nfs, ssh or whatever.

If not, reinstall.

mathew_p_a 10-09-2009 06:29 AM

etc symlinked
 
If your brother just symlinked only etc, then you can just

1) boot using live cd or to single user mode (edit at the grub prompt)

2) remove the symlinked etc folder name and move the contents back to the disk.


All times are GMT -5. The time now is 06:56 PM.