Hello List, I'm ironing out details to upgrade a few systems to CentOS7. My servers have BMC with Serial over LAN support. In C5 and C6, I determined how to have BIOS/POST, kernel, and serial console access. I'm reading up on the method to accomplish the pieces with C7. Presently SoL output works, so I see BIOS/POST messages and the GRUB boot list. My changes to enable serial redirection for the kernel do not appear to work. I've made the following changes to GRUB2's /etc/grub/default config file: -- removed rhgb -- added the console= settings to GRUB_CMDLINE_LINUX -- added the last two lines related to serial as detailed here [0]. * Is there an option to enable hardware flow control? I recall having to turn on flow control (agetty -h) to make it behave. No mention of flow control at [1] or [2]. Nor does RHEL7 doc [3] mention it. I've already tweaked the systemd service I generated for ttyS1 (I'm using COM2 for SoL) and added the agetty "-h" option (for hardware flow control). Despite modifying the baud rate to reflect the BMC's settings, I only get symbols (so the console settings are amiss). Would anyone be so kind as to share their experience? What has worked for your BMC/SoL configurations? [0] https://fedoraproject.org/wiki/GRUB_2#Enable_Serial_Console_in_Grub [1] http://www.gnu.org/software/grub/manual/grub.html#Serial-terminal [2] http://www.gnu.org/software/grub/manual/grub.html#serial [3] https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sec-GRUB_2_over_Serial_Console.html [4] https://lists.centos.org/pipermail/centos/2014-October/146719.html -- ---~~.~~--- Mike // SilverTip257 //
On 10/15/2015 03:05 PM, Mike - st257 wrote:> Would anyone be so kind as to share their experience? > What has worked for your BMC/SoL configurations?I have a C7 server with a physical RS-232 console, but the config should be similar. I did not have to generate a systemd service for this; systemd saw the console line and automatically started the getty without me having to generate a .service file (as far as I recall all I had to do was generate the proper /etc/default/grub, and then run 'grub2-mkconfig -o /boot/grub2/grub.cfg' and it Just Worked). Now, I have the system set for console on both the VGA and on ttyS0, and I am not using flow-control. Here's what I have that works (again with a physical ttyS0): [root at backup670 ~]# cat /etc/default/grub GRUB_TIMEOUT=5 GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_SERIAL_COMMAND="serial --unit=0 --speed=9600 --word=8 --parity=no --stop=1" GRUB_TERMINAL_OUTPUT="console serial" GRUB_CMDLINE_LINUX="rd.md.uuid=long-uuid-string crashkernel=auto rd.lvm.lv=vg/swap rd.lvm.lv=vg/root rd.md.uuid=another-long-uuid console=tty0 console=ttyS0,9600 rd_NO_PLYMOUTH" GRUB_DISABLE_RECOVERY="true" Also see: http://0pointer.de/blog/projects/serial-console.html There should be no need to modify any .service files; simply editing /etc/default/grub and regenerating grub2's config should be enough; it was in my case (I verified by looking through root's .bash_history and finding the lines around editing /etc/default/grub and not finding any edits of any .service files....)
I started to compose this message, then got busy with other work... Hopefully I'll have better details by the end of today. Thanks Lamar! On Thu, Oct 15, 2015 at 3:54 PM, Lamar Owen <lowen at pari.edu> wrote:> On 10/15/2015 03:05 PM, Mike - st257 wrote: > >> Would anyone be so kind as to share their experience? >> What has worked for your BMC/SoL configurations? >> > I have a C7 server with a physical RS-232 console, but the config should > be similar. I did not have to generate a systemd service for this; systemd > saw the console line and automatically started the getty without me having > to generate a .service file (as far as I recall all I had to do was > generate the proper /etc/default/grub, and then run 'grub2-mkconfig -o > /boot/grub2/grub.cfg' and it Just Worked). > > Now, I have the system set for console on both the VGA and on ttyS0, and I > am not using flow-control. Here's what I have that works (again with a > physical ttyS0): > > [root at backup670 ~]# cat /etc/default/grub > GRUB_TIMEOUT=5 > GRUB_DEFAULT=saved > GRUB_DISABLE_SUBMENU=true > GRUB_SERIAL_COMMAND="serial --unit=0 --speed=9600 --word=8 --parity=no > --stop=1" > GRUB_TERMINAL_OUTPUT="console serial" >I didn't have Term Output specified as you do. Probably the biggest problem right there, g'ah! ( will know when I have a moment to test )> GRUB_CMDLINE_LINUX="rd.md.uuid=long-uuid-string crashkernel=auto rd.lvm.lv=vg/swap > rd.lvm.lv=vg/root rd.md.uuid=another-long-uuid console=tty0 > console=ttyS0,9600 rd_NO_PLYMOUTH" >I didn't have the option to disable Plymouth. I see you don't have flow control enabled, otherwise you'd have 9600n8r I'll try it without n8r.> GRUB_DISABLE_RECOVERY="true" > > > Also see: http://0pointer.de/blog/projects/serial-console.html > > There should be no need to modify any .service files; simply editing > /etc/default/grub and regenerating grub2'sThe baud rate I used is not specified in any of the service files systemd generates. But as you've said I should _not need_ a service file (which is much like CentOS6 behaved with serial kernel params).> config should be enough; it was in my case (I verified by looking through > root's .bash_history and finding the lines around editing /etc/default/grub > and not finding any edits of any .service files....) > > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >-- ---~~.~~--- Mike // SilverTip257 //
Huge thanks to those who chimed in. An issue of PEBKAC on my part (but I was soooo close!). Once I got serial over LAN functioning I took the time pre-production to figure out exactly what options are necessary. Here's a recap of what I discovered. On Thu, Oct 15, 2015 at 3:54 PM, Lamar Owen <lowen at pari.edu> wrote:> On 10/15/2015 03:05 PM, Mike - st257 wrote: > >> Would anyone be so kind as to share their experience? >> What has worked for your BMC/SoL configurations? >> > I have a C7 server with a physical RS-232 console, but the config should > be similar. I did not have to generateI'm using COM2 (ttyS1) and leaving the physical COM1 (ttyS0) alone so it could be used with null modem or Cisco console cables. Slight difference, nothing that makes them wildly different.> a systemd service for this; systemd saw the console line and automatically > started the getty without me having to generate a .service file (as far as > I recall all I had to do was generate the proper /etc/default/grub, and > then run 'grub2-mkconfig -o /boot/grub2/grub.cfg' and it Just Worked). > > Now, I have the system set for console on both the VGA and on ttyS0, and I > am not using flow-control. Here's what I have that works (again with a > physical ttyS0): > > [root at backup670 ~]# cat /etc/default/grub > GRUB_TIMEOUT=5 > GRUB_DEFAULT=saved > GRUB_DISABLE_SUBMENU=true > GRUB_SERIAL_COMMAND="serial --unit=0 --speed=9600 --word=8 --parity=no > --stop=1" >I didn't need GRUB_SERIAL_COMMAND, but... I have "Redirection After Boot" enabled in my BIOS for the serial console, which is how I'm still able to see the GRUB prompt. And likely why I can omit the GRUB_SERIAL_COMMAND line. I also read about but did not need GRUB_TERMINAL=serial> GRUB_TERMINAL_OUTPUT="console serial" >I got away with keeping the default of: GRUB_TERMINAL_OUTPUT="console"> GRUB_CMDLINE_LINUX="rd.md.uuid=long-uuid-string crashkernel=auto rd.lvm.lv=vg/swap > rd.lvm.lv=vg/root rd.md.uuid=another-long-uuid console=tty0 > console=ttyS0,9600 rd_NO_PLYMOUTH" >I found things functioned fine _with_ "quiet" and without rd_NO_PLYMOUTH *hangs head* My PEBKAC was on the serial device ... I had /dev/ttyS1 instead of just _ttyS1_ ... my bad. GRUB_CMDLINE_LINUX="rd.luks.uuid=luks-1ad0ae71-75fa-46cf-aa5b-70e63c51a485 rd.lvm.lv=storage0/rootfs rd.lvm.lv=storage0/swap crashkernel=auto quiet console=tty0 console=ttyS1,57600n8r"> GRUB_DISABLE_RECOVERY="true" > > > Also see: http://0pointer.de/blog/projects/serial-console.html > > There should be no need to modify any .service files; simply editing > /etc/default/grub and regenerating grub2's config should be enough; it was > in my case (I verified by looking through root's .bash_history and finding > the lines around editing /etc/default/grub and not finding any edits of any > .service files....) >You are absolutely right, no need to modify service files (just like was the case with Upstart in EL6). ~]# cat /etc/default/grub GRUB_TIMEOUT=5 GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console" GRUB_CMDLINE_LINUX="rd.luks.uuid=luks-1ad0ae71-75fa-46cf-aa5b-70e63c51a485 rd.lvm.lv=storage0/rootfs rd.lvm.lv=storage0/swap crashkernel=auto quiet console=tty0 console=ttyS1,57600n8r" GRUB_DISABLE_RECOVERY="true" -- ---~~.~~--- Mike // SilverTip257 //