LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-27-2014, 08:24 AM   #1
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Unable to login to cloned/copied server


In short: After having copied a running system I get a login-prompt, type in username + password, almost instantly I'm at login-prompt again with no message.
Typing in wrong username or password results in a short pause and "Login incorrect" - thus the system is running.

What I have done is copied a CentOS 6.4 xen-guest on virt-host1 ("centos-xen") to a CentOS 6.4 kvm-guest on virt-host2 ("centos-kvm").

virt-host1 runs Xen on OpenSuse 12.2, virt-host2 runs oVirt on CentOS 6.5
centos-xen has been running for about 6 months, and shall now be moved to other platform.
I copied the system by booting from live-cd and used ssh to directly copy from remote server (details below).
The only thing I can see in the logs is this "tty (/dev/tty1) main process ended, respawning". But I have no idea where to go from here?

Some details.
Code:
The copying was done like so:
1) Create a new CentOS-6.4 on virt-host2
2) Copy /boot & /etc on this centos-kvm to a backup-directory.
3) Start centos-kvm but from CentOS live-cd.
4) Mount the centos-kvm / directory under /media/<UUID>
5) cd to /media/<UUID>
6) Copy live from centos-xen with command:
ssh 192.168.1.10 'cd /;tar --exclude proc --exclude sys --exclude boot --exclude dev -cpf - * ' | tar xvpf - 
7) Check that /boot is not changed
8) Copy <backup-dir>/etc/fstab to /media/<UUID>/etc/fstab
9) Delete /media/<UUID>/etc/udev/rules.d/70-persistent-net.rules
10) Reboot, start centos-kvm.
From logs:
Code:
/var/log/secure
Jan 27 14:10:55 alfa-app0 login: pam_unix(login:session): session opened for user root by LOGIN(uid=0)
Jan 27 14:10:55 alfa-app0 login: ROOT LOGIN ON tty1
Jan 27 14:10:55 alfa-app0 login: pam_unix(login:session): session closed for user root
Jan 27 14:11:00 alfa-app0 login: pam_unix(login:session): session opened for user peter by LOGIN(uid=0)
Jan 27 14:11:00 alfa-app0 login: LOGIN ON tty1 BY peter
Jan 27 14:11:00 alfa-app0 login: pam_unix(login:session): session closed for user peter
Code:
/var/log/messages
Jan 24 12:18:32 alfa-app0 init: tty (/dev/tty1) main process ended, respawning
Jan 27 14:10:44 alfa-app0 /sbin/mingetty[1977]: tty1: invalid character 0x1b in login name
Jan 27 14:10:49 alfa-app0 init: tty (/dev/tty1) main process (1977) terminated with status 1
Jan 27 14:10:49 alfa-app0 init: tty (/dev/tty1) main process ended, respawning
Jan 27 14:10:55 alfa-app0 init: tty (/dev/tty1) main process ended, respawning
Jan 27 14:11:00 alfa-app0 init: tty (/dev/tty1) main process ended, respawning
Jan 27 14:18:21 alfa-app0 init: tty (/dev/tty1) main process ended, respawning
Jan 27 14:21:41 alfa-app0 init: tty (/dev/tty1) main process ended, respawning
 
Old 01-27-2014, 08:59 AM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Original Poster
Rep: Reputation: 127Reputation: 127
Ha, I solved it!
The problem was (of course) caused by selinux -the root to most problems on earth & surrounding solar systems. :-)

For the record, here's the solution.
1) Boot from live-cd, mount the root-partition.
2) Set selinux permissive "sed -i s/"SELINUX=enforcing"/"SELINUX=permissive"/ <mountpoint>/etc/selinux/config"
3) Create file <mountpoint>/.autorelabel
4) Reboot, login now works fine.
5) Set selinux enforcing, all is fine.
 
  


Reply



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
unable to login to particular server using sudo su prathamesh7478 Linux - Newbie 8 09-17-2013 04:07 PM
Kernel Panic: not syncing: VFS: Unable to mount root fs,,, CLONED INSTALL dtex23 Linux - Kernel 5 11-19-2010 01:41 AM
Copied Fedora 8 to new drive: boots, but no login Bob Barrett Fedora 7 10-09-2008 12:06 PM
Unable to login to ftp server aroop Linux - Networking 1 05-09-2004 05:45 AM
Unable to login in my server elainepearl Linux - Newbie 1 12-19-2001 10:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:36 PM.

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
Open Source Consulting | Domain Registration