红联Linux门户
Linux帮助

Ubuntu 15.10自动挂载ext4分区

发布时间:2016-03-05 10:15:11来源:linux网站作者:intergameover

查看/etc/fstab:

UUID=990fd13e-a0b9-40fe-af7b-3b636383d765 /               ext4    errors=remount-ro 0       1
# /home was on /dev/sda6 during installation UUID=9aa85597-6ac7-4461-9c08-c5af603fbb79 /home           ext4    defaults        0       2
# swap was on /dev/sda1 during installation UUID=6a5da7c1-2c58-41de-acf3-fd18c4a0f5c0 none            swap    sw   0       0


查看分区对应UUID:

lee@dell:~$ sudo blkid
[sudo] password for lee:
/dev/sda1: UUID="6a5da7c1-2c58-41de-acf3-fd18c4a0f5c0" TYPE="swap" PARTUUID="5d15a0ab-01"
/dev/sda5: UUID="990fd13e-a0b9-40fe-af7b-3b636383d765" TYPE="ext4" PARTUUID="5d15a0ab-05"
/dev/sda6: UUID="9aa85597-6ac7-4461-9c08-c5af603fbb79" TYPE="ext4" PARTUUID="5d15a0ab-06"
/dev/sdb5: LABEL="data" UUID="145ec256-932f-4e66-b0a4-7629d8b4f802" TYPE="ext4" PARTUUID="02bd46ea-05"


把分区信息写到/etc/fstab中:

写完后的/etc/fstab如下:

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda5 during installation
UUID=990fd13e-a0b9-40fe-af7b-3b636383d765 /               ext4    errors=remount-ro 0       1
# /home was on /dev/sda6 during installation
UUID=9aa85597-6ac7-4461-9c08-c5af603fbb79 /home           ext4    defaults        0       2
# swap was on /dev/sda1 during installation
UUID=6a5da7c1-2c58-41de-acf3-fd18c4a0f5c0 none            swap    sw              0       0
# the second hard disk
UUID=145ec256-932f-4e66-b0a4-7629d8b4f802 /media/data     ext4   defaults       0       0


重启,ok。


本文永久更新地址:http://www.linuxdiyf.com/linux/18631.html