About Ubuntu and systemd
It is written in Internet that systemd is an initialisation deamon and it can replace /sbin/init. I think it's worth to belive.
Earlier we used the line in the file /etc/inittab to connect the debugging output to the serial console
T0:2345:respawn:/sbin/getty -L ttyS0 115200 vt100
С приходом systemd случилось так что /etc/inittab из деприкэйтид.
How to run a debug serial console in Debian.
Now the unit systemd /lib/systemd/system/serial-getty@.service is responsible for it.
As a rule the units are located here:
For viewing unit status we run the following command:
systemctl status serial-getty\@ttyS0.service ● serial-getty@ttyS0.service - Serial Getty on ttyS0 Loaded: loaded (/lib/systemd/system/serial-getty@.service; disabled) Active: active (running) since Tue 2015-06-30 08:35:58 UTC; 38min ago Docs: man:agetty(8) man:systemd-getty-generator(8) http://0pointer.de/blog/projects/serial-console.html Main PID: 3642 (login) CGroup: /system.slice/system-serial\x2dgetty.slice/serial-getty@ttyS0.service ‣ 3642 /bin/login -- Jun 30 08:35:58 user1--fuji systemd: Started Serial Getty on ttyS0. Jun 30 08:36:39 user1--fuji login: pam_env(login:session): Unable to open env file: /etc/default/locale: No such file or y Jun 30 08:36:39 user1--fuji login: pam_unix(login:session): session opened for user root by LOGIN(uid=0)
Here we need to pay attention to that the unit itself has the name: /lib/systemd/system/serial-getty@.service
and the properties are queried using:
The list of possible using of systemctl can be easily foung in Internet.
How to stop the serial console:
systemctl stop serial-getty\@ttyS0.service
How to start the serial console:
systemctl start serial-getty\@ttyS0.service
systemd looks a bit different in ubuntu. There is no utilities named systemd and systemctl in Ubuntu. But there is a short tutorial:
1) create a file named /etc/init/ttyS0.conf with the following content:
# This service maintains a getty on ttyS0 from the point the system is # started until it is shut down again. start on stopped rc RUNLEVEL= stop on runlevel [!12345] respawn exec /sbin/getty -L 115200 ttyS0 vt102
2) in ubuntu there is a similar command like systemctl in debian
sudo stop ttyS0 sudo start ttyS0
About installing or running ubuntu under/on powerpc, arm.
How can we install ubuntu on powerpc, arm:
Let's download iso distribution for the specific platform from the Internet. Usually there is a folder named casper in the iso distribution, this folder contains the file filesystem.squashfs. This is the root file system. Just copy it to our device.
We should locate in uBoot where the file system is located using the parameter root=/dev/sda2. Then we load the system. On the screen we can see the login from the display Manager, and in the debug console, if it is configured, we can see for example something like this:
Ubuntu 14.04.2 LTS localhost.localdomain ttyS0 localhost login: root Password: Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 4.0.3 ppc64)