Brian Cole
2011-02-15
I am trying to clone a device with no VGA connection, only a serial console
port. I am booting G4L off a usb drive. I figured out how to display the
initial menu in 'text' mode and how to output the syslinux boot to a terminal
progran connected to the serial port of the device. I get as far as a line
that says 'login : root login in 'tty1'', but that's as far as it gets. No
matter what i enter nor what keys I tap, I get no further results. I assume
that this is because it's starting the 'gui' portion and does not know how to
display as text only or to the console. Can anyone assist?
Michael Setzer II
2011-02-15
The G4L is only text based gui using dialog, so not sure what exactly is the
issue.
It should auto login on the first screen using g4l as userid. Secondary
terminals would give the login screen, that would ask for user id, which would
also be g4l.
What I do from remote or headless access is to use the kernel line option of
telnetd=yes to the boot option.
That causes the g4l to boot with the default kernel, and as part of the
startup process, it loads telnetd, and the machine can then be logged into
using PUTTY (better screen control than regular telnet). If the machine gets a
fixed IP from dhcpd, this is easy, but one can scan for what IP it gets.
Brian Cole
2011-02-15
I am trying to do a local backup/restore so I don't have these systems
connected to the network.
Michael Setzer II
2011-02-15
Does it let you enter g4l as the user id at the prompt?
What options did you use to get the syslinux menu to send output to the serial
port?
There is also another kernel line option that can be used.
run="command"
That might be required to have it run command that would setup the serial
port.
Brian Cole
2011-02-15
I never get to a prompt where I can enter anything. I tried typing g4l where
it stops, but get not response. This are the lines for boot options:
LABEL bz37
MENU DEFAULT
MENU LABEL ^F: bz37 386 build 2.6.37 01-05-2011
KERNEL bz37
APPEND initrd=ramdisk.lzma live-getty console=ttyS0,115200n81 telnetd=yes
ramdisk_size=65536 root=/dev/ram0
Brian Cole
2011-02-15
These are the last few lines that appear in the terminal window, then nothing
else:
Not loading any keymap -> US Layout
Setting Hostname
Error opening terminal: vt102.
Error opening terminal: vt102.
Error opening terminal: vt102.
Error opening terminal: vt102.
Error opening terminal: vt102.
Error opening terminal: vt102.
Error opening terminal: vt102.
Error opening terminal: vt102.
No volume groups found
login: root login on 'tty1'
Michael Setzer II
2011-02-15
I'm thinking it is something in the /etc/init.d/rcS startup script.
The lines I'm looking at are.
mount -t sysfs sysfs /sys
mount -t devpts devpts /dev/pts
mdev -s
That is how it activates the screens with the regular terminals, and it might
be that something similar needs to be done.
Don't have any systems with serial terminals?
Brian Cole
2011-02-15
I do not have an /etc/init directory, nor a rcS startup script. I am booting
off a usb drive and all files are at the root.
Michael Setzer II
2011-02-15
In the boot process, the kernel is loaded into the Ram.
The ramdisk.lzma is also loaded into ram as the root file system, and it
contains the all the directories and files.
What OS is the system running as is? What commands does it use to activate the
terminal?
Michael Setzer II
2011-02-15
http://www.vanemery.com/Linux/Serial/serial-
console.html
Seems to have info on setting up the serial terminal on boot up.
Looked, and don't currently have agetty include in g4l, but adding it to the
file system.
Would need to add the running to set up the correct options.
You message shows you are setting the console at boot to
live-getty console=ttyS0,115200n81
Seems that is working at boot, but it seems something isn't keeping it.
Might be adding a run= with commands to activate the serial port.
Michael Setzer II
2011-02-16
In the latest alpha, I've added the agetty program to the ramdisk.lzma file
system, but it would probable require a run= command line to activate
terminal.
ftp://amd64gcc.dyndns.org/g4l0.37alpha/
alpha 16 has it, or you can download that ramdisk.lzma file that has the
changes.
run="agetty -L (options for the port and speed) &"
The & at the end would be required to have it run in the background, otherwise
it would lock up the running script.
I don't have any terminals available to test it, but am going to look for a
null modem cable, or build one to see it I can test it using a PC.
Brian Cole
2011-02-17
I downloaded alpha 16 and made the changes to the syslinux.cfg as suggested,
but I still get to the same spot and then nothing as before.
Current Syslinux line:
LABEL bz37
MENU DEFAULT
MENU LABEL ^F: bz37 386 build 2.6.37 01-05-2011
KERNEL bz37
APPEND initrd=ramdisk.lzma live-getty console=ttyS0,115200n81 run="agetty -L
console=ttyS0,115200n81 &" ramdisk_size=65536 root=/dev/ram0
current last few lines of terminal session:
Not loading any keymap -> US Layout
Setting Hostname
Error opening terminal: vt102.
Error opening terminal: vt102.
Error opening terminal: vt102.
Error opening terminal: vt102.
Error opening terminal: vt102.
Error opening terminal: vt102.
Error opening terminal: vt102.
Error opening terminal: vt102.
No volume groups found
login: root login on 'tty1'
Michael Setzer II
2011-02-17
I don't think that is the correct syntax for the agetty.
From the web link it shows this info
s0:2345:respawn:/sbin/agetty -L -f /etc/issueserial 9600 ttyS0 vt100
Don't know exactly what the /etc/issueserial needs. It also only shows the
speed port and terminal type
Brian Cole
2011-02-17
I changed the syslinux line to this:
LABEL bz37
MENU DEFAULT
MENU LABEL ^F: bz37 386 build 2.6.37 01-05-2011
KERNEL bz37
APPEND initrd=ramdisk.lzma live-getty console=ttyS0,115200n81 run="agetty -L
115200 ttyS0 &" ramdisk_size=65536 root=/dev/ram0
Now I get as far as this in the terminal session:
login: root login on 'tty1'
g4l login: G4L
Password:
Login incorrect
g4l login: G4L
Password:
Login incorrect
g4l login:
What login and password should I be using?
Brian Cole
2011-02-17
If I type in G4L (uppercase) at the prompt, I get prompted for a password as
above. If I type in g4l (lowercase) at the prompt, I get the following:
g4l login: g4l
login: root login on 'ttyS0'
./g4lmenu.opt1591: line 1: Error: command not found
-bash-4.1#
Michael Setzer II
2011-02-17
The g4l id is lower case, so upper case would not work.
The login process should run the g4lmenu script on boot that prompts you to
enter the command you want, and it takes that command and creates a file
called g4lmenu.opt$$ where the $$ is the pid of the process. So, not clear on
why it isn't creating that file. Did it show the original g4lmenu dialog
screen?
Can you enter g4l command at the command line, and does it do anything.
What command got the terminal to work?
Brian Cole
2011-02-17
Please see entry 25 above for latest working syslinux line and response to
login attempts.
Michael Setzer II
2011-02-17
Saw the other response after I responded to the latest one.
After logining in, type g4l and enter and see if it runs the script with the
dialog menu.
Brian Cole
2011-02-17
What user name and password do I use to login?
Michael Setzer II
2011-02-17
The only user id is g4l and it has no password.
The script is also call g4l
You might want to add vt102 or vt100 to the end of the agetty line before the
& to make sure it is using the right type of terminal.
Brian Cole
2011-02-18
I have tried spcifying various different terminal type in the agetty line, all
with the same result. The latest version is as follows:
KERNEL bz37
APPEND initrd=ramdisk.lzma live-getty console=ttyS0,115200n81 run="agetty -L
115200 ttyS0 VT100 &" ramdisk_size=65536 root=/dev/ram0
Still, though, it boots and stops at a prompt as follows:
g4l login:
If I type in g4l (lowercase) at the prompt, I get the following:
g4l login: g4l
login: root login on 'ttyS0'
./g4lmenu.opt1591: line 1: Error: command not found
-bash-4.1#
Brian Cole
2011-02-18
I am only editing the syslinux.cfg file, is that correct? Should I have to
also edit the isolinux.cfg or oldkern.cfg files?
Michael Setzer II
2011-02-18
The isolinux.cfg is used if it is booting from a CD, syslinux.cfg if booting
from a flash. The oldkern.cfg was when I had more kernels than would fit on a
single screen. With the upgrade to Fedora 14 build, the older kernels would no
longer boot, or compile with changes. But the newer kernels seem to support
even old hardware.
In the message that I see as 21, it shows the final line as
-bash-4.1#
At that point, can you enter g4l and press enter
That should run the main g4l script.
If not, what does ls show
Brian Cole
2011-02-18
g4l login: g4l
login: root login on 'ttyS0'
./g4lmenu.opt1592: line 1: Error: command not found
-bash-4.1# g4l
'VT100': unknown terminal type.
Error opening terminal: VT100.
-bash-4.1# ./g4l
'VT100': unknown terminal type.
Error opening terminal: VT100.
-bash-4.1#
Michael Setzer II
2011-02-18
Linux is case sensitive, so the VT100 needs to be lower case.
Also, what does the env command show?
env | more
generally I got xterm under windows gui for TERM and linux for text.
Does the term list as vt100 or vt102 or something else? Might try using linux,
and see what happens.
Another thing you might check is to see if dialog is working with the
terminal.
dialog --msgbox "test" 0 0