﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
649	Serial Console for Mindi Boot Media	Matthew Ross	Bruno Cornec	"I am trying to get mondo-rescue working through a serial console when booted from the restoration media; the environment in which will be used will be mainly a headless one.

From various other posts, I have tried setting serial=/dev/ttyS0 and console=ttyS0 which does indeed get me output through the serial connection during rcS execution.

Unfortunately, as soon as GetShell is launched all IO reverts to tty1 and given the exec there is no way around it I can see.
{{{
    setsid sh -c 'exec sh </dev/tty1 >/dev/tty 2>&1'
}}}

I did manage to get this working via the following changes to GetShell:
{{{
GetShell() {
    local console
    echo -en ""Type 'exit' to reboot the PC\n""
    umount -d /mnt/cdrom 2> /dev/null
    mount / -o rw,remount > /dev/null 2> /dev/null
    for i in `cat /proc/cmdline`; do
        echo $i | grep -qi console= && console=""/dev/`echo $i | cut -d= -f2`""
    done
    LogIt ""Launching Shell""
    if [[ $console != """" && -e $console ]]; then
        setsid sh -c ""exec sh <$console >$console 2>&1""
    else
        setsid sh -c ""exec sh </dev/tty1 >/dev/tty1 2>&1""
    fi
}
}}}
"	defect	closed	normal	3.0.3	mindi	3.0.2	normal	fixed	mindi,console,serial	
