forked from DGNum/liminix
switch from getty to root shell on console
this just makes things marginally simpler
This commit is contained in:
parent
c8b2d58dd3
commit
a0bd250963
8 changed files with 14 additions and 11 deletions
|
@ -69,10 +69,11 @@ device's serial console and the `QEMU monitor
|
||||||
stdin/stdout.
|
stdin/stdout.
|
||||||
|
|
||||||
You should now see Linux boot messages and after a few seconds be
|
You should now see Linux boot messages and after a few seconds be
|
||||||
presented with a login prompt. You can login on the console as
|
presented with a root shell prompt. You can run commands to look at
|
||||||
``root`` (password is "secret") and poke around to see what processes are
|
the filesystem, see what processes are running, view log messages (in
|
||||||
running. To kill the emulator, press ^P (Control P) then c to enter the
|
:file:/run/uncaught-logs.current), etc. To kill the emulator, press ^P
|
||||||
"QEMU Monitor", then type ``quit`` at the ``(qemu)`` prompt.
|
(Control P) then c to enter the "QEMU Monitor", then type ``quit`` at
|
||||||
|
the ``(qemu)`` prompt.
|
||||||
|
|
||||||
To see that it's running network services we need to connect to its
|
To see that it's running network services we need to connect to its
|
||||||
emulated network. Start the machine again, if you had stopped it, and
|
emulated network. Start the machine again, if you had stopped it, and
|
||||||
|
|
|
@ -8,7 +8,7 @@ in rec {
|
||||||
../modules/network
|
../modules/network
|
||||||
../modules/ssh
|
../modules/ssh
|
||||||
../modules/vlan
|
../modules/vlan
|
||||||
../modules/flashimage.nix
|
../modules/outputs/flashimage.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.tftp = {
|
boot.tftp = {
|
||||||
|
|
|
@ -80,10 +80,17 @@ let
|
||||||
run = {
|
run = {
|
||||||
file = ''
|
file = ''
|
||||||
#!${execline}/bin/execlineb -P
|
#!${execline}/bin/execlineb -P
|
||||||
/bin/getty -l /bin/login 115200 /dev/console
|
${execline}/bin/redirfd -w 2 /dev/console
|
||||||
|
${execline}/bin/fdmove -c 1 2
|
||||||
|
${execline}/bin/redirfd -r 0 /dev/console
|
||||||
|
${execline}/bin/cd /
|
||||||
|
/bin/ash -l
|
||||||
'';
|
'';
|
||||||
mode = "0755";
|
mode = "0755";
|
||||||
};
|
};
|
||||||
|
down-signal = {
|
||||||
|
file = "HUP\n";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
".s6-svscan" =
|
".s6-svscan" =
|
||||||
let
|
let
|
||||||
|
|
|
@ -2,7 +2,6 @@ set timeout 10
|
||||||
|
|
||||||
spawn socat unix-connect:vm/console -
|
spawn socat unix-connect:vm/console -
|
||||||
send "\r\n"
|
send "\r\n"
|
||||||
expect "login:" { send "root\r\n" }
|
|
||||||
expect "#"
|
expect "#"
|
||||||
send "echo HELLO WORLD > /hello\r\n"
|
send "echo HELLO WORLD > /hello\r\n"
|
||||||
expect "#"
|
expect "#"
|
||||||
|
|
|
@ -2,7 +2,6 @@ set timeout 10
|
||||||
|
|
||||||
spawn socat unix-connect:vm/console -
|
spawn socat unix-connect:vm/console -
|
||||||
send "\r\n"
|
send "\r\n"
|
||||||
expect "login:" { send "root\r\n" }
|
|
||||||
expect "#"
|
expect "#"
|
||||||
send "echo HELLO WORLD > /hello\r\n"
|
send "echo HELLO WORLD > /hello\r\n"
|
||||||
expect "#"
|
expect "#"
|
||||||
|
|
|
@ -2,4 +2,3 @@ set timeout 60
|
||||||
|
|
||||||
spawn socat unix-connect:vm/console -
|
spawn socat unix-connect:vm/console -
|
||||||
send "\r\n"
|
send "\r\n"
|
||||||
expect "login:"
|
|
|
@ -2,7 +2,6 @@ set timeout 60
|
||||||
|
|
||||||
spawn socat unix-connect:vm/console -
|
spawn socat unix-connect:vm/console -
|
||||||
send "\r\n"
|
send "\r\n"
|
||||||
expect "login:" { send "root\r\n" }
|
|
||||||
expect "#"
|
expect "#"
|
||||||
set FINISHED 0
|
set FINISHED 0
|
||||||
set EXIT "1"
|
set EXIT "1"
|
||||||
|
|
|
@ -2,7 +2,6 @@ set timeout 60
|
||||||
|
|
||||||
spawn socat unix-connect:vm/console -
|
spawn socat unix-connect:vm/console -
|
||||||
send "\r\n"
|
send "\r\n"
|
||||||
expect "login:" { send "root\r\n" }
|
|
||||||
expect "#"
|
expect "#"
|
||||||
set FINISHED 0
|
set FINISHED 0
|
||||||
set EXIT "1"
|
set EXIT "1"
|
||||||
|
|
Loading…
Reference in a new issue