EFI Partition – How to Change Name and Logo

bootefipartitionssd

I've installed Windows again but this time on a external SSD.
it's all working fine, but when holding the alt/option key it's giving me Macintosh HD and EFI partition.
how can I change this name "EFI Partition" and its logo?
the logo is a orange one.
and I also want it to show up in system preferences startup selector on mac OSX.
it's only showing me Macintosh HD.

Best Answer

The icon displayed in the Mac Startup Manager can be changed by putting a icon set file named .VolumeIcon.icns in the root folder of the EFI partition used by Windows. Or, you can follow the instructions at the end of this answer.

A png file can be converted to icons file by using the commands sips and iconutil. A script for doing this is given below.

#!/bin/bash
#
#
if [[ $0 != "$BASH_SOURCE" ]]; then
    bash "$BASH_SOURCE" "$@"
    return
fi

Convert() {
    local -i "n=${1%%x*}"
    [[ $1 != *@2x ]] || n="2*n"
    sips -s format png -z "$n" "$n" "$full" --out "$name.iconset/icon_$1.png"
}

Main() {
    local "full=$1"
    local "base=$(basename "$full")"
    local "name=${base%.*}"
    rm -rf "$name.iconset"
    mkdir "$name.iconset"
    Convert "16x16"
    Convert "16x16@2x"
    Convert "32x32"
    Convert "32x32@2x"
    Convert "128x128"
    Convert "128x128@2x"
    Convert "256x256"
    Convert "256x256@2x"
    Convert "512x512"
    Convert "512x512@2x"
    iconutil -c icns "$name.iconset"
    rm -r "$name.iconset"
}
set -u
Main "$@"

For example, if you were to download this Windows 10 logo png file to the same folder as the script file, then the command given below would replace the png file with a icns file. Here, the script file is named createicns and Windows10.png is the png file. The result would be the creation a Windows10.icns file, which you would rename .VolumeIcon.icns.

./createicns Windows10.png

You can also download icns files for various operating systems from this website. I converted the Windows 10 logo png file and posted here for download. The file name is Windows10.icns.

The label displayed in the Mac Startup Manager can be changed by using the bless command. Assuming diskutil list shows your external drive is disk2 and the EFI partition is first on the drive, then command below would mount this partition.

sudo diskutil mount disk2s1

Assuming the EFI volume is labeled EFI, then the command below would change the label to Windows.

bless --folder /Volumes/EFI/efi/boot --label "Windows"

This command creates the two hidden files given below.

.disk_label
.disk_label_2x

Afterwards, the command given below can unmount the EFI partition.

diskutil unmount disk2s1

The Start Disk pane in System Preferences may not shown an Windows installation on an external drive. Or, if the installation does appear, you may not be able to successfully select the installation. AFAIK there is no fix for this.

There is an alternative where rEFInd can be used to select the default operation system directly from Windows, macOS and most Linux installations. However this requires installing a GUI script in each operation system as well as installing and configuring rEFInd.

Contents of an icns File

The contents of a icns file can vary depending on the version of OS X or macOS you are using. The table below can be used to compare the differences between an icns file create using El Capitan (OS X 10.11.6) and one created using Catalina (MacOS 10.15.4). Both files were creating using the same script as given above. The descriptions came from Wikipedia.

 10.11   10.15   Type = Description                   
------- ------- --------------------------------------------------------------------------------------
   X             s8mk = 16x16 8-bit mask
   X             is32 = 16×16 24-bit icon
           X     ic04 = 16x16 ARGB
   X       X     ic11 = 16x16@2x "retina" icon in JPEG 2000 or PNG format
   X             l8mk = 32×32 8-bit mask
   X             il32 = 32x32 24-bit icon
           X     ic05 = 32x32 ARGB
   X       X     ic12 = 32x32@2x "retina" icon in JPEG 2000 or PNG format
   X             t8mk = 128×128 8-bit mask
   X             it32 = 128×128 24-bit icon
           X     ic07 = 128x128 icon in JPEG 2000 or PNG format
   X       X     ic13 = 128x128@2x "retina" icon in JPEG 2000 or PNG format
   X       X     ic08 = 256×256 icon in JPEG 2000 or PNG format
   X       X     ic14 = 256x256@2x "retina" icon in JPEG 2000 or PNG format
   X       X     ic09 = 512×512 icon in JPEG 2000 or PNG format
   X       X     ic10 = 1024×1024 in 10.7 (or 512x512@2x "retina" in 10.8) icon in JPEG 2000 or PNG format
   X             name = Unknown
           X     info = Info binary plist. Usage unknown

 

Note: The icns files produced using Catalina appeared to only work with the firmware included with newer Intel Macs. The icns files produced using El Capitan appeared to work with the firmware included with all Intel Macs. I wrote "appeared", because I could not test on all Intel Macs.

A script, that can print out the types in a icns file, can be found in the file Notes.dmg, which is part of the Mac icons project.

How to Install the icns File

Enter the command diskutil list to determine the EFI partition where the Windows 10 boot files are stored. On my Mac, I get this:

/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         800.0 GB   disk0s2
   3:       Microsoft Basic Data Fish1                   98.0 GB    disk0s3
   4:       Microsoft Basic Data BOOTCAMP                91.5 GB    disk0s4
   5:       Microsoft Basic Data Fish2                   10.5 GB    disk0s5

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +800.0 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Muskie                  32.2 GB    disk1s1
   2:                APFS Volume Preboot                 107.2 MB   disk1s2
   3:                APFS Volume Recovery                1.0 GB     disk1s3
   4:                APFS Volume VM                      8.6 GB     disk1s4
   5:                APFS Volume Snapper - Data          660.0 GB   disk1s5
   6:                APFS Volume Snapper                 11.2 GB    disk1s6

/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.1 GB   disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:         Microsoft Reserved                         16.8 MB    disk2s2
   3:       Microsoft Basic Data BOOTCAMP                499.9 GB   disk2s3

The only external drive is disk2. The only EFI partition on this drive is disk2s1, so this is where the Windows 10 boot files are stored. The command below will mount the volume stored in this partition.

sudo diskutil mount disk2s1

This volume appears in the Finder as EFI. If I right click on the the volume and select Get Info, the following window appears.

To install the .icns file, drag the file and drop over the icon in the upper left corner of this window, as shown below.

The result is shown below.

The .VolumeIcon.icns file normally does not appear in the Finder. To view hidden files in the Finder, the key combination +shift+. needs to be pressed. The image below shows all the files and folders in the root folder of the volume in the EFI partition.

Finally, enter the command below to unmount the EFI volume.

diskutil unmount disk2s1

References

Create a Set of Icons That Includes High-Resolution Versions
Use iconutil to Create an icns File Manually
Apple Icon Image format
SourceForge Mac icns Project