Skip to contentSkip to conversation

Prevents two getty running on single serial console (hvc0)

PATCH In review [email protected] 2 participants 4 messages Jul 10, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Prevents two getty running on single serial console (hvc0)

When xen is enabled on raspberrypi4-64 machine user had two getty's running on the serial console device (hvc0) This led to root credentials failure continuously for few time followed by user getting the root prompt.
But user would be unable to operate on serial console as he gets "Login timed out after 60 seconds" within few seconds and the control goes back again asking login credentials.

---
 recipes-core/sysvinit/sysvinit-inittab_xen.inc | 1 -
 1 file changed, 1 deletion(-)
recipes-core/sysvinit/sysvinit-inittab_xen.inc +0 -1
index de0af20..04fd8f9 100644
@@ -1,4 +1,3 @@
 do_install_append() {
                 echo "" >> ${D}${sysconfdir}/inittab
-                echo "X0:12345:respawn:${base_sbindir}/getty-wrapper 115200 hvc0" >> ${D}${sysconfdir}/inittab
 }
Signature · 1 line
2.7.4
#1 lore raw
Quoted 8 lines · Ashish

When xen is enabled on raspberrypi4-64 machine user had two getty's running on the serial console device (hvc0) This led to root credentials failure continuously for few time followed by user getting the root prompt.
But user would be unable to operate on serial console as he gets "Login timed out after 60 seconds" within few seconds and the control goes back again asking login credentials.

The patch is missing a signed-off-by.

Also this change will likely re-introduce other issues, have a look at git history for that line. We need to have commentary on how the issue it was fixing won't re-occur.

Cheers,

Bruce

Quoted 17 lines
---
 recipes-core/sysvinit/sysvinit-inittab_xen.inc | 1 -
 1 file changed, 1 deletion(-)
recipes-core/sysvinit/sysvinit-inittab_xen.inc +0 -2
index de0af20..04fd8f9 100644
@@ -1,4 +1,3 @@
 do_install_append() {
                 echo "" >> ${D}${sysconfdir}/inittab
-                echo "X0:12345:respawn:${base_sbindir}/getty-wrapper 115200 hvc0" >> ${D}${sysconfdir}/inittab
 }
--

2.7.4

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
author
#2 lore raw

Hi Bruce ,

a)  Can you please let me know how can i participate here , as new to this upstream activity. Is there any way i can take come activity here,  as i wanted to contribute on meta-virtualization & xen.

b) Thanks for review  comments  , will revisit the patch with introduced this & proceed ahead.

- Ashish

#3 lore raw
Quoted 5 lines · Ashish

Hi Bruce ,

a) Can you please let me know how can i participate here , as new to this upstream activity. Is there any way i can take come activity here, as i wanted to contribute on meta-virtualization & xen.

There's no formula on how to best participate. My suggestion is just to have a goal in mind, i.e. build an application/system based on Xen running on platform "X". As you encounter errors or feature gaps, fix or implement the gap and send patches to the list. As you work through the issues, you'll inevitably find more things to contribute.

Quoted 3 lines

b) Thanks for review comments , will revisit the patch with introduced this & proceed ahead.

In particular, see the commit that introduced the wrapper and the commits before it. As you can see, we've tried to fix this multiple times and I don't want to re-introduce already fixed issues.

commit f1e768dfdfb148b9b4c6aaaf065ccea79dd5484d

Author: Jaewon Lee <[email protected]>
Date:   Mon Mar 23 17:01:24 2020 -0700

sysvinit-inittab_xen: Using getty wrapper to minimize console messages

Previously the following message was printed on the console every 5 minutes:
INIT: Id "X0" respawning too fast: disabled for 5 minutes

Installing and using a getty-wrapper that will check for the hypervisor (hvc0) device and if not present, will call sleep

:100644 100644 9d0589c de0af20 M
recipes-core/sysvinit/sysvinit-inittab_xen.inc

commit abcdb5841dfffc1ff4410f6c149dc304d4ac5e42

Author: Bruce Ashfield <[email protected]>
Date:   Fri Apr 12 10:53:51 2019 -0400

Revert "sysvinit-inittab_xen.inc: fix hypervisor console"

Temporarily reverting this commit, since it has broken some Xen boot usecases. We'll revisit this in the future.

This reverts commit 50cdecca7b2a0e1bb5eacbec132f26b802f950fc.

:100644 100644 4d56806 9d0589c M
recipes-core/sysvinit/sysvinit-inittab_xen.inc

commit 50cdecca7b2a0e1bb5eacbec132f26b802f950fc

Author: Manjukumar Matha <[email protected]>
Date:   Fri Mar 22 12:40:28 2019 -0700

sysvinit-inittab_xen.inc: fix hypervisor console

This commit switches over to using existing SERIAL_CONSOLES mechanism for hvc0 inittab entry generation. This then results in /bin/start_getty wrapper being used, which avoids the getty failure seen when running a xen capable rootfs natively on linux.

:100644 100644 9d0589c 4d56806 M
recipes-core/sysvinit/sysvinit-inittab_xen.inc

Bruce

Quoted 4 lines

- Ashish

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II