1
0

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 5 years have passed since last update.

パーティションを結合したらUbuntuが起動しなくなった話

Last updated at Posted at 2016-08-13

症状

Ubuntu16.04(/dev/sda5), Ubuntu14.04(/dev/sda6), /home以下(/dev/sda8)をそれぞれパーティション切って使っていました。
しかしUbuntu16.04の領域を25GBしか確保しなかったため、使い始めて半年を待たずに空き領域が1/3になってしまいました。
そこで、全く使っていないUbuntu14.04の領域をパージし、Ubuntu16.04の領域を増やすことにしました。
gpartedで/dev/sda6を削除、/dev/sda5の領域を拡大することはすんなりできましたが...

GRUBからUbuntuを起動すると、以下のメッセージが。

Welcome to emergency mode! After logging in, type "journalctl -xb" to view
system logs, "systemctl reboot" to reboot, "systemctl default" to try again
to boot into default mode.
Give root password for maintenance
(or type Control-D to continue)

(引用元:RaspbianでWelcome to emergency mode!

/etc/fstabを確認してみる。

/etc/fstab
 UUID=ddf4ccf6-d9d9-4b08-9ab8-39b7a19aa77b /               ext4     errors=remount-ro 0       1
 # swap was on /dev/sda6 during installation
 UUID=144976b4-7d1e-41ff-9527-db2477a13d6e none            swap    sw              0       0
 /dev/sda8 /home ext4 defaults 0 2

errors=remount-roという見覚えのない文字が。
とりあえずバックアップを取ります。

 # cp /etc/fstab /etc/fstab.org

解決法

しかし原因はその行ではなく、その下の

/dev/sda8 /home ext4 defaults 0 2

の方にありました。
/dev/sda6を削除したことで、デバイスIDが前倒しになり、/dev/sda8が読みに行けないことが今回の症状の原因でした。
/etc/fstabを以下のように書き換えて再起動すると、復旧されました。

/etc/fstab
/dev/sda5 /               ext4    defaults 0       1
/dev/sda7 /home ext4 defaults 0 2
1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?