Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel 4.16.1 problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
abduct
Apprentice
Apprentice


Joined: 19 Mar 2015
Posts: 189

PostPosted: Tue Apr 10, 2018 2:34 am    Post subject: Kernel 4.16.1 problems Reply with quote

Hi, I have a few problems since I did a `eix-sync' and compiled a new kernel among other applications.

The two main problems are that

1) In the initramfs I get the errors "No dolvm support listed in /proc/filesystems". This error is not present when booting from 4.15.15. I build my kernel with make oldsilentconfig and applied specific changed that may effect me.

2) When booting 4.16.1 I was constantly trying to login to my user and I am sure I got the password right, but it kept telling me to type in my username again. After a while it finally succeeded only to kick me back out to the login prompt within seconds. I booted 4.15.15 and I had a similar problem but after using ctrl+alt+fX to switch tty's around it finally decided to let me log in and kept me logged in.

All these problems started after a sync and emerge @world on April 8th which pulled in things such as gcc-7.3.0-r1, kernel 4.16.1, re-emerge of clang, llvm, libtool, etc. I followed most of the upgrade guides for these big packages.

Is there a way to try to isolate these problems and changes? I have backups of my old configs if I should say no to all of the new features (I said no to most but a few i added).

I am a bit stumped with this one since my quick google searches didn't bring up many other people having remotly similar problems.

Let me know if you need any specific information.

Thanks for the help.
Back to top
View user's profile Send private message
mikb
n00b
n00b


Joined: 14 Dec 2005
Posts: 71
Location: Sydney Australia

PostPosted: Wed Apr 11, 2018 6:29 am    Post subject: Me too, and more detail Reply with quote

I am seeing similar problems. The dolvm message appears spurious - my volumes decrypt normally and lvm is working just fine.
The other problem is rather more annoying, but I can add some further information.

For some strange reason, I have two (2) instances of agetty running on tty1:
Code:
root     18542  0.0  0.0   8496  1744 ?        Ss   08:48   0:00 /sbin/agetty -L -s 115200,38400,9600 tty1 vt102
root     23436  0.0  0.0   8496  1620 tty1     Ss+  09:55   0:00 /sbin/agetty 38400 tty1 linux

Which is what guarantees that I can't log in on tty1, because half my characters (randomly) are being sucked to each agetty instance.

tty2-tty6 work fine. All the agetty processes are parented by init.

I'm suspicious that something has happened to the config for early device initialisation (devfs? udev?) which is causing a serial port to be opened on tty1 (process 18542, above), irrespective of init (from the inittab) opening a normal login on

Any ideas how to correct this?

Thanks in advance.
_________________
With sufficient thrust, pigs fly just fine (RFC 1925, not actually talking about Gentoo)
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3349

PostPosted: Wed Apr 11, 2018 2:13 pm    Post subject: Reply with quote

Just for jollies, and to see if I could help, I just built and booted 4.16.1.

I don't share any of your symptoms, neither the "dolvm" error or multiple agettys on tty1.

If it matters, I'm using sddm to login, and I'm not encrypting my drive. There is no "lvm" in /proc/filesystems.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
mikb
n00b
n00b


Joined: 14 Dec 2005
Posts: 71
Location: Sydney Australia

PostPosted: Wed Apr 11, 2018 10:09 pm    Post subject: Reply with quote

depontius wrote:
I don't share any of your symptoms, neither the "dolvm" error or multiple agettys on tty1.


That's helpful, it suggests it's not a kernel problem with 4.16.1.

depontius wrote:
If it matters, I'm using sddm to login, and I'm not encrypting my drive. There is no "lvm" in /proc/filesystems.


The OP and I are trying to log in on virtual terminals, not the GUI (I also run sddm for that, and it has no problem).
_________________
With sufficient thrust, pigs fly just fine (RFC 1925, not actually talking about Gentoo)
Back to top
View user's profile Send private message
abduct
Apprentice
Apprentice


Joined: 19 Mar 2015
Posts: 189

PostPosted: Thu Apr 12, 2018 1:05 am    Post subject: Reply with quote

At least I know i am not the only one having this problem

I too have two TTY (although I am booted into my 4.15.15 kernel and have been using suspend to disk to bypass the frustrations when I grepped for tty).

Code:
root      6588  0.0  0.0  12620  1584 ?        Ss   Apr09   0:00 /sbin/agetty -L -s 115200,38400,9600 tty1 vt102
root      6590  0.0  0.0  12620  1636 tty1     Ss+  Apr09   0:00 /sbin/agetty 38400 tty1 linux


Is there a way to see the last N packaged that where emerged? If we both post them we may be able to track down a specific packaged perhaps.

I know I had a fairly big emerge of around 20 packages then the problems started to occur.

Also strangely enough I do not have lvm in /proc/filesystems either (when booted from 4.15.15) yet it does not complain. While 4.16.1 warns me there is no lvm in /proc/filesystems although it decrypts and mounts just fine.
Back to top
View user's profile Send private message
gentoo_ram
Guru
Guru


Joined: 25 Oct 2007
Posts: 408
Location: San Diego, California USA

PostPosted: Thu Apr 12, 2018 11:39 pm    Post subject: Reply with quote

If you are using OpenRC, then look in your /etc/inittab file.

If you are using systemd, I'm sorry.
Back to top
View user's profile Send private message
abduct
Apprentice
Apprentice


Joined: 19 Mar 2015
Posts: 189

PostPosted: Fri Apr 13, 2018 12:37 am    Post subject: Reply with quote

gentoo_ram wrote:
If you are using OpenRC, then look in your /etc/inittab file.

If you are using systemd, I'm sorry.


Yes I am using openrc here is my inittab. After a first glance I don't see anything wrong.

Code:
 cat /etc/inittab
#
# /etc/inittab:  This file describes how the INIT process should set up
#                the system in a certain run-level.
#
# Author:  Miquel van Smoorenburg, <miquels@cistron.nl>
# Modified by:  Patrick J. Volkerding, <volkerdi@ftp.cdrom.com>
# Modified by:  Daniel Robbins, <drobbins@gentoo.org>
# Modified by:  Martin Schlemmer, <azarah@gentoo.org>
# Modified by:  Mike Frysinger, <vapier@gentoo.org>
# Modified by:  Robin H. Johnson, <robbat2@gentoo.org>
# Modified by:  William Hubbs, <williamh@gentoo.org>
#

# Default runlevel.
id:3:initdefault:

# System initialization, mount local filesystems, etc.
si::sysinit:/sbin/openrc sysinit

# Further system initialization, brings up the boot runlevel.
rc::bootwait:/sbin/openrc boot

l0:0:wait:/sbin/openrc shutdown
l0s:0:wait:/sbin/halt -dhnp
l1:1:wait:/sbin/openrc single
l2:2:wait:/sbin/openrc nonetwork
l3:3:wait:/sbin/openrc default
l4:4:wait:/sbin/openrc default
l5:5:wait:/sbin/openrc default
l6:6:wait:/sbin/openrc reboot
l6r:6:wait:/sbin/reboot -dkn
#z6:6:respawn:/sbin/sulogin

# new-style single-user
su0:S:wait:/sbin/openrc single
su1:S:wait:/sbin/sulogin

# TERMINALS
#x1:12345:respawn:/sbin/agetty 38400 console linux
c1:12345:respawn:/sbin/agetty 38400 tty1 linux
c2:2345:respawn:/sbin/agetty 38400 tty2 linux
c3:2345:respawn:/sbin/agetty 38400 tty3 linux
c4:2345:respawn:/sbin/agetty 38400 tty4 linux
c5:2345:respawn:/sbin/agetty 38400 tty5 linux
c6:2345:respawn:/sbin/agetty 38400 tty6 linux

# SERIAL CONSOLES
#s0:12345:respawn:/sbin/agetty -L 115200 ttyS0 vt100
#s1:12345:respawn:/sbin/agetty -L 115200 ttyS1 vt100

# What to do at the "Three Finger Salute".
ca:12345:ctrlaltdel:/sbin/shutdown -r now

# Used by /etc/init.d/xdm to control DM startup.
# Read the comments in /etc/init.d/xdm for more
# info. Do NOT remove, as this will start nothing
# extra at boot if /etc/init.d/xdm is not added
# to the "default" runlevel.
x:a:once:/etc/X11/startDM.sh


I've noticed that if you use the alt+ctrl+fN keys and switch a few times that I am able to log in first try.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 5950
Location: Room 101

PostPosted: Fri Apr 13, 2018 1:35 am    Post subject: Re: Kernel 4.16.1 problems Reply with quote

abduct wrote:
1) In the initramfs I get the errors "No dolvm support listed in /proc/filesystems". This error is not present when booting from 4.15.15. I build my kernel with make oldsilentconfig and applied specific changed that may effect me.

abduct ... on a hunch, does it make any difference if you add 'rootfstype=ext4' as a kernel parameter?

mikb wrote:
For some strange reason, I have two (2) instances of agetty running on tty1:

abduct wrote:
I too have two TTY (although I am booted into my 4.15.15 kernel [...]

@mikb, @abduct ... I know that openrc added init to its tree, and that this can be used in place of sysvinit. Doing so requires something to start agetty, as inittab would nolonger be used, and my suspicion is that versions shipping this also provide an initscript to do this, and that in your case it is in the runlevel, even though you're still using sysvinit ... hence two instances of agetty. I'm still using a now ancient version of openrc, so I can't say what's happening with recent releases ... but that would seem to be the most logical explanation for what you're both experiencing. The output of 'rc-status --all' should provide some idea ...

HTH & best ... khay
Back to top
View user's profile Send private message
abduct
Apprentice
Apprentice


Joined: 19 Mar 2015
Posts: 189

PostPosted: Fri Apr 13, 2018 11:48 pm    Post subject: Reply with quote

I have added rootfstype=ext4 to my grub cmd line and rebuilt my config with grub-mkconfig and the initramfs still states

"No dolvm support listed in /proc/filesystems"
"dolvm is not likely to work on this medium"

Although I am booted fine.

As for the double tty1, using ctrl+alt+fN does indeed seem to resolve the problem. It likely crashes, kills, or closes the second tty1. After switching ttys and back I am able to login perfectly fine.

As for rc-status --all here is the results

Code:
# rc-status --all
Runlevel: boot
 hwclock                                                                                                                                                                                                              [  started  ]
 modules                                                                                                                                                                                                              [  started  ]
 fsck                                                                                                                                                                                                                 [  started  ]
 root                                                                                                                                                                                                                 [  started  ]
 hibernate-cleanup                                                                                                                                                                                                    [  started  ]
 mtab                                                                                                                                                                                                                 [  started  ]
 swap                                                                                                                                                                                                                 [  started  ]
 localmount                                                                                                                                                                                                           [  started  ]
 sysctl                                                                                                                                                                                                               [  started  ]
 bootmisc                                                                                                                                                                                                             [  started  ]
 termencoding                                                                                                                                                                                                         [  started  ]
 keymaps                                                                                                                                                                                                              [  started  ]
 procfs                                                                                                                                                                                                               [  started  ]
 loopback                                                                                                                                                                                                             [  started  ]
 hostname                                                                                                                                                                                                             [  started  ]
 binfmt                                                                                                                                                                                                               [  started  ]
 urandom                                                                                                                                                                                                              [  started  ]
Runlevel: default
 thermald                                                                                                                                                                                                             [  started  ]
 acpid                                                                                                                                                                                                                [  started  ]
 net.wlan0                                                                                                                                                                                                            [ inactive  ]
 netmount                                                                                                                                                                                                             [ scheduled ]
 vixie-cron                                                                                                                                                                                                           [  started  ]
 local                                                                                                                                                                                                                [  started  ]
Runlevel: shutdown
 killprocs                                                                                                                                                                                                            [  stopped  ]
 savecache                                                                                                                                                                                                            [  stopped  ]
 mount-ro                                                                                                                                                                                                             [  stopped  ]
Runlevel: nonetwork
 local                                                                                                                                                                                                                [  started  ]
Runlevel: sysinit
 sysfs                                                                                                                                                                                                                [  started  ]
 cgroups                                                                                                                                                                                                              [  started  ]
 devfs                                                                                                                                                                                                                [  started  ]
 udev                                                                                                                                                                                                                 [  started  ]
 dmesg                                                                                                                                                                                                                [  started  ]
 kmod-static-nodes                                                                                                                                                                                                    [  started  ]
 udev-trigger                                                                                                                                                                                                         [  started  ]
 syslog-ng                                                                                                                                                                                                            [  started  ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed/wanted
 dbus                                                                                                                                                                                                                 [  started  ]
 net.eth0                                                                                                                                                                                                             [  started  ]
 modules-load                                                                                                                                                                                                         [  started  ]
Dynamic Runlevel: manual


I am running openRC 0.35.5.

I am currently booted into 4.16.1 and it seems to behaving normally after the second tty1 is killed besides the no dolvm support message.

I am not sure where else to check.

Thanks for the help!
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 5950
Location: Room 101

PostPosted: Sat Apr 14, 2018 1:36 am    Post subject: Reply with quote

abduct wrote:
I have added rootfstype=ext4 to my grub cmd line and rebuilt my config with grub-mkconfig and the initramfs still states "No dolvm support listed in /proc/filesystems"

abduct ... ok, that was obviously not the issue, can you post the output of 'cat /proc/cmdline' ... and I assume you're using genkernel for initramfs creation?

abduct wrote:
As for the double tty1, using ctrl+alt+fN does indeed seem to resolve the problem. It likely crashes, kills, or closes the second tty1. After switching ttys and back I am able to login perfectly fine.

I seem to have been wrong suggesting openrc might be behind it, nothing in your runlevels to suggest this is correct. Hmmm ... can you post the output of the following:

Code:
# for i in /sbin/init* /etc/inittab ; do equery belongs -e "$i" ; done

best ... khay
Back to top
View user's profile Send private message
abduct
Apprentice
Apprentice


Joined: 19 Mar 2015
Posts: 189

PostPosted: Sat Apr 14, 2018 5:27 am    Post subject: Reply with quote

Yes I am using genkernel for initramfs creation. I've had to modify the genkernel scripts to repair broken hibernation/suspend to disk support though. Genkernel was updated when I started getting that error though.

Code:
# cat /proc/cmdline
BOOT_IMAGE=/kernel-genkernel-x86_64-4.16.1-gentoo root=/dev/mapper/vg0-root ro crypt_root=UUID=f6d12d99-a351-4af1-a9aa-7232421eb36d root=/dev/mapper/vg0-root resume=/dev/mapper/vg0-swap rootfstype=ext4 dolvm vga=791 splash=silent console=tty1 quiet net.ifnames=0 root_trim=yes i915.allow_pc8=1 pci_aspm=force i915.enable_rc6=1


Code:
 # for i in /sbin/init* /etc/inittab ; do equery belongs -e "$i" ; done
 * Searching for /sbin/init ...
sys-apps/sysvinit-2.89-r1 (/sbin/init)
 * Searching for /etc/inittab ...
sys-apps/sysvinit-2.89-r1 (/etc/inittab)


I noticed that there was a new kernel source 4.16.2 and a new genkernel package so I may try emerging them and trying it out. It may fix the dolvm message, but I doubt it will effect the double tty1 problem.

Thanks for the help
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 5950
Location: Room 101

PostPosted: Sat Apr 14, 2018 12:58 pm    Post subject: Reply with quote

@mikb ... can you also confirm you're on ~arch? ... and so =sys-apps/sysvinit-2.89-r1 and =sys-apps/openrc-0.35.5

@abduct ... I would suggest you rollback to =sys-apps/sysvinit-2.88-r9, it looks as though you should be able to do that as =sys-apps/openrc-0.35.5 only depends on >=sys-apps/sysvinit-2.86-r6. When you roll back replace /etc/inittab with the one from 2.86-r6 when you etc-update ... and then reboot, and check the agetty.

Oh, before you do that does openrc still provide /sbin/rc? (because this changed ... the path in inittab for 2.88 is now /sbin/openrc).

If rolling back sysvinit makes no difference can you do the same for openrc ... I guess to the last version you know to not have the getty issue.

best ... khay
Back to top
View user's profile Send private message
abduct
Apprentice
Apprentice


Joined: 19 Mar 2015
Posts: 189

PostPosted: Sun Apr 15, 2018 7:14 pm    Post subject: Reply with quote

@khayyam

I have both binaries on my system and they have different file sizes as per stat

Code:
# ls /sbin | grep rc
openrc
openrc-init
openrc-run
openrc-shutdown
rc
rc-service
rc-sstat
rc-update
# stat /sbin/openrc
  File: /sbin/openrc
  Size: 48168        Blocks: 96         IO Block: 4096   regular file
Device: fd01h/64769d   Inode: 1442127     Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2018-04-14 19:47:02.750999925 -0700
Modify: 2018-03-15 20:08:39.878012658 -0700
Change: 2018-03-15 20:08:44.992012701 -0700
 Birth: -
# stat /sbin/rc
  File: /sbin/rc
  Size: 48168        Blocks: 96         IO Block: 4096   regular file
Device: fd01h/64769d   Inode: 1442133     Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2018-03-15 20:08:39.906012658 -0700
Modify: 2018-03-15 20:08:39.906012658 -0700
Change: 2018-03-15 20:08:44.992012701 -0700
 Birth: -


I tried downgrading sysvinit to the lesser version stated above. After trying to do so shutdown, both shutdown and init could not find `/dev/initctl' as the file was not found. I tried to `mkfifo /dev/initctl' and even chmod it 0755 but afterwards shutdown and init were getting open/write timeout errors. I rm'd `/dev/initctl' emerged latest sysvinit and shutdown worked again.

I also noticed that emerging =sys-apps/sysvinit-2.88-r9 did not prompt me to update my configuration files via dispatch-conf nor etc-update.

I ended up emerging the latest sysvinit again to repair the shutdown and init messages.

I still have the double tty1 issue.

Is there a way to see previous versions of sysvinit and openrc installed? I am running the buildpkg feature if it helps track it down.

Is there any other logs that I could try searching in? I would think there would be a log of what was starting the second tty during init, or why.

Edit:: I found some emerge logs and I was indeed running sys-apps/sysvinit-2.88-r9 prior and updated to sys-apps/sysvinit-2.89-r1 likewise with sys-apps/openrc-0.35.3 to sys-apps/openrc-0.35.5. The date of the inital sysvinit upgrade was

Code:
# date -d @1522637914
Sun Apr  1 19:58:34 PDT 2018


and the openrc upgrade to 0.35.5:

Code:
# date -d @1521169731
Thu Mar 15 20:08:51 PDT 2018


It is likely this is a sysvinit package issue as I recall this all happening within the first week of april.


Last edited by abduct on Sun Apr 15, 2018 8:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 5950
Location: Room 101

PostPosted: Sun Apr 15, 2018 8:01 pm    Post subject: Reply with quote

abduct ...

that all points to =sys-apps/openrc-0.35.5 as being the root cause, its very difficult for me to offer much in the way of help because I've stuck with =sys-apps/openrc-0.12.4, but I suspect that recent versions change how openrc functions, the presence of /sbin/openrc-{init,shutdown} attest to that. The absence of /dev/initctl (which is created by init/sysvinit) is telling, and the fact the shutdown started working again after a re-install, similarly (it probably replaced a sym-link to openrc-shutdown).

If you didn't update /etc/inittab then this will still call 'openrc-run', and not 'rc' ... whether that makes a difference or not I can't say, but inittab was changed at some recent point as mine still has /sbin/rc.

It would have been good to see the output of following prior to you re-installing sysvinit (mikb?) ...

Code:
# ps -p 1 -o comm=
# ls -l /sbin/openrc-*
# ls -l /sbin/shutdown

best ... khay
Back to top
View user's profile Send private message
abduct
Apprentice
Apprentice


Joined: 19 Mar 2015
Posts: 189

PostPosted: Sun Apr 15, 2018 8:05 pm    Post subject: Reply with quote

New post for new updates:

I finished building kernel 4.16.2 and the dolvm message has gone away. I am pretty sure that the issue was genkernel 3.5.3.0 since when I pulled in the kernel 4.16.2 yesterday I also pulled in genkernel 3.5.3.2. Previously I was using genkernel 3.5.2.5 which also worked fine. I will monitor this for a bit.

I managed to downgrade to =sys-apps/sysvinit-2.88-r9 and fixed the /dev/initctl issue via symlinking /run/initctl to /dev/initctl for now. The double TTY1 is gone and I was able to login the first try.

Instead agetty is not even running on tty1! Which is fine since I was able to log in without hassle... (this output was taken from within a X environment).

Code:
 # ps aux | grep tty
root      6752  0.0  0.0  50204  2416 tty1     Ss   12:56   0:00 /bin/login --
root      6753  0.0  0.0  12620  1960 tty2     Ss+  12:56   0:00 /sbin/agetty 38400 tty2 linux
root      6754  0.0  0.0  12620  2036 tty3     Ss+  12:56   0:00 /sbin/agetty 38400 tty3 linux
root      6755  0.0  0.0  12620  2024 tty4     Ss+  12:56   0:00 /sbin/agetty 38400 tty4 linux
root      6756  0.0  0.0  12620  2020 tty5     Ss+  12:56   0:00 /sbin/agetty 38400 tty5 linux
root      6757  0.0  0.0  12620  2040 tty6     Ss+  12:56   0:00 /sbin/agetty 38400 tty6 linux
user    6759  0.0  0.0  15000  4580 tty1     S    12:56   0:00 -bash
user    6762  0.0  0.0  11880  3064 tty1     S+   12:56   0:00 /bin/sh /usr/bin/startx
user    6778  0.0  0.0  22460  1228 tty1     S+   12:56   0:00 xinit /home/user/.xinitrc -- /etc/X11/xinit/xserverrc :0 -auth /home/user/.serverauth.6762
root      6779  2.8  0.6 313160 37456 tty7     Ssl+ 12:56   0:09 /usr/bin/X -nolisten tcp :0 -auth /home/user/.serverauth.6762
user    6784  0.1  0.1 150888 11576 tty1     S    12:56   0:00 i3
user    6789  1.5  0.3 124628 19684 tty1     S    12:56   0:04 compton --config /home/user/.config/compton/config
user    6792  0.0  0.0  26664  1348 tty1     S    12:56   0:00 xautolock -detectsleep -time 5 -locker lock
user    6794  0.1  0.2 118888 15628 tty1     S    12:56   0:00 urxvtd --quiet --opendisplay --fork
root     10586  0.0  0.0  11128   952 pts/0    S+   13:01   0:00 grep --colour=auto tty


Here is the inittab that is being ran in case it was changed since the previous post of mine:

Code:
# cat /etc/inittab
#
# /etc/inittab:  This file describes how the INIT process should set up
#                the system in a certain run-level.
#
# Author:  Miquel van Smoorenburg, <miquels@cistron.nl>
# Modified by:  Patrick J. Volkerding, <volkerdi@ftp.cdrom.com>
# Modified by:  Daniel Robbins, <drobbins@gentoo.org>
# Modified by:  Martin Schlemmer, <azarah@gentoo.org>
# Modified by:  Mike Frysinger, <vapier@gentoo.org>
# Modified by:  Robin H. Johnson, <robbat2@gentoo.org>
# Modified by:  William Hubbs, <williamh@gentoo.org>
#

# Default runlevel.
id:3:initdefault:

# System initialization, mount local filesystems, etc.
si::sysinit:/sbin/openrc sysinit

# Further system initialization, brings up the boot runlevel.
rc::bootwait:/sbin/openrc boot

l0:0:wait:/sbin/openrc shutdown
l0s:0:wait:/sbin/halt -dhnp
l1:1:wait:/sbin/openrc single
l2:2:wait:/sbin/openrc nonetwork
l3:3:wait:/sbin/openrc default
l4:4:wait:/sbin/openrc default
l5:5:wait:/sbin/openrc default
l6:6:wait:/sbin/openrc reboot
l6r:6:wait:/sbin/reboot -dkn
#z6:6:respawn:/sbin/sulogin

# new-style single-user
su0:S:wait:/sbin/openrc single
su1:S:wait:/sbin/sulogin

# TERMINALS
#x1:12345:respawn:/sbin/agetty 38400 console linux
c1:12345:respawn:/sbin/agetty 38400 tty1 linux
c2:2345:respawn:/sbin/agetty 38400 tty2 linux
c3:2345:respawn:/sbin/agetty 38400 tty3 linux
c4:2345:respawn:/sbin/agetty 38400 tty4 linux
c5:2345:respawn:/sbin/agetty 38400 tty5 linux
c6:2345:respawn:/sbin/agetty 38400 tty6 linux

# SERIAL CONSOLES
#s0:12345:respawn:/sbin/agetty -L 115200 ttyS0 vt100
#s1:12345:respawn:/sbin/agetty -L 115200 ttyS1 vt100

# What to do at the "Three Finger Salute".
ca:12345:ctrlaltdel:/sbin/shutdown -r now

# Used by /etc/init.d/xdm to control DM startup.
# Read the comments in /etc/init.d/xdm for more
# info. Do NOT remove, as this will start nothing
# extra at boot if /etc/init.d/xdm is not added
# to the "default" runlevel.
x:a:once:/etc/X11/startDM.sh


So this essentially means to me that sys-apps/sysvinit-2.89-r1 has some kind of bug in it. I am not sure where to post a bug report for this package. Nor do I see other people posting about this bug.

Apon searching this post may have been effected by this as well: https://forums.gentoo.org/viewtopic-t-1078546-highlight-tty.html
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3349

PostPosted: Fri Apr 20, 2018 3:52 pm    Post subject: Reply with quote

I weighed in here earlier, as not having the problem. Part of that was that my laptop is not encrypted. Lately I've started thinking about doing that. As a first step, I've attached a "drive toaster", created an LVM container on a partition, etc, and copied my content to it. I can point an entry in my grub menu to load root from the toaster instead of the internal drive.

When I try to boot from the toaster drive, I see the kinds of problems you're discussing here. For a little background, I'm using grub-0.97 and genkernel. I've gone into genkernel.conf and put "YES" on the lvm and cryptsetup items. I added "dolvm" and "init=/linuxrc" to the kernel command line.

First, it doesn't find the root volume at all. I open a shell from grub and run "vgscan", "vgchange -a y", and then I can see and enter the root volume, "/dev/mapper/vg-root".

Second, when it boots, it comes to a text screen, not sddm. The text screen is flickering badly and I can't login. There are spurious characters in the upper-left of the screen. The login problem appears to be that the characters I'm typing in are going to multiple places, including the upper-left corner. They're being scattered, of course it won't work.

I'm running stable with the ~arch kernel:
Code:
localhost ~ $ uname -a
Linux localhost 4.16.2-gentoo #1 SMP Tue Apr 17 09:53:08 EDT 2018 x86_64 Intel(R) Core(TM) i5-4200M CPU @ 2.50GHz GenuineIntel GNU/Linux
localhost ~ $ emerge -ptv genkernel openrc sysvinit

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[ebuild   R    ] sys-apps/openrc-0.34.11::gentoo  USE="ncurses pam unicode -audit -debug -netifrc -newnet (-prefix) (-selinux) -static-libs" 0 KiB
[ebuild   R   ~] sys-kernel/genkernel-3.5.2.4::gentoo  USE="cryptsetup firmware (-ibm) (-selinux)" 0 KiB
[ebuild   R    ] sys-apps/sysvinit-2.88-r9::gentoo  USE="(-ibm) (-selinux) -static" 0 KiB

Total: 3 packages (3 reinstalls), Size of downloads: 0 KiB

 * IMPORTANT: 18 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


[Moderator edit: changed [quote] tags to [code] tags to preserve output layout. -Hu]
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
abduct
Apprentice
Apprentice


Joined: 19 Mar 2015
Posts: 189

PostPosted: Sat Apr 21, 2018 4:40 pm    Post subject: Reply with quote

@depontius here are some resources that may help you:

https://wiki.gentoo.org/wiki/Full_Disk_Encryption_From_Scratch_Simplified (this is what I used to loosly base my FDE off of)

And here are some of my scripts and CLI arguments for booting and compiling with genkernel:

Code:
$ type build-kernel
build-kernel is a function
build-kernel ()
{
    genkernel --initramfs-overlay=/var/lib/genkernel/overlay --luks --lvm all;
    grub-mkconfig -o /boot/grub/grub.cfg
}


You can safely remove the initramfs-overlay since it wont be present on your system. This is a hack to get suspend to swap/resume working with genkernel. The other two flags are mandatory.

Code:
#cat /etc/default/grub
[..snip..]
# Append parameters to the linux kernel command line
GRUB_CMDLINE_LINUX="crypt_root=UUID=snip root=/dev/mapper/vg0-root resume=/dev/mapper/vg0-swap dolvm vga=791 splash=silent console=tty1 quiet net.ifnames=0 root_trim=yes i915.allow_pc8=1 pci_aspm=force i915.enable_rc6=1"
[..snip..]


Most of these flags can be ignored. The ones of concern would be `crypt_root=UUID=', `root=', and `dolvm'.

Code:
# emerge -ptv openrc genkernel grub sysvinit

These are the packages that would be merged, in reverse order:

Calculating dependencies         ... done!                   
[ebuild   R    ] sys-boot/grub-2.02-r1:2/2.02-r1::gentoo  USE="fonts nls themes truetype -debug -device-mapper -doc -efiemu -libzfs -mount -multislot -sdl -static {-test}" GRUB_PLATFORMS="efi-64 pc -coreboot -efi-32 -emu -ieee1275 -loongson -multiboot -qemu -qemu-mips -uboot -xen -xen-32" 0 KiB
[ebuild   R    ] sys-kernel/genkernel-3.5.3.2::gentoo  USE="firmware -cryptsetup (-ibm) (-selinux)" 0 KB
[ebuild   R    ] sys-apps/openrc-0.35.5::gentoo  USE="ncurses netifrc pam static-libs unicode -audit -debug -newnet (-prefix) (-selinux)" 0 KiB
[ebuild   R    ]  sys-apps/sysvinit-2.88-r9::gentoo  USE="(-ibm) (-selinux) -static" 0 KiB

Total: 4 packages (4 reinstalls), Size of downloads: 0 KiB


I am not sure but I don't think grub legacy has support for LVM encrypted containers, but don't quote me on that. In fact I think the statement is wrong since I don't believe grub has anything to do with decryption or running the LVM besides booting into the initramfs. I just thought I recalled reading it somewhere.

Code:
# vi /etc/genkernel.conf
[..snip..]
 67 # Add in LVM support from static binaries if they exist on the system, or
 68 # compile static LVM binaries if static ones do not exist.
 69 LVM="yes"
 70
 71 # Add in Luks support. Needs sys-fs/cryptsetup with -dynamic installed.
 72 LUKS="yes"
[..snip..]


These are the only two relevant options I changed in the genkernel config. Although passing the command line argument variables --luks and --lvm do the same thing.

I would also check your fstab:

Code:
UUID=snip                                  /boot           vfat            noauto,noatime          1 2
UUID=snip      /               ext4            defaults                0 1
UUID=snip      /var            ext4            defaults                0 1
UUID=snip      /home           ext4            defaults                0 1
UUID=snip swap      swap      defaults      0 0


Have you tried switching TTY's around by any chance? CTRL+ALT+Fkeys1-8. I noticed that when I had my TTY problems I would get garbled and duplicate characters on the screen and switching TTY's away then back to the login prompt seemed to resolve the issues.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3349

PostPosted: Sat Apr 21, 2018 7:10 pm    Post subject: Reply with quote

I've been using the document you reference, as well as a few others.

So far I've been trying to use grub legacy, and I admit that that might be part of my problem. However when I drop to the shell when the booting system can't find my root, I do have lvm commands, so I guess genkernel muxt have put them into my initrd.

I also knew that I might have to move to grub2 for encrypted boot, I was just trying to avoid it. It may be that grub2 is needed even for lvm.

I've switched VTs away, but not away and back. I can give that a try next time I'm at this. The real world has pushed this aside, for the moment. I'll need to be checking your post more carefully when I have time to play with this again.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
mikb
n00b
n00b


Joined: 14 Dec 2005
Posts: 71
Location: Sydney Australia

PostPosted: Mon Apr 30, 2018 7:23 am    Post subject: Reply with quote

Do you by any chance have
Code:
console=tty1
in your kernel cmdline?

Try removing it (unless you need it for some reason).

A change was added upstream in February 2018 to automatically generate agetty on kernel consoles. I have just removed the parameter from my cmdline in grub, and the duplicate getty problem has gone away.

Here's the detail of the change:
Quote:

2018-02-20 Patch to automatically spawn agetty on kernel consoles Jesse Smith 1 -0/+74

The feature is useful for developers and admins that occasionally need
to boot with e.g. console=ttyS0.
The built in default can be overridden via inittab for each device. An
entry like "S0::off:" turns off the getty on ttyS0.


May be considered more a feature than a bug?
_________________
With sufficient thrust, pigs fly just fine (RFC 1925, not actually talking about Gentoo)
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5101
Location: The Peanut Gallery

PostPosted: Mon Apr 30, 2018 1:22 pm    Post subject: Reply with quote

mikb wrote:
May be considered more a feature than a bug?
The bug is that it defaults to on, and not off.
It should require an explicit cmdline parm to enable (since it's only of use to kernel devs, and embedded folks, that's not a big ask.)

Simply using "getty" instead of "console" (to establish the new behaviour, ie both) would be a better patch.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 12619

PostPosted: Tue May 01, 2018 3:05 am    Post subject: Reply with quote

mikb wrote:
A change was added upstream in February 2018 to automatically generate agetty on kernel consoles. I have just removed the parameter from my cmdline in grub, and the duplicate getty problem has gone away.
Could you provide a citation for this? I don't see anything by that user or with that subject line in Linus' tree.
Back to top
View user's profile Send private message
abduct
Apprentice
Apprentice


Joined: 19 Mar 2015
Posts: 189

PostPosted: Sun May 06, 2018 6:01 pm    Post subject: Reply with quote

mikb wrote:
Do you by any chance have
Code:
console=tty1
in your kernel cmdline?

Try removing it (unless you need it for some reason).

A change was added upstream in February 2018 to automatically generate agetty on kernel consoles. I have just removed the parameter from my cmdline in grub, and the duplicate getty problem has gone away.

Here's the detail of the change:
Quote:

2018-02-20 Patch to automatically spawn agetty on kernel consoles Jesse Smith 1 -0/+74

The feature is useful for developers and admins that occasionally need
to boot with e.g. console=ttyS0.
The built in default can be overridden via inittab for each device. An
entry like "S0::off:" turns off the getty on ttyS0.


May be considered more a feature than a bug?


Yes I do have `console=tty1' in my command line flags:

Code:
 $ cat /proc/cmdline
BOOT_IMAGE=/kernel-genkernel-x86_64-4.16.3-gentoo-rebirth root=/dev/mapper/vg0-root ro crypt_root=UUID=f6d12d99-a351-4af1-a9aa-7232421eb36d root=/dev/mapper/vg0-root resume=/dev/mapper/vg0-swap dolvm vga=791 splash=silent console=tty1 quiet net.ifnames=0 root_trim=yes i915.allow_pc8=1 pci_aspm=force i915.enable_rc6=1


When I got some spare time I will remove the mask on

Code:
 $ cat /etc/portage/package.mask/sysvinit
=sys-apps/sysvinit-2.89-r1


and see what happens when I remove that parameter.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
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