{"id":1618,"date":"2025-01-22T21:58:27","date_gmt":"2025-01-22T19:58:27","guid":{"rendered":"https:\/\/www.mcgill.org.za\/stuff\/?p=1618"},"modified":"2025-01-29T15:06:53","modified_gmt":"2025-01-29T13:06:53","slug":"serial-and-display-console","status":"publish","type":"post","link":"https:\/\/www.mcgill.org.za\/stuff\/archives\/1618","title":{"rendered":"Serial and display console"},"content":{"rendered":"\n<p>Configuration examples on the internets for configuring GRUB to boot serial console tend to turn off the regular console, for GRUB and for Linux.  Here&#8217;s how you get serial console <em>and <\/em>regular keyboard\/monitor console for <em>both <\/em>GRUB and Linux:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"># Tell GRUB to use both consoles<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>echo '<\/strong>#! \/bin\/sh\necho \"\nserial --unit=0 --speed=115200 --word=8 --parity=no --stop=0\nterminal_input --append serial\nterminal_output --append serial\n\"<strong>' > \/etc\/grub.d\/01_serial \nchmod 755 \/etc\/grub.d\/01_serial <\/strong><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"># Tell GRUB to have the kernel use both consoles<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>grep console=tty \/etc\/default\/grub ||\n         echo >> \/etc\/default\/grub 'GRUB_CMDLINE_LINUX=\"console=tty0 console=ttyS0,115200n8\"'<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"># Make new GRUB config with those settings<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>grub2-mkconfig > \/etc\/grub2.cfg  # CentOS\nupdate-grub2<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"># \/dev\/ttyS0 serial login &#8211; on older systems<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl enable serial-getty@ttyS0.service\nsystemctl start serial-getty@ttyS0.service<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Configuration examples on the internets for configuring GRUB to boot serial console tend to turn off the regular console, for GRUB and for Linux. Here&#8217;s how you get serial console and regular keyboard\/monitor console for both GRUB and Linux: # &hellip; <a href=\"https:\/\/www.mcgill.org.za\/stuff\/archives\/1618\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":null,"sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[153,37,323,190],"class_list":["post-1618","post","type-post","status-publish","format-standard","hentry","category-stuff","tag-grub","tag-linux","tag-serial","tag-stuff"],"_links":{"self":[{"href":"https:\/\/www.mcgill.org.za\/stuff\/wp-json\/wp\/v2\/posts\/1618","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mcgill.org.za\/stuff\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mcgill.org.za\/stuff\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mcgill.org.za\/stuff\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mcgill.org.za\/stuff\/wp-json\/wp\/v2\/comments?post=1618"}],"version-history":[{"count":4,"href":"https:\/\/www.mcgill.org.za\/stuff\/wp-json\/wp\/v2\/posts\/1618\/revisions"}],"predecessor-version":[{"id":1622,"href":"https:\/\/www.mcgill.org.za\/stuff\/wp-json\/wp\/v2\/posts\/1618\/revisions\/1622"}],"wp:attachment":[{"href":"https:\/\/www.mcgill.org.za\/stuff\/wp-json\/wp\/v2\/media?parent=1618"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mcgill.org.za\/stuff\/wp-json\/wp\/v2\/categories?post=1618"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mcgill.org.za\/stuff\/wp-json\/wp\/v2\/tags?post=1618"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}