Open claude4334 opened 9 years ago
Testing it:
$ vstart --con1=xterm dummy
============= Starting virtual machine "dummy" =============
Kernel: /home/kartoch/works/netkit/netkit-ng/kernel/netkit-kernel
Modules: /home/kartoch/works/netkit/netkit-ng/kernel/modules
Memory: 32 MB
Model fs: /home/kartoch/works/netkit/netkit-ng/fs/netkit-fs
Filesystem: /home/kartoch/tmp/dummy.disk (new)
Hostfs at: /home/kartoch
Running ==> xterm -e /home/kartoch/works/netkit/netkit-ng/kernel/netkit-kernel modules=/home/kartoch/works/netkit/netkit-ng/kernel/modules name=dummy title=dummy umid=dummy mem=36M ubd0=/home/kartoch/tmp/dummy.disk,/home/kartoch/works/netkit/netkit-ng/fs/netkit-fs root=98:0 uml_dir=/home/kartoch/.netkit/mconsole hosthome=/home/kartoch quiet con0=fd:0,fd:1 con1=xterm SELINUX_INIT=0
Parameters seems to be OK, so maybe it lacks kernel support ? A check of netkit-ng-kernel is needed...
Trying to launch kernel with con0=xterm
:
$ /home/kartoch/works/netkit/netkit-ng/kernel/netkit-kernel modules=/home/kartoch/works/netkit/netkit-ng/kernel/modules name=dummy title=dummy umid=dummy mem=36M ubd0=/home/kartoch/tmp/dummy.disk,/home/kartoch/works/netkit/netkit-ng/fs/netkit-fs root=98:0 uml_dir=/home/kartoch/.netkit/mconsole hosthome=/home/kartoch con0=xterm SELINUX_INIT=0
The system hangs after kernel boot:
Locating the bottom of the address space ... 0x10000
Locating the top of the address space ... 0xc0000000
Core dump limits :
soft - 0
hard - NONE
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
Checking advanced syscall emulation patch for ptrace...OK
Checking for tmpfs mount on /dev/shm...OK
Checking PROT_EXEC mmap in /dev/shm/...OK
Checking for the skas3 patch in the host:
- /proc/mm...not found: No such file or directory
- PTRACE_FAULTINFO...not found
- PTRACE_LDT...not found
UML running in SKAS0 mode
Adding 7794688 bytes to physical memory to account for exec-shield gap
Whatever I try, I have only one serial console enabled:
console [tty0] enabled
Initializing software serial port version 1
I think i found it: xterm mode requires port-helper
program from uml-utilities
. I removed it from original Netkit but it seems it is needed INSIDE the machines. I will try next monday, but if you need a fix for the WE, you can try to add the uml-utilities
in packages-list
file (inside netkit-ng-build/fs/
) and rebuild the fs.
See more UML documentations at http://lxr.free-electrons.com/source/Documentation/virtual/uml/UserModeLinux-HOWTO.txt
Hi,
sorry I wasn't much of a help this week, I did not have time to test it. Thank you for finding the solution ! I'll try it this week-end. Don't worry about the release (for me at least), no hurry.
Best, Claude.
That's not the solution: I was unable to open a second term even when uml-utilities is installed on the UML machines. Reading again various UML docs, I found that port-helper must be on the host.
I've posted messages on UML ML, hope someone can help me.
The filesystem is missing ttys in /dev
:
$ vstart --con1=xterm tadam
tadam# mknod -m 600 /dev/tty1 c 4 1
tadam# echo Hello world > /dev/tty1
tadam# cat < /dev/tty1
I can see the xterm pop when writing to /dev/tty1
for the first time and communication goes both ways. In order to get a full console in the new xterm, /etc/inittab
should be modified to add a new line (following netkit original filesystem):
2:23:respawn:/sbin/mingetty --noclear --noissue --autologin root tty1
To test it right away: tadam# kill -HUP 1
Alas for some reason when I reboot the machine with these modification the kernel panics... Maybe a race condition somewhere?
$ vstart --con0=this --con1=xterm tadam
PS. Testing with stock i386 versions from the netkit-ng homepage (kernel K3.2 filesystem F7.0) on a x86_64 host.
FYI: the race problem is a kernel issue: the bug does not appear when replacing the netkit-ng-kernel binary with 32-bit or 64-bit kernels from http://uml.devloop.org.uk/
There seems to be an issue with multiple consoles. Specifying in a lab.conf file the "A[con1]=xterm" directive does not raise an error, but does not open the second terminal on host A either.
Thank you Claude.