#370 Issue closed: TTY issue on RHEL 7

Labels: support / question

Florent38 opened issue at 2014-02-19 14:36:

Link to #348 : Rear dependencies on RHEL7 beta 1
@gdha Did you do a test with agetty ?
Because I haven't ttys when I boot on rescue system generated by latest git version of Rear on RHEL7.

Florent38 commented at 2014-02-20 14:33:

With rear (rpm build on RHEL6.4) and mingetty from Fedora 19, no problem on RHEL7
But with rear build on RHEL7 and agetty, i haven't TTYs.

Screen capture :
boot

gdha commented at 2014-02-20 15:29:

Just made a new image with the latest github sources and booted up a test VM and it does work for me - I have agetty's running:
screenshot
You should inspect /usr/share/rear/skel/default/usr/lib/systemd/system/getty* files. Do you have them?

Florent38 commented at 2014-02-21 07:29:

I just do a new backup restore on a VM with minimal install and still get same issue...

ls /usr/share/rear/skel/default/usr/lib/systemd/system/getty*
getty@.service  getty.target

getty.target.wants:
getty@tty1.service  getty@tty2.service  getty@tty3.service  getty@tty4.service

cat /etc/rear/local.conf                                                                                                                                            
OUTPUT=ISO                                                                                                                                                                                               
BACKUP=NETFS                                                                                                                                                                                             
BACKUP_URL=nfs://node/backup

rear --version                                                                                                                                                                         
Relax-and-Recover 1.15-git201402200254 / 2014-02-20

RHEL7 version : 7.0-20140214 (snap7)

gdha commented at 2014-02-21 07:31:

check the rear.log file to see whether the agetty was copied to the image?
It should work, otherwise try to turn on systemd debugging on the cmdline
(cannot remember the syntax by heart)

On Fri, Feb 21, 2014 at 8:29 AM, Florent ROCHETTE
notifications@github.comwrote:

I just made a new backup restore on a VM with minimal install and still
get same issue...

ls /usr/share/rear/skel/default/usr/lib/systemd/system/getty*
getty@.service getty.target

getty.target.wants:
getty@tty1.service getty@tty2.service getty@tty3.service getty@tty4.service

cat /etc/rear/local.conf OUTPUT=ISO BACKUP=NETFS BACKUP_URL=nfs://kbac/backup

rear --version
Relax-and-Recover 1.15-git201402200254 / 2014-02-20

RHEL7 version : 7.0-20140214 (snap7)

Reply to this email directly or view it on GitHubhttps://github.com/rear/rear/issues/370#issuecomment-35705050
.

Florent38 commented at 2014-02-21 07:43:

grep agetty rear-VMRHEL7.log
2014-02-21 02:25:13 Including prep/GNU/Linux/20_include_agetty.sh
2014-02-21 02:25:26 Binaries being copied: /bin/awk /bin/basename /bin/bash /bin/bzip2 /bin/cat /bin/chacl /bin/chmod /bin/chown /bin/cp /bin/cpio /bin/cut /bin/date /bin/dbus-daemon /bin/dbus-send /bin/dbus-uuidgen /bin/dd /bin/df /bin/diff /bin/dirname /bin/dmesg /bin/du /bin/dumpkeys /bin/egrep /bin/expand /bin/expr /bin/fgrep /bin/file /bin/find /bin/free /bin/getent /bin/getfacl /bin/getopt /bin/grep /bin/grub2-mkimage /bin/grub2-mkrelpath /bin/gzip /bin/head /bin/hostname /bin/id /bin/ipcalc /bin/join /bin/journalctl /bin/kbd_mode /bin/ldd /bin/less /bin/ln /bin/loadkeys /bin/logger /bin/ls /bin/md5sum /bin/mkdir /bin/mkfifo /bin/mknod /bin/mktemp /bin/mount /bin/mv /bin/openvt /bin/ping /bin/ps /bin/readlink /bin/rm /bin/rmdir /bin/rsync /bin/scp /bin/sed /bin/seq /bin/setfacl /bin/sftp /bin/sleep /bin/sort /bin/ssh /bin/stat /bin/strings /bin/stty /bin/sync /bin/systemctl /bin/systemd-ask-password /bin/systemd-notify /bin/tac /bin/tail /bin/tar /bin/tee /bin/top /bin/touch /bin/tr /bin/true /bin/tty /bin/umount /bin/uname /bin/uniq /bin/usleep /bin/vi /bin/wc /bin/which /bin/xargs /bin/xz /lib/udev/ata_id /lib/udev/cdrom_id /lib/udev/scsi_id /sbin/agetty /sbin/arping /sbin/biosdevname /sbin/blkid /sbin/btrfs /sbin/btrfsck /sbin/cfdisk /sbin/chroot /sbin/dhclient /sbin/dmeventd /sbin/dmsetup /sbin/ethtool /sbin/fdisk /sbin/fsadm /sbin/fsck /sbin/fsck.ext2 /sbin/fsck.ext3 /sbin/fsck.ext4 /sbin/fsck.ext4dev /sbin/fsck.xfs /sbin/grub2-bios-setup /sbin/grub2-install /sbin/grub2-mkconfig /sbin/grub2-probe /sbin/grub2-reboot /sbin/grub2-set-default /sbin/halt /sbin/ifenslave /sbin/init /sbin/insmod /sbin/ip /sbin/killall5 /sbin/kpartx /sbin/lsmod /sbin/lvm /sbin/mkfs /sbin/mkfs.btrfs /sbin/mkfs.ext2 /sbin/mkfs.ext3 /sbin/mkfs.ext4 /sbin/mkfs.ext4dev /sbin/mkfs.xfs /sbin/mkswap /sbin/modprobe /sbin/mount.nfs /sbin/parted /sbin/partprobe /sbin/pidof /sbin/poweroff /sbin/reboot /sbin/rmmod /sbin/rpc.statd /sbin/rpcbind /sbin/rpcinfo /sbin/rsyslogd /sbin/sfdisk /sbin/showmount /sbin/shutdown /sbin/sshd /sbin/swapoff /sbin/swapon /sbin/telinit /sbin/tune2fs /sbin/udevadm /sbin/umount.nfs /sbin/xfs_admin /sbin/xfs_db /usr/libexec/openssh/sftp-server /usr/sbin/rear
'/sbin/agetty' -> '/tmp/rear.GVEsD9rfV5cKUQs/rootfs/bin/agetty'

Turning on systemd debugging via : systemd.log_level=debug systemd.log_target=console console=ttyS0,38400 ?
I haeve already enabled it but I didn't get more information

Florent38 commented at 2014-02-21 09:47:

I just found the problem.
Missing symlinks in /usr/lib/systemd/system :

lrwxrwxrwx 1 root root 15 Feb 21 09:37 ./usr/lib/systemd/system/dbus.target.wants/dbus.service -> ../dbus.service
lrwxrwxrwx 1 root root 13 Feb 21 09:37 ./usr/lib/systemd/system/ctrl-alt-del.target -> reboot.target
lrwxrwxrwx 1 root root 26 Feb 21 09:37 ./usr/lib/systemd/system/sockets.target.wants/systemd-journald.socket -> ../systemd-journald.socket
lrwxrwxrwx 1 root root 24 Feb 21 09:37 ./usr/lib/systemd/system/sockets.target.wants/systemd-logger.socket -> ../systemd-logger.socket
lrwxrwxrwx 1 root root 16 Feb 21 09:37 ./usr/lib/systemd/system/sockets.target.wants/syslog.socket -> ../syslog.socket
lrwxrwxrwx 1 root root 14 Feb 21 09:37 ./usr/lib/systemd/system/sockets.target.wants/dbus.socket -> ../dbus.socket
lrwxrwxrwx 1 root root 31 Feb 21 09:37 ./usr/lib/systemd/system/sockets.target.wants/systemd-udevd-control.socket -> ../systemd-udevd-control.socket
lrwxrwxrwx 1 root root 27 Feb 21 09:37 ./usr/lib/systemd/system/sockets.target.wants/systemd-shutdownd.socket -> ../systemd-shutdownd.socket
lrwxrwxrwx 1 root root 30 Feb 21 09:37 ./usr/lib/systemd/system/sockets.target.wants/systemd-udevd-kernel.socket -> ../systemd-udevd-kernel.socket
lrwxrwxrwx 1 root root 15 Feb 21 09:37 ./usr/lib/systemd/system/multi-user.target.wants/sshd.service -> ../sshd.service
lrwxrwxrwx 1 root root 18 Feb 21 09:37 ./usr/lib/systemd/system/multi-user.target.wants/sysinit.service -> ../sysinit.service
lrwxrwxrwx 1 root root 27 Feb 21 09:37 ./usr/lib/systemd/system/multi-user.target.wants/rear-boot-helper.service -> ../rear-boot-helper.service
lrwxrwxrwx 1 root root 31 Feb 21 09:37 ./usr/lib/systemd/system/multi-user.target.wants/systemd-udev-trigger.service -> ../systemd-udev-trigger.service
lrwxrwxrwx 1 root root 27 Feb 21 09:37 ./usr/lib/systemd/system/multi-user.target.wants/systemd-journald.service -> ../systemd-journald.service
lrwxrwxrwx 1 root root 15 Feb 21 09:37 ./usr/lib/systemd/system/multi-user.target.wants/getty.target -> ../getty.target
lrwxrwxrwx 1 root root 17 Feb 21 09:37 ./usr/lib/systemd/system/default.target -> multi-user.target
lrwxrwxrwx 1 root root 17 Feb 21 09:37 ./usr/lib/systemd/system/getty.target.wants/getty@tty4.service -> ../getty@.service
lrwxrwxrwx 1 root root 17 Feb 21 09:37 ./usr/lib/systemd/system/getty.target.wants/getty@tty1.service -> ../getty@.service
lrwxrwxrwx 1 root root 17 Feb 21 09:37 ./usr/lib/systemd/system/getty.target.wants/getty@tty3.service -> ../getty@.service
lrwxrwxrwx 1 root root 17 Feb 21 09:37 ./usr/lib/systemd/system/getty.target.wants/getty@tty2.service -> ../getty@.service

After adding manually in the initrd these missing simlinks, the VM boots up !

I'm now investigating why Rear don't create systemd symlinks.

Florent38 commented at 2014-02-21 11:13:

I find the problem. I copied the rear src with scp and so symlinks were lost in usr/share/rear/skel/default/...

Sorry for the inconvenience


[Export of Github issue for rear/rear.]