Single-user mode output to console (tty1) AND serial (ttyS0)

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite












I am using grub2 on CentOS 7. I would like to know if it's possible to display output to both serial (ttyS0) and console (tty1) when I attempt to boot into single user mode. The ultimate goal is to have a permanent "single user" grub menu item entry that I can select to boot into and I may be on serial or I may be on console.



Displaying output to both console and serial simultaneously works when the system boots under 'normal' conditions. Meaning, just a standard linux kernel boot line that grub2 would generate. My /etc/default/grub file looks like:



GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console serial"
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
GRUB_CMDLINE_LINUX="rd_NO_LUKS rd_NO_LVM rd_NO_DM crashkernel=auto rhgb quiet net.ifnames=0 biosdevname=0"
GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyS0,115200"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_LINUX_LABLE=true


After running grub2-mkconfig, my grub "linux16" line looks like:



linux16 /vmlinuz-3.10.0-693.2.2.el7.x86_64 root=UUID=ea3ace60-3b6f-4be1-beaa-fcab95e66bb1 ro rd_NO_LUKS rd_NO_LVM rd_NO_DM crashkernel=auto rhgb quiet console=tty1 console=ttyS0,115200


The kernel parameter that gets me to a shell without requiring a password is: rd.break (seems like there are many ways to boot into single-user mode so I chose this one but I can be convinced to use another method).



So, if I boot the system using



linux16 /vmlinuz-3.10.0-693.2.2.el7.x86_64 root=UUID=ea3ace60-3b6f-4be1-beaa-fcab95e66bb1 ro rd_NO_LUKS rd_NO_LVM rd_NO_DM crashkernel=auto rhgb quiet console=tty1 console=ttyS0,115200 rd.break


I get to a shell prompt but only over serial.



I have gotten single-user mode to display on tty1 (by putting console=tty1 at the end of the line) and not serial but I'd like to have both.



Is this possible? What combination of kernel parameters would work?



(If you have docs going into detail explaining why it's not possible I'll happily look them over. I can only guess that single-user mode only initiates the bare minimum and this includes virtual terminals???)







share|improve this question






















  • rd.break does not enter single user mode. Aside from the fact that single user mode hasn't been a mode since 1995 when it was split into two modes, rd.break is simply inserting a breakpoint, not actually changing to emergency or rescue mode.
    – JdeBP
    Dec 13 '17 at 21:41










  • Sometimes I learn bad habits when I read a blog post about something and it seems to work for me. Thanks for pointing that out. Both "rescue" and "emergency" modes show me a login prompt so I'm unsure how to proceed when I'm at a login prompt if I don't know my login. I may be facing problems with the "mode" I'm booting into and the "failed console redirection" (this question). Perhaps the break point is failing to let tty attach to both consoles?
    – harperville
    Dec 13 '17 at 21:50











  • This will work: Set console=tty1,ttyS0
    – antonio
    Aug 9 at 10:03















up vote
3
down vote

favorite












I am using grub2 on CentOS 7. I would like to know if it's possible to display output to both serial (ttyS0) and console (tty1) when I attempt to boot into single user mode. The ultimate goal is to have a permanent "single user" grub menu item entry that I can select to boot into and I may be on serial or I may be on console.



Displaying output to both console and serial simultaneously works when the system boots under 'normal' conditions. Meaning, just a standard linux kernel boot line that grub2 would generate. My /etc/default/grub file looks like:



GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console serial"
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
GRUB_CMDLINE_LINUX="rd_NO_LUKS rd_NO_LVM rd_NO_DM crashkernel=auto rhgb quiet net.ifnames=0 biosdevname=0"
GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyS0,115200"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_LINUX_LABLE=true


After running grub2-mkconfig, my grub "linux16" line looks like:



linux16 /vmlinuz-3.10.0-693.2.2.el7.x86_64 root=UUID=ea3ace60-3b6f-4be1-beaa-fcab95e66bb1 ro rd_NO_LUKS rd_NO_LVM rd_NO_DM crashkernel=auto rhgb quiet console=tty1 console=ttyS0,115200


The kernel parameter that gets me to a shell without requiring a password is: rd.break (seems like there are many ways to boot into single-user mode so I chose this one but I can be convinced to use another method).



So, if I boot the system using



linux16 /vmlinuz-3.10.0-693.2.2.el7.x86_64 root=UUID=ea3ace60-3b6f-4be1-beaa-fcab95e66bb1 ro rd_NO_LUKS rd_NO_LVM rd_NO_DM crashkernel=auto rhgb quiet console=tty1 console=ttyS0,115200 rd.break


I get to a shell prompt but only over serial.



I have gotten single-user mode to display on tty1 (by putting console=tty1 at the end of the line) and not serial but I'd like to have both.



Is this possible? What combination of kernel parameters would work?



(If you have docs going into detail explaining why it's not possible I'll happily look them over. I can only guess that single-user mode only initiates the bare minimum and this includes virtual terminals???)







share|improve this question






















  • rd.break does not enter single user mode. Aside from the fact that single user mode hasn't been a mode since 1995 when it was split into two modes, rd.break is simply inserting a breakpoint, not actually changing to emergency or rescue mode.
    – JdeBP
    Dec 13 '17 at 21:41










  • Sometimes I learn bad habits when I read a blog post about something and it seems to work for me. Thanks for pointing that out. Both "rescue" and "emergency" modes show me a login prompt so I'm unsure how to proceed when I'm at a login prompt if I don't know my login. I may be facing problems with the "mode" I'm booting into and the "failed console redirection" (this question). Perhaps the break point is failing to let tty attach to both consoles?
    – harperville
    Dec 13 '17 at 21:50











  • This will work: Set console=tty1,ttyS0
    – antonio
    Aug 9 at 10:03













up vote
3
down vote

favorite









up vote
3
down vote

favorite











I am using grub2 on CentOS 7. I would like to know if it's possible to display output to both serial (ttyS0) and console (tty1) when I attempt to boot into single user mode. The ultimate goal is to have a permanent "single user" grub menu item entry that I can select to boot into and I may be on serial or I may be on console.



Displaying output to both console and serial simultaneously works when the system boots under 'normal' conditions. Meaning, just a standard linux kernel boot line that grub2 would generate. My /etc/default/grub file looks like:



GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console serial"
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
GRUB_CMDLINE_LINUX="rd_NO_LUKS rd_NO_LVM rd_NO_DM crashkernel=auto rhgb quiet net.ifnames=0 biosdevname=0"
GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyS0,115200"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_LINUX_LABLE=true


After running grub2-mkconfig, my grub "linux16" line looks like:



linux16 /vmlinuz-3.10.0-693.2.2.el7.x86_64 root=UUID=ea3ace60-3b6f-4be1-beaa-fcab95e66bb1 ro rd_NO_LUKS rd_NO_LVM rd_NO_DM crashkernel=auto rhgb quiet console=tty1 console=ttyS0,115200


The kernel parameter that gets me to a shell without requiring a password is: rd.break (seems like there are many ways to boot into single-user mode so I chose this one but I can be convinced to use another method).



So, if I boot the system using



linux16 /vmlinuz-3.10.0-693.2.2.el7.x86_64 root=UUID=ea3ace60-3b6f-4be1-beaa-fcab95e66bb1 ro rd_NO_LUKS rd_NO_LVM rd_NO_DM crashkernel=auto rhgb quiet console=tty1 console=ttyS0,115200 rd.break


I get to a shell prompt but only over serial.



I have gotten single-user mode to display on tty1 (by putting console=tty1 at the end of the line) and not serial but I'd like to have both.



Is this possible? What combination of kernel parameters would work?



(If you have docs going into detail explaining why it's not possible I'll happily look them over. I can only guess that single-user mode only initiates the bare minimum and this includes virtual terminals???)







share|improve this question














I am using grub2 on CentOS 7. I would like to know if it's possible to display output to both serial (ttyS0) and console (tty1) when I attempt to boot into single user mode. The ultimate goal is to have a permanent "single user" grub menu item entry that I can select to boot into and I may be on serial or I may be on console.



Displaying output to both console and serial simultaneously works when the system boots under 'normal' conditions. Meaning, just a standard linux kernel boot line that grub2 would generate. My /etc/default/grub file looks like:



GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console serial"
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
GRUB_CMDLINE_LINUX="rd_NO_LUKS rd_NO_LVM rd_NO_DM crashkernel=auto rhgb quiet net.ifnames=0 biosdevname=0"
GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyS0,115200"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_LINUX_LABLE=true


After running grub2-mkconfig, my grub "linux16" line looks like:



linux16 /vmlinuz-3.10.0-693.2.2.el7.x86_64 root=UUID=ea3ace60-3b6f-4be1-beaa-fcab95e66bb1 ro rd_NO_LUKS rd_NO_LVM rd_NO_DM crashkernel=auto rhgb quiet console=tty1 console=ttyS0,115200


The kernel parameter that gets me to a shell without requiring a password is: rd.break (seems like there are many ways to boot into single-user mode so I chose this one but I can be convinced to use another method).



So, if I boot the system using



linux16 /vmlinuz-3.10.0-693.2.2.el7.x86_64 root=UUID=ea3ace60-3b6f-4be1-beaa-fcab95e66bb1 ro rd_NO_LUKS rd_NO_LVM rd_NO_DM crashkernel=auto rhgb quiet console=tty1 console=ttyS0,115200 rd.break


I get to a shell prompt but only over serial.



I have gotten single-user mode to display on tty1 (by putting console=tty1 at the end of the line) and not serial but I'd like to have both.



Is this possible? What combination of kernel parameters would work?



(If you have docs going into detail explaining why it's not possible I'll happily look them over. I can only guess that single-user mode only initiates the bare minimum and this includes virtual terminals???)









share|improve this question













share|improve this question




share|improve this question








edited Dec 13 '17 at 21:27

























asked Dec 13 '17 at 18:56









harperville

2272514




2272514











  • rd.break does not enter single user mode. Aside from the fact that single user mode hasn't been a mode since 1995 when it was split into two modes, rd.break is simply inserting a breakpoint, not actually changing to emergency or rescue mode.
    – JdeBP
    Dec 13 '17 at 21:41










  • Sometimes I learn bad habits when I read a blog post about something and it seems to work for me. Thanks for pointing that out. Both "rescue" and "emergency" modes show me a login prompt so I'm unsure how to proceed when I'm at a login prompt if I don't know my login. I may be facing problems with the "mode" I'm booting into and the "failed console redirection" (this question). Perhaps the break point is failing to let tty attach to both consoles?
    – harperville
    Dec 13 '17 at 21:50











  • This will work: Set console=tty1,ttyS0
    – antonio
    Aug 9 at 10:03

















  • rd.break does not enter single user mode. Aside from the fact that single user mode hasn't been a mode since 1995 when it was split into two modes, rd.break is simply inserting a breakpoint, not actually changing to emergency or rescue mode.
    – JdeBP
    Dec 13 '17 at 21:41










  • Sometimes I learn bad habits when I read a blog post about something and it seems to work for me. Thanks for pointing that out. Both "rescue" and "emergency" modes show me a login prompt so I'm unsure how to proceed when I'm at a login prompt if I don't know my login. I may be facing problems with the "mode" I'm booting into and the "failed console redirection" (this question). Perhaps the break point is failing to let tty attach to both consoles?
    – harperville
    Dec 13 '17 at 21:50











  • This will work: Set console=tty1,ttyS0
    – antonio
    Aug 9 at 10:03
















rd.break does not enter single user mode. Aside from the fact that single user mode hasn't been a mode since 1995 when it was split into two modes, rd.break is simply inserting a breakpoint, not actually changing to emergency or rescue mode.
– JdeBP
Dec 13 '17 at 21:41




rd.break does not enter single user mode. Aside from the fact that single user mode hasn't been a mode since 1995 when it was split into two modes, rd.break is simply inserting a breakpoint, not actually changing to emergency or rescue mode.
– JdeBP
Dec 13 '17 at 21:41












Sometimes I learn bad habits when I read a blog post about something and it seems to work for me. Thanks for pointing that out. Both "rescue" and "emergency" modes show me a login prompt so I'm unsure how to proceed when I'm at a login prompt if I don't know my login. I may be facing problems with the "mode" I'm booting into and the "failed console redirection" (this question). Perhaps the break point is failing to let tty attach to both consoles?
– harperville
Dec 13 '17 at 21:50





Sometimes I learn bad habits when I read a blog post about something and it seems to work for me. Thanks for pointing that out. Both "rescue" and "emergency" modes show me a login prompt so I'm unsure how to proceed when I'm at a login prompt if I don't know my login. I may be facing problems with the "mode" I'm booting into and the "failed console redirection" (this question). Perhaps the break point is failing to let tty attach to both consoles?
– harperville
Dec 13 '17 at 21:50













This will work: Set console=tty1,ttyS0
– antonio
Aug 9 at 10:03





This will work: Set console=tty1,ttyS0
– antonio
Aug 9 at 10:03
















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f410717%2fsingle-user-mode-output-to-console-tty1-and-serial-ttys0%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f410717%2fsingle-user-mode-output-to-console-tty1-and-serial-ttys0%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?