Ticket #649 (closed defect: fixed)

Opened 22 months ago

Last modified 22 months ago

Serial Console for Mindi Boot Media

Reported by: msross Owned by: bruno
Priority: normal Milestone: 3.0.3
Component: mindi Version: 3.0.2
Severity: normal Keywords: mindi,console,serial
Cc:

Description

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
}

Change History

comment:1 Changed 22 months ago by bruno

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in rev [3051]. Also supports serial parameter and add entry into the doc.

Note: See TracTickets for help on using tickets.