我正在尝试为 GPT 分区分配一个分区标签,并使用该分区标签作为在 Ubuntu 14.04 中安装的标识符。
首先我设置 GPT 并在卷上创建一个分区:
~# parted /dev/vdb -s -- mklabel gpt
~# parted /dev/vdb -s -- mkpart primary 0 -1
Warning: The resulting partition is not properly aligned for best performance.
Run Code Online (Sandbox Code Playgroud)
然后我将分区标签“TEST”分配给分区 1:
~# parted /dev/vdb -s -- name 1 TEST
Run Code Online (Sandbox Code Playgroud)
并用ext4格式化分区:
~# mkfs.ext4 /dev/vdb1
mke2fs 1.42.9 (4-Feb-2014)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
6553600 inodes, 26214391 blocks
1310719 blocks (5.00%) reserved for the super …
Run Code Online (Sandbox Code Playgroud)