Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
I think this is just saying that diskutil will automatically add additional partitions if needed, I don't think it should change the command?

@Patrice Brousseau What made you think to add `-` in the first place? To be clear, I want to add your fix since it made it work for you and it doesn't seem to break anything on my end, but I want to make sure I understand what I'm doing!
Like I’ve answered to @startergo , maybe it’s something on my side so I am not sure I am even correct in my assumptions.

If you want, when time permits, I’ll test again the script (adding myself the « - », just to be sure it’s really the culprit) and in terminal,commands line by line. Then, I’ll report back.

Regards,

Patrice
 
I would have an easier time dismissing this as a fluke if it didn't happen on two different computers you own running Mojave.

@startergo Did you actually test the USB Installer Creation script on Mojave, or just the downloader script? The former is something I added more recently—the downloader script saves a separate script next to the downloaded DMG, which can optionally be used to write the DMG to a USB drive.
 
  • Like
Reactions: Patrice Brousseau
I would have an easier time dismissing this as a fluke if it didn't happen on two different computers you own running Mojave.

@startergo Did you actually test the USB Installer Creation script on Mojave, or just the downloader script? The former is something I added more recently—the downloader script saves a separate script next to the downloaded DMG, which can optionally be used to write the DMG to a USB drive.
Like I’ve said, I’ll test the modded USB installer script later (medical appointment today) and report back.
 
Ok, adding the "-" as: sudo diskutil partitionDisk $disk_identifier GPT jhfs+ "$target_volname" - 100%

... in the script gave:

Incorrect number of arguments to form valid triplets, or syntax error in arguments preceding triplets

So, it appears that the "-" isn't the culprit after all?

What does the original cryptic message in Mojave "(external, does not appear to be a valid file system format or partition type
Use diskutil listFilesystems to view a list of supported file systems"
means then?

Also, why am I able to run the lines in the script one by one in the Terminal... and it works???
 
Hmm! MacMini Intel 2018 and Sequoia, same result:

"Please enter the volume name of your USB flash drive: UNTITLED
WARNING: All data on UNTITLED will be erased. Continue? (yes/no) yes
Password:
(external, does not appear to be a valid file system format or partition type
Use diskutil listFilesystems to view a list of supported file systems"
 
I would have an easier time dismissing this as a fluke if it didn't happen on two different computers you own running Mojave.

@startergo Did you actually test the USB Installer Creation script on Mojave, or just the downloader script? The former is something I added more recently—the downloader script saves a separate script next to the downloaded DMG, which can optionally be used to write the DMG to a USB drive.
Since there are many scripts in this thread, which one precisely you are referring to?
 
  • Like
Reactions: Patrice Brousseau
Since there are many scripts in this thread, which one precisely you are referring to?
Post #157

It is saved automatically in the same folder with the completed Mavericks installer. The script is named « Create Bootable Installer.command ».

The fact that it doesn’t work neither in Sequoia or Mojave on three machines tells me that:

- there is a bug somewhere in the script;

Or

- if it works for everybody else, something is amiss on my side… on three different computers!


Bash:
#!/bin/sh
set -e
cd "`dirname "$0"`"

asr imagescan --source InstallMacOSXMavericks.dmg

did_find_volume="false"
while [ $did_find_volume == "false" ]
do
    printf "Please enter the volume name of your USB flash drive: "
    read target_volname

    if df -l | grep -q "/Volumes/$target_volname"
    then
        did_find_volume=true
    else
        echo
        echo "Could not find a volume named $target_volname. Found these volumes:"
        df -l | awk -F'/Volumes/' '{print \$2}' | grep -v '^$'
        echo
    fi
done

printf "WARNING: All data on $target_volname will be erased. Continue? (yes/no) "
read confirmation
if [ "$confirmation" != "y" ] && [ "$confirmation" != "yes" ]; then
    echo "Exiting. No changes have been made."
    exit 1
fi

disk_identifier=$(diskutil list /Volumes/"$target_volname" | head -n 1)
sudo diskutil partitionDisk $disk_identifier GPT jhfs+ "$target_volname" 100%
sudo asr restore --source InstallMacOSXMavericks.dmg --noprompt --target /Volumes/"$target_volname" --erase
 
Last edited:
Hmm! MacMini Intel 2018 and Sequoia, same result:

"Please enter the volume name of your USB flash drive: UNTITLED
WARNING: All data on UNTITLED will be erased. Continue? (yes/no) yes
Password:
(external, does not appear to be a valid file system format or partition type
Use diskutil listFilesystems to view a list of supported file systems"
Okay, now that I can see the output I'm pretty sure disk_identifier isn't being set correctly on the third to last line of the script. Specifically, it's being set to (external instead of the disk identifier. Makes sense that could break since it's parsing the output of diskutil list.

Now I just have to figure out what to do about it...

What is the output of diskutil list on your Mac with the drive plugged in?
 
  • Like
Reactions: Patrice Brousseau
Okay, now that I can see the output I'm pretty sure disk_identifier isn't being set correctly on the third to last line of the script. Specifically, it's being set to (external instead of the disk identifier. Makes sense that could break since it's parsing the output of diskutil list.

Now I just have to figure out what to do about it...

What is the output of diskutil list on your Mac with the drive plugged in?
Here it is for the flash drive:


/dev/disk16 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *8.0 GB disk16
1: EFI NO NAME 209.7 MB disk16s1
2: Apple_HFS UNTITLED 7.7 GB disk16s2

It looks like your script targets the "external" part instead of the "diskX" part.
 
Here it is for the flash drive:


/dev/disk16 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *8.0 GB disk16
1: EFI NO NAME 209.7 MB disk16s1
2: Apple_HFS UNTITLED 7.7 GB disk16s2

It looks like your script targets the "external" part instead of the "diskX" part.
Thanks, I made an update that should fix the problem.
 
  • Like
Reactions: Patrice Brousseau
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.