知道分区的label信息,怎么查找到对应的是哪一个设备文件,以userdata分区为例:
执行如下命令:
/sbin/blkid | grep "userdata" | awk -F'[":"%]+' '{print($1)}'
命令输出:
Linux的分区label查看方式如下:
执行命令:/sbin/blkid
输出如下:
/dev/sde50: PARTLABEL="multiimgoem" PARTUUID="8c92ee74-0b82-1c43-7c7a-3c2d64f369c4"
/dev/sde51: PARTLABEL="multiimgqti" PARTUUID="cd346e6d-42d4-1904-c6dc-43e216e2a9f4"
/dev/sde52: PARTLABEL="uefivarstore" PARTUUID="1fdaaae6-6358-0030-edcc-9653f5cd90e2"
/dev/sde53: PARTLABEL="secdata" PARTUUID="6adb4198-308f-3783-ec23-242e7082eec1"
/dev/sde54: PARTLABEL="catefv" PARTUUID="d77566be-5b3a-134b-407c-0e22d4296109"
/dev/sde55: PARTLABEL="catecontentfv" PARTUUID="04695ec3-52bd-be22-76d6-7792725dce72"
Linux设置分区label信息:
方式一:格式化分区时指定
sudo mkfs.vfat /dev/sdb1 -n "qqqqqqqqqq"
说明:将/dev/sdb1设备格式化成fat格式,并指定label为 qqqqqqqqqq
方式二:修改分区label
fatlabel /dev/sdb1 aaaaa
说明:/dev/sdb1是fat分区格式,使用fatlabel命令将/dev/sdb1分区的label更改为aaaaa