[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Booting an LDOM (can't find kernel)





On 07/27/2016 02:42 PM, rodent@NetBSD.org wrote:
On Wed, Jul 27, 2016 at 12:40:31PM +0300, Stanislav Kholmanskikh wrote:

There is an "issue". In order to let the kernel use the ldom console you
need to pass 'console=ttyHV0' (or do not pass any 'console=' at all),
not 'console=ttyS0'. But the file corresponding to this device is still
/dev/ttyS0.

Please, have a look at this thread:

http://marc.info/?l=linux-sparc&m=128984904112418&w=2

In particular, these steps should bring you the shell's prompt on the
ldom console:

telnet 127.0.0.1 5020
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.

Connecting to console "skholman-test4" in group "skholman-test4" ....
Press ~? for control options ..

#. ?
{0} ok boot disk bla
Boot device: /virtual-devices@100/channel-devices@200/disk@0  File and
args: bla
SILO Version 1.4.14

Your imagename `bla' and arguments `' have either wrong syntax,
or describe a label which is not present in silo.conf
Type `help' at the boot: prompt if you need it and then try again.

boot: Linux console=ttyHV0 init=/bin/sh

Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
/bin/sh: 0: can't access tty; job control turned off
# ls -l /dev/ttyS0
crw------- 1 root root 4, 64 Jul 27 05:23 /dev/ttyS0
# echo Hello > /dev/ttyS0
Hello
#

So my take is that if one setups systemd to always start a getty on
/dev/ttyS0, the login prompt will be shown on the ldom console when
Debian is booted with or without 'console=ttyHV0' on the cmdline.

This was very interesting. I was able to boot using:

append="console=ttyHV0,115200,8n1 init=/bin/sh"

and use "cu -l ttyV6" from the host to connect, as i do with other ldoms. It
looks like single user mode though. Without the "init=/bin/sh" bit, i get one
line further "[  OK  ] Started Daily apt activities." which sits there for a
while and returns no console prompt (unless i exhausted patience before then).

When you are in /bin/sh, try
mount -o remount,rw /
systemctl enable serial-getty@ttyS0.service

and reboot the ldom. Then boot 'Linux' (without init=) in SILO, and you will see kernel and systemd messages, and the login prompt on the ldom console.

{0} ok boot disk
Boot device: /virtual-devices@100/channel-devices@200/disk@0 File and args:
SILO Version 1.4.14
boot: Linux
Allocated 64 Megs of memory at 0x40000000 for kernel
<..>
[  OK  ] Started Regular background program processing daemon.
         Starting Login Service...
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Started Daily apt activities.
[  OK  ] Reached target Timers.
[  OK  ] Started OpenBSD Secure Shell server.
[  OK  ] Started /etc/rc.local Compatibility.
[  OK  ] Started Permit User Sessions.
[  OK  ] Started OpenBSD Secure Shell session cleanup.
[  OK  ] Started Getty on tty1.
[  OK  ] Started Serial Getty on ttyS0.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started Login Service.
[  OK  ] Started System Logging Service.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.
         Starting Update UTMP about System Runlevel Changes...
[  OK  ] Started Update UTMP about System Runlevel Changes.

Debian GNU/Linux stretch/sid debian ttyS0

debian login: root
Password:
Linux debian 4.5.0-2-sparc64-smp #1 SMP Debian 4.5.2-1 (2016-04-28) sparc64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@debian:~# cat /proc/cmdline
root=/dev/vdiska2 ro
root@debian:~#





Reply to: