LoginSignup
8
5

More than 5 years have passed since last update.

Ubuntu 17.04の起動が遅いときに試すこと

Posted at

環境

以下で試しています。

  • XPS15(9560)
  • Ubuntu 17.04

現象

前回チョーシのいいことを書きました

USBメモリからUbuntu 17.04をインストール時に "cdから追加パッケージをインストールするためのapt設定の試行に失敗しました" と出て終了する
http://qiita.com/furu8ma/items/79200c0530700645fab0

が、インストール時から完全快適な状態ではありませんでした。
Ubuntu on SSDになって超速に生まれ変わったはずなのに、なぜか起動が遅い。。
少なくとも1分くらいは待たされる感じです。
下手すると on HDDだった頃のUbuntuより遅い感じです。
ありえんだろ〜、というかこの遅さ、確実になにかのタイムアウトを待ってるよな...と直感し捜査開始。

/var/log/syslogから起動時のログを探ったところ

/var/log/syslog
May 26 21:43:12 XPS15 systemd[1]: Starting Stop ureadahead data collection...
May 26 21:43:12 XPS15 systemd[1]: Started Stop ureadahead data collection.
May 26 21:43:52 XPS15 systemd[1]: dev-disk-by\x2duuid-b778a358\x2d2ca2\x2d44db\x2db435\x2d8aedf35be8ff.device: Job dev-disk-by\x2duuid-b778a358\x2d2ca2\x2d44db\x2db435\x2d8aedf35be8ff.device/start timed out.
May 26 21:43:52 XPS15 systemd[1]: Timed out waiting for

やっぱりね!

ソリューション

偉大な先人はいるもので、ggったらヒットしました。

[SOLVED] Job dev-disk-by\x2duuid.device/start timed out.]
https://bbs.archlinux.org/viewtopic.php?id=196083

archlinuxの記事ではありますが。
結論からいうと、/etc/fstab,/etc/crypttabからマウントしていない行をコメントアウトすればいいらしいです。

/etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/nvme0n1p8 during installation
UUID=xxxxxx-xxxx-xxx-xxxx-xxxxxxxx /               ext4    errors=remount-ro 0       1
/swapfile                                 none            swap    sw              0       0
/dev/mapper/cryptswap1 none swap sw 0 0
/etc/crypttab
cryptswap1 UUID=b778a358-2ca2-44db-b435-8aedf35be8ff /dev/urandom swap,offset=1024,cipher=aes-xts-plain64

あれ、インストール時にスワップはしない設定にしたはずなんだけどな..
実際dfしてもswapに関する設定はでない。

ということで / 以外の行をコメントアウト。

結果、Ubuntuを選択してからログイン画面表示まで10秒かからないくらいまで改善されました。
いいね!

Screenshot from 2017-05-27 10-09-14.png

8
5
3

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
8
5