An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Previous Thread
Next Thread
Print Thread
Can't delete this file from Trash
#30967 08/27/14 03:20 AM
Joined: Dec 2009
kevs Offline OP
OP Offline

Joined: Dec 2009
I have a file called boot.efi in trash. It wont delete from trash.

I tried secure empty, with option and/ or shift.

Short of going to the genius bar on this one, I would love if someone had a clear step by step way to nuke it out of there. thanks.

Re: Can't delete this file from Trash
kevs #30968 08/27/14 03:26 AM
Joined: Aug 2009
Likes: 15
Online

Joined: Aug 2009
Likes: 15
That's a system file that doesn't sound at all like it ought to be in the trash; before you nuke it, have you got any idea how it got there?

When I search my HD (Edit: OS X 10.6.8), I find these two items:
   /System/Library/CoreServices/boot.efi
   /usr/standalone/i386/boot.efi

Last edited by artie505; 08/27/14 03:26 AM.

The new Great Equalizer is the SEND button.

In Memory of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire
Re: Can't delete this file from Trash
kevs #30973 08/27/14 09:30 AM
Joined: Aug 2009
Likes: 4
Offline

Joined: Aug 2009
Likes: 4
It's possible that your Mac put it there after repairing your system. That's easily checked by restarting and seeing if it disappears from Trash.

Checking your system files to see that you have the requisite bits and pieces as suggested by artie wouldn't hurt either.

If all seems to be OK but it's still stuck in Trash, remove it via OnyX.

Re: Can't delete this file from Trash
kevs #30975 08/27/14 11:43 AM
Joined: Aug 2009
Offline

Joined: Aug 2009
I did a search for boot.efi, Included in the search preferences was system files are included. It showed on my mac in 2 places
Macintosh HD usr standalone 1386 boot.efi
An alias also showed in
Macintosh HD System Library CoreServices boot.efi
I am running 10.9.4 on an iMac, as previous people have suggested it might be a good idea to run a search for it

Re: Can't delete this file from Trash
MarkG #30978 08/27/14 03:49 PM
Joined: Dec 2009
kevs Offline OP
OP Offline

Joined: Dec 2009
It was identified by Sophos, my new virus software as a threat. I have no idea why or what it is. It in folders called system, in Time Machine, again, no idea. 40 threats, all deleted ok except this one. I renamed the folders to test, still would not delete. I don't have Onyx, it's the free one right? Any other ideas or utlities?


Re: Can't delete this file from Trash
kevs #30979 08/27/14 04:02 PM
Joined: Aug 2009
Likes: 7
Online

Joined: Aug 2009
Likes: 7
OnyX is free. You want version 2.4.0. Select the Cleaning tab and then select Trash.


Jon

macOS 11.7.10, iMac Retina 5K 27-inch, late 2014, 3.5 GHz Intel Core i5, 1 TB fusion drive, 16 GB RAM, Epson SureColor P600, Photoshop CC, Lightroom CC, MS Office 365
Re: Can't delete this file from Trash
jchuzi #30982 08/27/14 06:45 PM
Joined: Dec 2009
kevs Offline OP
OP Offline

Joined: Dec 2009
Problem solved.

Ah.. Jon, your post and link came after I did my own search, dang.

I Google Onyx and chose the first one listed, Google Adword, free download, and then my antivirus brought up a new threat, said spyware something... Search Genie, then took over my homepage...

So after I dealt with that, I found MacUpdates Onyx page. Then it would not download, said it was not an identified developer.

Did a search on Macupdate for "empty trash:" or delete trash, and the first one up is called Trash it!

Also not identified developer, but I overrode that and took a risk.

Ran the software, (an to my surprise), the trash can was clear as a bell afterwards.

Last edited by kevs; 08/27/14 06:46 PM.
Re: Can't delete this file from Trash
kevs #30983 08/27/14 06:46 PM
Joined: Aug 2009
Likes: 1
Offline

Joined: Aug 2009
Likes: 1
Some heuristic-based antivirus apps will wrongly flag boot.efi as a threat because it does things that a normal app should never do (contains code that changes how the Mac starts up). If you upload a clean boot.efi file from OS X to virustotal.com for instance, one of their scanners will flag it as possibly malicious.


Photo gallery, all about me, and more: www.xeromag.com/franklin.html
Re: Can't delete this file from Trash
tacit #30989 08/27/14 09:55 PM
Joined: Dec 2009
kevs Offline OP
OP Offline

Joined: Dec 2009
This was the last file in a filder called Mac, HD, then a folder system, etc to that file. And it was in Time Machine, don't ask me why, but it got scanned as a threat and would not delete from the trash. Headache.

Re: Can't delete this file from Trash
kevs #31005 08/28/14 08:56 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
When your Mac starts up, some file somewhere has to be the first file executed. This file, and the folder that contains it, is pointed to by from a fixed location (the Boot blocks) on an HFS+ volume. The file is called the blessed file, and the folder containing it is called the blessed folder. Having these fields filled in is what makes a volume bootable.


Begin trip down memory lane: On the original Macintosh, before HFS, the filesystem was flat. Folders existed only in the imagination of Finder, which obviously has not started running yet when the system is just booting up. The name of the blessed file (normally "System") was stored in the boot blocks.

HFS introduced folders, and the folder ID of the blessed folder was stored in the boot blocks, along with the name (still normally "System") of the blessed file, which was searched for only in that folder. Finder would automatically bless the first folder it saw containing both "System" and "Finder" (configurable in the boot blocks), and unbless any folder that you removed either "System" or "Finder" from. The fact that a blessed folder has been selected is what makes a volume bootable.

HFS+ replaced the names ("System" and "Finder") in the boot blocks with their inode numbers. The boot blocks contain the inode numbers of the blessed folder and the blessed file. (It also saves alternates of these, so that a single disk volume can boot into either OS X or Mac OS 9 or, in principle, some other OS. Press X or 9 at startup to select from the alternates, if any.)

End trip down memory lane.


The OS X installer sets the blessed folder to /System/Library/CoreServices, and the blessed file to /System/Library/CoreServices/boot.efi. You can see this by running the Terminal command:

bless --info

So, that's what boot.efi is intended to be. It's the very first file executed when you start up your system, and is the one responsible for getting everything else started.

Time Machine will, of course, back it up. If it didn't, a full disk restore wouldn't be bootable.

As of OS X 10.7 Lion, the installer will also try to create a Recovery HD partition. It sets the blessed folder of that to ./com.apple.recovery.boot, and the blessed file to ./com.apple.recovery.boot/boot.efi.

As of OS X 10.7.2, Time Machine backs up Recovery HD. Since Recovery HD may change (for example, if you upgrade the OS, or if you back up multiple machines to the same local disk and they're running different versions of the OS), it may have multiple backups of Recovery HD. It keeps them all in separate subfolders of backupvolume/Backups.backupdb/.RecoverySets. Each backup will have its own copy of com.apple.recovery.boot/boot.efi.

Then Time Machine sets the blessed folder of the Time Machine volume to the root folder of that volume, and the blessed file to tmbootpicker.efi. That makes the TM volume bootable. tmbootpicker.efi's job is to search through the Recovery HD backups in Backups.backupdb/.RecoverySets to find the right one for this machine, and transfers control to its boot.efi file. The boot continues as if you had booted into the Recovery HD partition that was backed up there.

In short, it is not unusual to find many copies of boot.efi scattered around your system. You should expect to see one in /System/Library/CoreServices on every volume you've installed OS X on, and in every TM backup of that volume. If you look under the right rocks, you'll also find one in the com.apple.recover.boot folder on every Recovery HD partition, and on each Time Machine volume backing up such a partition. There's also one inside the InstallESD.dmg file inside each OS X installer. Some of those rocks aren't exactly easy to look under. laugh

There's no reason for it to appear anywhere else, though. Anti-malware software might find it suspicious to find one where it's not expected.

boot.efi is typically locked. (tmbootpicker.efi is typically both locked and hidden.) You can't normally empty locked files from the Trash. You can unlock a file in Finder using Get Info and unchecking the Locked checkbox, or from Terminal using chflags nouchg files.... Holding down the option key when emptying the Trash will normally automatically unlock locked files, but boot.efi is normally owned by root, and you don't have permission to unlock it.

Re: Can't delete this file from Trash
ganbustein #31007 08/28/14 09:27 PM
Joined: Dec 2009
kevs Offline OP
OP Offline

Joined: Dec 2009
Thanks Gan, I understood the gist of that, but yes, Sophos flagged it, I deleted it, and it caused a lot of grief, until I found trash it! which nuked it instantly.

Lot of people on another forum suggesting terminal this, terminal that... lot of run a round....

Re: Can't delete this file from Trash
ganbustein #31013 08/29/14 04:14 PM
Joined: Aug 2009
Likes: 8
Online

Joined: Aug 2009
Likes: 8
Originally Posted By: ganbustein
Finder would automatically bless the first folder it saw containing both "System" and "Finder" (configurable in the boot blocks), and unbless any folder that you removed either "System" or "Finder" from.


Nice explanation! To add to the memory trip, in the older days, if a folder was blessed, its icon in Finder had a special "system symbol". As you said, if you "unblessed" the folder by removing System or Finder, the folder icon would revert to the plain icon version.


On a Mac since 1984.
Currently: 24" M1 iMac, M2 Pro Mac mini with 27" BenQ monitor, M2 Macbook Air, MacOS 14.x; iPhones, iPods (yes, still) and iPads.

Moderated by  alternaut, dkmarsh, joemikeb 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.4.33 Page Time: 0.028s Queries: 38 (0.015s) Memory: 0.6312 MB (Peak: 0.7360 MB) Data Comp: Zlib Server Time: 2024-03-28 17:37:08 UTC
Valid HTML 5 and Valid CSS