[lxc-devel] How does the console work in most recent release?

Rob Landley rlandley at parallels.com
Fri Jan 7 13:29:02 UTC 2011


On 01/05/2011 05:19 AM, Daniel Lezcano wrote:
> there is a small bug when installing the template in the inittab, it should be:
> 
> ::sysinit:/etc/init.d/rcS
> tty1::respawn:/bin/getty -L tty1 115200 vt100
> console::askfirst:/bin/sh
> 
> Otherwise, I think the busybox version you are using is bogus. I had the same problem than you but I installed busybox-1.18.1, compiled as static, ran the template script, modified the inittab and it works like a charm.
> 
> Thanks for reporting the problem

I note that lxc-start and lxc-console still differ in that lxc-start leaves the host console in "cooked" mode, which makes using an interactive shell a bit clumsy.

~ # ls -l
ls -l
total 756
-rwxr-xr-x    1 root     root        768272 Jan  6 12:20 mount.cifs
drwxr-xr-x    2 root     root          1024 Jan  6 12:16 samba2
~ # 

Note how it echoed "ls -l" back at me.  Command history is inaccessible, entering passwords is a bit embarassing, etc.

lxc-console puts the console into raw mode, and behaves as expected.

I'm aware that /dev/console doesn't provide a controlling tty, but there should probably still be at least a command line option to put the host console into raw mode.  If the intended use of lxc-start is something like:

  lxc-start 2>&1 | tee walrus.log &

Then fiddling with the console attributes by default would be a bad idea, yes. :)

Rob




More information about the lxc-devel mailing list