Opened 12 years ago

Closed 12 years ago

#649 closed defect (fixed)

Serial Console for Mindi Boot Media

Reported by: Matthew Ross Owned by: Bruno Cornec
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 (1)

comment:1 by Bruno Cornec, 12 years ago

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.