Am I doomed to reinstall OSX 10.11? (rm -f FAIL)

Anything not about Mac emulation.

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
User avatar
that-ben
Granny Smith
Posts: 141
Joined: Tue Nov 10, 2015 7:50 pm

Am I doomed to reinstall OSX 10.11? (rm -f FAIL)

Post by that-ben »

Am I doomed to reinstall OSX 10.11 in vmware or is there a miracle somebody can do to allow this file to be deleted? I can't believe Apple didn't think of this situation? Surely there must be a way to delete an iNode that has an invalid name?

Image
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Am I doomed to reinstall OSX 10.11? (rm -f FAIL)

Post by adespoton »

This might help:
https://unix.stackexchange.com/question ... mes-in-hex
Then you can just rm -f using the hex value with "rm -f \xNN"
User avatar
that-ben
Granny Smith
Posts: 141
Joined: Tue Nov 10, 2015 7:50 pm

Re: Am I doomed to reinstall OSX 10.11? (rm -f FAIL)

Post by that-ben »

adespoton wrote: Thu Aug 04, 2022 3:10 pm This might help:
https://unix.stackexchange.com/question ... mes-in-hex
Then you can just rm -f using the hex value with "rm -f \xNN"
UHM! Very interesting. Thanks for pointing this out, but I think I'm not typing the rm -f command correctly. See, it doesn't complain yet it seems to do nothing at all.

Image
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Am I doomed to reinstall OSX 10.11? (rm -f FAIL)

Post by adespoton »

tried rm -f \xe2\x90\x80\x0a ? Because what you wrote would be interpreted as rm -f \xe2+"90800a"....

[edit] Oh, and strip the newline character, as that's not actually part of the name:

rm -f \xe2\x90\x80
User avatar
that-ben
Granny Smith
Posts: 141
Joined: Tue Nov 10, 2015 7:50 pm

Re: Am I doomed to reinstall OSX 10.11? (rm -f FAIL)

Post by that-ben »

adespoton wrote: Thu Aug 04, 2022 3:39 pm tried rm -f \xe2\x90\x80\x0a ?
Absolutely, as shown in the screenshot in my previous post, and it yields no result. OSX does not complain but it also does nothing.
adespoton wrote: Thu Aug 04, 2022 3:39 pm [edit] Oh, and strip the newline character, as that's not actually part of the name: rm -f \xe2\x90\x80
Same. The stubborn file is not deleted and OSX does not output any error either. Tried both combinations of \x\x\x and only a single \x at the beginning of the name.

Image
Last edited by that-ben on Thu Aug 04, 2022 4:14 pm, edited 1 time in total.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Am I doomed to reinstall OSX 10.11? (rm -f FAIL)

Post by adespoton »

that-ben wrote: Thu Aug 04, 2022 4:09 pm
adespoton wrote: Thu Aug 04, 2022 3:39 pm tried rm -f \xe2\x90\x80\x0a ?
Absolutely, as shown in the screenshot in my previous post, and it yields no result. OSX does not complain but it also does nothing.
Your previous post shows \x0a, which is the screen linefeed and is not part of the file name.
User avatar
that-ben
Granny Smith
Posts: 141
Joined: Tue Nov 10, 2015 7:50 pm

Re: Am I doomed to reinstall OSX 10.11? (rm -f FAIL)

Post by that-ben »

It goes without saying that I've checked the disk with First Aid, but it has no issue at all.

Any other idea to try?
User avatar
that-ben
Granny Smith
Posts: 141
Joined: Tue Nov 10, 2015 7:50 pm

Re: Am I doomed to reinstall OSX 10.11? (rm -f FAIL)

Post by that-ben »

No solution except formating and reinstalling OSX?
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Am I doomed to reinstall OSX 10.11? (rm -f FAIL)

Post by adespoton »

You could do a block-level format of the affected node... I can't recall how to do that from Terminal though.
User avatar
that-ben
Granny Smith
Posts: 141
Joined: Tue Nov 10, 2015 7:50 pm

Re: Am I doomed to reinstall OSX 10.11? (rm -f FAIL)

Post by that-ben »

lol you mean like open that OSX disk image in a hex editor and literally type zeroes in the MFT in place of that node or something like that?
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Am I doomed to reinstall OSX 10.11? (rm -f FAIL)

Post by adespoton »

that-ben wrote: Tue Aug 09, 2022 8:20 pm lol you mean like open that OSX disk image in a hex editor and literally type zeroes in the MFT in place of that node or something like that?
There's a few bsd tools that can do things like that. If you did it by hand, you'd have to do more than just zero the MFT; I seem to recall there's a few other bits that would need adjustment as well.

Or... you can try backing up via Time Machine and restoring from backup, as I don't think that file will be referenced properly by rsync, so will get skipped in the backup. You can also exclude other temp files to speed things up.
User avatar
that-ben
Granny Smith
Posts: 141
Joined: Tue Nov 10, 2015 7:50 pm

Re: Am I doomed to reinstall OSX 10.11? (rm -f FAIL)

Post by that-ben »

adespoton wrote: Tue Aug 09, 2022 9:47 pm Or... you can try backing up via Time Machine and restoring from backup
Interesting. I've never used Time Machine, but is it normal that it started very quickly and after 5-6 minutes it hung? OSX works perfectly fine, there is no screen saver or anything, but Time Machine just says "BACKING UP: 5.62GB of 11.40GB" and nothing has progressed over the last 15 minutes?

EDIT: I stopped it, then started it again and it hung exactly at 5.62GB, same thing. Then I shut down, added a much larger virtual drive, started it again and it still hangs exactly at 5.62GB. My guess is that it hangs because of that invalid filename, but I can't tell since TM doesn't give ANY useful information about its progress, so who knows. F*** Time Machine lol

At this point, I should have just formated and reinstalled the whole OS. It would have taken an hour and I'd be done with this nonsense.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Am I doomed to reinstall OSX 10.11? (rm -f FAIL)

Post by adespoton »

that-ben wrote: Wed Aug 10, 2022 1:55 pm
adespoton wrote: Tue Aug 09, 2022 9:47 pm Or... you can try backing up via Time Machine and restoring from backup
Interesting. I've never used Time Machine, but is it normal that it started very quickly and after 5-6 minutes it hung? OSX works perfectly fine, there is no screen saver or anything, but Time Machine just says "BACKING UP: 5.62GB of 11.40GB" and nothing has progressed over the last 15 minutes?

EDIT: I stopped it, then started it again and it hung exactly at 5.62GB, same thing. Then I shut down, added a much larger virtual drive, started it again and it still hangs exactly at 5.62GB. My guess is that it hangs because of that invalid filename, but I can't tell since TM doesn't give ANY useful information about its progress, so who knows. F*** Time Machine lol

At this point, I should have just formated and reinstalled the whole OS. It would have taken an hour and I'd be done with this nonsense.
All the logs show up in the syslog, which you can access via Console.app. I'd suspect though that it is bailing on the invalid filename, just like you. You can always exclude the folder the file is in, and then it'll happily skip around it.
User avatar
that-ben
Granny Smith
Posts: 141
Joined: Tue Nov 10, 2015 7:50 pm

Re: Am I doomed to reinstall OSX 10.11? (rm -f FAIL)

Post by that-ben »

adespoton wrote: Wed Aug 10, 2022 5:20 pm You can always exclude the folder the file is in, and then it'll happily skip around it.
Well, let's try this out real quick. But before the backup begins, I want to point out that weirdly enough, I can actually add the NUL file to the ignore list lol like WTF! It's crazy how OSX can add this file to various listings and all, but I can't delete it.

Image

Image

NOPE. Same thing.

Image
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Am I doomed to reinstall OSX 10.11? (rm -f FAIL)

Post by Ronald P. Regensburg »

Did you start again with a new backup after excluding the file?
User avatar
that-ben
Granny Smith
Posts: 141
Joined: Tue Nov 10, 2015 7:50 pm

Re: Am I doomed to reinstall OSX 10.11? (rm -f FAIL)

Post by that-ben »

Yes.
User avatar
that-ben
Granny Smith
Posts: 141
Joined: Tue Nov 10, 2015 7:50 pm

Re: Am I doomed to reinstall OSX 10.11? (rm -f FAIL)

Post by that-ben »

Easiest Mac virus ever made. Send a ZIP file containing a NUL file. Shockingly easy to screw up somebody's Mac. In my case, I gave up and reinstalled El Capitan.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Am I doomed to reinstall OSX 10.11? (rm -f FAIL)

Post by adespoton »

Bonus points for making that zipped NULL-named file a self-referencing symlink with logical size of 1PiB ;)
Post Reply