15
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Ubuntu 18.04 ネットワーク接続の完了待ちのために起動が遅い問題の対処

Posted at

Ubuntu Server 18.04 LTS

$ lsb_release -a
(略)
Description: Ubuntu 18.04.4 LTS
(略)
$ uname -a
Linux kaen 4.15-0-88-generic #88-Ubuntu SMP Tue Feb 11 20:11:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

上記の環境で

A start job is running for wait for network to be configured.
が出て起動が遅い問題への対処法

#対処法1

~# systemctl disable systemd-networkd-wait-online.service
~# systemctl mask systemd-networkd-wait-online.service

を実行する(https://qiita.com/hatayan1126/items/c67f87a86f1538bb86af より引用)

#対処法2

によると、対処法1は望ましくなく以下のようにするべきであると記載されている。(記載は自身の環境に合わせて調整済み)

$ cat /etc/netplan/10-netcfg.yml
network:
    renderer: networkd
    version: 2
    ethernets:
        enp1s0:
            optional: true
        wlp2s0b1:
            optional: true
$ sudo netplan apply

上記により、起動時にOSが認識しているネットワークインタフェースは必ずしもネットワークに接続されている訳ではなく、接続を待つ必要が無い事をOS側に設定できると記載されている。

15
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?