diskutil 重命名错误:“似乎不是其文件系统的有效卷名”

diskutil 重命名错误:“似乎不是其文件系统的有效卷名”

我正在尝试使用以下命令重命名已安装的 ISO 映像的卷名:

diskutil rename /dev/disk15  TEST_DISK_2014_RENAMED

我收到错误:

TEST_DISK_2014_RENAMED does not appear to be a valid volume name for its file system

我尝试运行它,sudo结果相同。

$ diskutil info /dev/disk15

Device Identifier:        disk15
Device Node:              /dev/disk15
Part of Whole:            disk15
Device / Media Name:      Apple read/write Media

Volume Name:              TEST_DISK_2014
Escaped with Unicode:     TEST_DISK_2014

Mounted:                  Yes
Mount Point:              /Volumes/TEST_DISK_2014
Escaped with Unicode:     /Volumes/TEST_DISK_2014

File System Personality:  UDF
Type (Bundle):            udf
Name (User Visible):      Universal Disk Format (UDF)

Content (IOContent):      None
OS Can Be Installed:      No
Media Type:               Generic
Protocol:                 Disk Image
SMART Status:             Not Supported

Total Size:               84.0 MB (83996672 Bytes) (exactly 164056 512-Byte-Blocks)
Volume Free Space:        0 B (0 Bytes) (exactly 0 512-Byte-Blocks)
Device Block Size:        512 Bytes

Read-Only Media:          No
Read-Only Volume:         Yes
Ejectable:                Yes

Whole:                    Yes
Internal:                 No
OS 9 Drivers:             No
Low Level Format:         Not supported

$ bash --version

GNU bash, version 4.3.27(1)-release (x86_64-apple-darwin12.5.0)

变化:

diskutil rename TEST_DISK_2014  TEST_DISK_2014_RENAMED
diskutil rename /Volumes/TEST_DISK_2014  TEST_DISK_2014_RENAMED
diskutil rename /Volumes/TEST_DISK_2014  /Volumes/TEST_DISK_2014_RENAMED
/Volumes/diskutil rename TEST_DISK_2014  "TEST_DISK_2014_RENAMED"
diskutil rename TEST_DISK_2014  'TEST_DISK_2014_RENAMED'
diskutil rename 'TEST_DISK_2014'  'TEST_DISK_2014_RENAMED'
diskutil rename "TEST_DISK_2014"  "TEST_DISK_2014_RENAMED"

什么都不起作用。

那么,故事是怎样的呢?正确的语法是什么?我找不到其他例子。

答案1

我在这篇博文中找到了解决方案: http://rexstjohn.com/fixing-does-not-appear-to-be-a-valid-volume-name-for-its-file-system/

如果您尝试使用 OS X 中的终端重新格式化卷,并且收到“错误:似乎不是其文件系统的有效卷名” - 您需要将您尝试指定的名称中的每个字母大写,如下所示:

diskutil partitionDisk /dev/disk2 1 MBRFormat "MS-DOS FAT32" EDISON 805.30M`

相关内容