From a252be4542016f72a70ceefbd413240d0d2903d5 Mon Sep 17 00:00:00 2001 From: aiminick Date: Sun, 4 Jul 2021 14:13:17 +0800 Subject: [PATCH] Create note.md --- docs/notes/note.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 docs/notes/note.md diff --git a/docs/notes/note.md b/docs/notes/note.md new file mode 100644 index 0000000..00f20d8 --- /dev/null +++ b/docs/notes/note.md @@ -0,0 +1,40 @@ +#### [ TIME ] Timed out waiting for device dev-ttyS0.device. [DEPEND] Dependency failed for Serial Getty on ttyS0. + +A start job is running for dev-ttyS0.device + +``` +[ TIME ] Timed out waiting for device dev-ttyS0.device. +[DEPEND] Dependency failed for Serial Getty on ttyS0. +``` + +/lib/systemd/system/serial-getty@.service + +## Steps + +#### 1. First copy the template: + +``` +# cp /usr/lib/systemd/system/serial-getty@.service /etc/systemd/system/serial-getty@ttyS0.service +``` + +#### 2. Then edit the file and modify the agetty line: + +``` +[Service] +ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM <-- Change this parameter +Type=idle +``` + +#### 3. Create a symlink: + +``` +# ln -s /etc/systemd/system/serial-getty@ttyS0.service /etc/systemd/system/getty.target.wants/ +``` + +#### 4. Reload the daemon and start the service: + +``` +# systemctl daemon-reload +# systemctl start serial-getty@ttyS0.service +# systemctl enable serial-getty@ttyS0.service +```