LoginSignup
69
54

More than 3 years have passed since last update.

Ubuntu 起動時にディスクをマウントする

Last updated at Posted at 2016-11-27

起動時にディスクをマウントする方法について記載。

マウントしたい端末のパスを確認。

$sudo fdisk -l

/dev/sda1           32768   124778495    62372864    7  HPFS/NTFS/exFAT

上記/dev/sda1は別のディスクに置き換わる可能性があるので、
UUIDで指定する必要があります。
なので、UUIDを確認

$sudo blkid /dev/sda1

/etc/fstabに起動時のマウント設定を記載

$vi /etc/fstab

記載例
(ファイルシステムはautoでも行ける模様)

UUID=7d9c943f-xxxxxxxxx       /mnt/sd ext4    defaults        0       0

再起動

$sudo shutdown -r now

マウントされているか確認します

$sudo cat /etc/mtab

補足
/etc/fstabの記載内容の詳細は以下の通り

1列目
デバイス名

2列目
マウントポイント

3列目
ファイルシステム

4列目
マウント時のオプション

5列目
ファイルシステムをdumpする必要があるか否かの指定
「0」または無記述の場合はdump不要のファイルシステム
であると見なされる。

6列目
システム起動時にfsckチェックを行うか否かの指定
「0」の場合はチェックを行わない。ルートファイルシステム
でチェックを行う場合は「1」を指定する。
ルートファイルシステム以外でチェックを行う場合は「2」 を指定する。

69
54
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
69
54