{"id":342,"date":"2009-11-18T13:35:29","date_gmt":"2009-11-18T13:35:29","guid":{"rendered":"https:\/\/fir3netwp.gmsrrpobkbd.com\/2009\/11\/18\/enabling-a-serial-connection-when-booting-a-redhat-server-into-single-user-mode\/"},"modified":"2023-01-06T17:18:23","modified_gmt":"2023-01-06T17:18:23","slug":"enabling-a-serial-connection-when-booting-a-redhat-server-into-single-user-mode","status":"publish","type":"post","link":"https:\/\/www.fir3net.com\/UNIX\/Linux\/enabling-a-serial-connection-when-booting-a-redhat-server-into-single-user-mode.html","title":{"rendered":"Redhat Server Single User Mode: Enable Serial Connection"},"content":{"rendered":"

Please note : <\/em><\/strong>This article is based on RHEL5 and grub.<\/p>\n

Below shows the 2 methods you can use to ensure serial connectivity when booting into single user mode.
\nYou may find without changing this setting your connection is lost just after Redhat starts booting.This configuration change can be via the grub.conf or via the kernel line via the grub menu at boot.<\/p>\n

Via the grub.conf<\/strong><\/span><\/p>\n

Edit the grub.conf file so that the console setting is equal to ttyS0. (Lines have been omitted with !)<\/p>\n

root@localhost:~$ vi \/boot\/grub\/grub.conf
\n!
\nserial –unit=0 –speed=9600
\nterminal –timeout=5 serial console
\n!
\n!
\ntimeout=5
\ntitle Red Hat Enterprise Linux Server (2.6.18-92.el5PAE)
\nroot (hd0,0)
\nkernel \/vmlinuz-2.6.18-92.el5PAE ro root=\/dev\/vg0\/root console=ttyS0\u00a0<\/strong>
\ninitrd \/initrd-2.6.18-92.el5PAE.img
\ntitle Red Hat Enterprise Linux Server-base (2.6.18-92.el5)
\nroot (hd0,0)
\nkernel \/vmlinuz-2.6.18-92.el5 ro root=\/dev\/vg0\/root console=ttyS0 <\/strong>
\ninitrd \/initrd-2.6.18-92.el5.img<\/p>\n

Via the Grub Menu<\/span><\/strong><\/p>\n

When booting a server into single user mode the serial console which is normally supplied via the mingetty<\/p>\n

    \n
  1. From the GRUB menu<\/li>\n
  2. Press “p”<\/li>\n
  3. Enter the password if there is one.<\/li>\n
  4. Select the necessary kernel<\/li>\n
  5. Type “e”<\/li>\n
  6. Select the Kernel line (which begins with Kernel)<\/li>\n
  7. Type “e”<\/li>\n
  8. Ensure that the line includes “console=ttyS0” if not make the required changes<\/li>\n
  9. Press Return<\/li>\n
  10. Type “b”<\/li>\n<\/ol>\n

    Additional Notes<\/span><\/strong><\/p>\n

    The tty settings equate to :<\/p>\n