Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

camelia

macrumors 6502a
Original poster
Apr 3, 2015
714
123
Mexico City
Hello

I created my bootable macOS Big Sur USB in macOS Catalina but I can not eject it, which programs could be using it?

Which terminal commands I have to type to allow the USB eject, without causing problems in the disk or the information on it?

Thanks
Camelia

03 DoNotEject.jpg


04 Force Eject.jpg



I followed this tutorial
 
Possibly just quitting Terminal might enable ejecting, but restarting the computer should kill whatever might still be accessing the disk, then you can eject.
 
  • Love
Reactions: camelia
You can usually figure what is holding on to a drive with the Unix command line:
lsof +r5 -w /Volumes/<NameOfEjectableUSB>

This will repeat until all files on the drive are closed.
 
  • Love
Reactions: camelia
That's a common issue with Big Sur and newer installers. If you do the lsof, nothing will show up. Open DiskUtility and eject the USB Drive (not the volume). This will work in 99% of times.

In other cases, force eject the disk. There's a low chance it corrupts the USB installer.
 
  • Love
Reactions: camelia
Possibly just quitting Terminal might enable ejecting, but restarting the computer should kill whatever might still be accessing the disk, then you can eject.

I have typed the command "exit" in terminal and close it, issue still persists

You can usually figure what is holding on to a drive with the Unix command line:
lsof +r5 -w /Volumes/<NameOfEjectableUSB>

This will repeat until all files on the drive are closed.

@IceStormNG was right with the command above nothing is showing up 😭😭😭

That's a common issue with Big Sur and newer installers. If you do the lsof, nothing will show up. Open DiskUtility and eject the USB Drive (not the volume). This will work in 99% of times.

In other cases, force eject the disk. There's a low chance it corrupts the USB installer.

DiskUtility is not ejecting my USB 😭😭😭😭
Force eject the disk: The installer is corrupt 😭 😭 😭 😭

Newer installers since with macOS Big Sur version?

More details about the problem I am facing it

1.- Clean Install macOS Catalina (19H2) No Security Updates (Moving the .pkg from other
USB to Downloads folder and Run)
2.- My System is a MBP 2012 Mid (Unsupported Mac)
3.- I only want to create the USB installer USB not to install in this MBP (Office Mac)
4.- I have downloaded the .pkg v.11.5.2 (20G95) from
https://mrmacintosh.com/macos-big-sur-full-installer-database-download-directly-from-apple/
5.- When creating the USB installer Terminal ask me for a new permission (Click OK)

Do you see any other problems in the way I am trying to create the USB installer?

Thanks
Camelia

Ps: This is the first time I have this problem since Mavericks 😭😭😭 (I always create my Installer this way)

01 Terminal Acces.jpg
 
You can use an app called "install disk create" its freeware and it seems to work with versions since Mojave to big sur
 
  • Like
Reactions: camelia
You can use an app called "install disk create" its freeware and it seems to work with versions since Mojave to big sur
I do not need to use a Third-party tool if I am following and typing correctly the commands in terminal

Camelia
 
If force ejecting resulted in a corrupt installer, the creation process probably failed somewhere. That's probably why the drive wouldn't eject.

Whenever I've had issues creating a bootable USB installer, I have almost always resolved the issue by trying again using a different USB flash drive.

Good luck.
 
The problem start here:
01 Terminal Acces.jpg


Is there any terminal command to allow Terminal to access files on a removable volume BEFORE creating an Installer UBS stick?

Camelia
 
I found that there's a much easier way around this.

In Disk Utility there's an OSInstall(let me see if I can find the right name) thing that's mounted when the Big Sur USB is made. Ejecting that first will allow for the USB key just made to also be ejected.

The name escapes me right now... just know that it's an entry that pops up while making the USB key with the createinstallmedia Terminal command and you'll know it when you see it in Disk Utility - in the sidebar
 
Last edited:
  • Love
Reactions: camelia
I have created dozens of Big Sur bootable installers. All warn about other programs using the disk.
If you simply choose "Force Eject...", that will eject the disk.
In those dozens of installers, NONE have become corrupted, or did not work afterwards.
I think it is simply a glitch in how the installer is created, and does not affect the use of that installer.
As I said, I have created dozens of Big Sur installers, and all work - despite the force eject -- and I expect that a Force Eject will be needed.
 
  • Love
Reactions: camelia
In my case was because the "Shared Support" volume(s) is/are still mounted.

Find the disk ids with:

diskutil list

Then eject them with (example):

hdiutil eject /dev/disk8
 
  • Love
Reactions: camelia
In my case was because the "Shared Support" volume(s) is/are still mounted.

Find the disk ids with:

diskutil list

Then eject them with (example):

hdiutil eject /dev/disk8
This might be the name I was looking for in my comment above. Thanks. It's easier to see it using Disk Utility, but of course Terminal will do just fine if one is already in Terminal doing the createinstallmedia-dance which goes "forward - backward - forward - backward, even more backwards .. and now I've fallen off the cliff"
 
  • Like
Reactions: camelia
Not really.

sudo is beneficial as the default lsof on macOS (my version anyway) will NOT show files opened by other users. In this case here, sudo is used with createinstallmedia. Therefore lsof will not really find files opened by root.
 
  • Like
Reactions: camelia
The problem is that when createinstallmedia is done, it leaves mounted (though not visible in finder) a disk image from a file located on the created install media USB. You can see this with:

mount

and then to find where the disk image file is actually located run:

hdiutil info

(no sudo required)
 
  • Like
Reactions: camelia
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.