LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-08-2009, 02:15 PM   #1
chris24300
Member
 
Registered: Jul 2009
Posts: 58

Rep: Reputation: 15
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
 
Old 10-08-2009, 02:33 PM   #2
Doculus
LQ Newbie
 
Registered: Oct 2009
Distribution: Gentoo
Posts: 29

Rep: Reputation: 17
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.
 
Old 10-08-2009, 02:40 PM   #3
madmadmod
Member
 
Registered: Sep 2009
Distribution: Fedora, Red Hat
Posts: 52

Rep: Reputation: 18
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"?
 
Old 10-08-2009, 02:57 PM   #4
chris24300
Member
 
Registered: Jul 2009
Posts: 58

Original Poster
Rep: Reputation: 15
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.

Last edited by chris24300; 10-08-2009 at 02:59 PM.
 
Old 10-08-2009, 03:41 PM   #5
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by chris24300 View Post
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.
 
Old 10-08-2009, 04:09 PM   #6
Doculus
LQ Newbie
 
Registered: Oct 2009
Distribution: Gentoo
Posts: 29

Rep: Reputation: 17
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.
 
Old 10-08-2009, 05:20 PM   #7
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by Doculus View Post
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.
 
Old 10-09-2009, 02:29 AM   #8
madmadmod
Member
 
Registered: Sep 2009
Distribution: Fedora, Red Hat
Posts: 52

Rep: Reputation: 18
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.
 
Old 10-09-2009, 03:08 AM   #9
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by madmadmod View Post
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.
 
Old 10-09-2009, 05:21 AM   #10
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
Quote:
Originally Posted by madmadmod View Post
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.
 
Old 10-09-2009, 07:29 AM   #11
mathew_p_a
LQ Newbie
 
Registered: Oct 2009
Posts: 7
Blog Entries: 1

Rep: Reputation: 1
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
removing hard linked files jiml8 Linux - Software 1 05-11-2008 06:26 PM
Getting list of hard-linked files SlowCoder Linux - General 1 01-28-2008 12:51 PM
Find files linked to file x_terminat_or_3 Linux - Software 4 07-12-2007 08:18 AM
How Do I List All Files Linked To inode? freedomics Linux - Software 1 04-24-2007 07:18 PM
copy both soft link and its linked file okeyla Programming 3 02-14-2005 12:30 AM


All times are GMT -5. The time now is 05:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration