StarPlayrX / bigmac

Big Mac, macOS 11 Big Sur and macOS Monterey disk installer and back up tool for Intel based Macs
Other
458 stars 52 forks source link

Snapshot delete Insufficient Privileges #48

Closed lumosideas closed 3 years ago

lumosideas commented 3 years ago

Hi, I have tried to make a fresh install into a separate partition. After the first installtion, macOS 11.11 start to loop at every boot, so I restart my macOS 10.15.7 to execute the postinstall.sh

The postinstall.sh start, ask me the disk and, ater hit return, it start to install the patched packages. When come to the snapshot delete it fail with this message:

📸 Attempting to delete snapshot => xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Deleting APFS Snapshot xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx "com.apple.os.update-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" from APFS Volume disk4s5 Started APFS operation Error: -69863: Insufficient privileges OS Major version unrecognized

The problem appear even if I execute the snapshot delete manually This problem never happen with the preivous bigmac 1.0 and macOS 11.0.1

Any idea on how can I solve?

Thanks Thanks

lumosideas commented 3 years ago

Update, I fixed it using Jackluke BigSurBaseSystemfix.

🤷🏻‍♂️

StarPlayrX commented 3 years ago

What exactly did you apply from Jack Luke's patcher? Juke Luke's stuff covers a broad area.

I'd like to know how he unlocks it. I use ASR which will unlock the snapshot in the clone and it can then be deleted there and you can clone it back and remove the snapshot there if it reappears.

Did you at first apply the post install from the installer or from a full OS? It usually happens if you boot up a machine with a snapshot and try logging in. It is easier to remove snapshots from an installer / base system than from a full OS.

There is not rhyme or reason on how a snapshot gets locked. I have seen it less and less in 11.1 with bigmac1.1 than with 11.0.1 and bigmac1.0.

AlexSakha commented 3 years ago

Hi, you must apply Download APFS ROM patcher by dosdude1. Then enter password: apfs and follow the instructions. It could have helped Снимок экрана 2020-12-18 в 23 45 36

lumosideas commented 3 years ago

I already flashed the ROM years ago, I don't think It need to be flashed again.

lumosideas commented 3 years ago

What exactly did you apply from Jack Luke's patcher? Juke Luke's stuff covers a broad area.

I'd like to know how he unlocks it. I use ASR which will unlock the snapshot in the clone and it can then be deleted there and you can clone it back and remove the snapshot there if it reappears.

Did you at first apply the post install from the installer or from a full OS? It usually happens if you boot up a machine with a snapshot and try logging in. It is easier to remove snapshots from an installer / base system than from a full OS.

There is not rhyme or reason on how a snapshot gets locked. I have seen it less and less in 11.1 with bigmac1.1 than with 11.0.1 and bigmac1.0.

I have dowloaded BigSurBaseSystemfix.dmg and flashed into a USB Key as described by Jackluke:

sudo asr -source ~/Downloads/BigSurBaseSystemfix.dmg -erase -noverify -target /Volumes/YourUSBLabel

Reboted from the USB key and executed this script from the menu:

BigSurFixes delete snapshot

I have executed your postinstaller.sh script from my macOS 10.15.7 full OS

StarPlayrX commented 3 years ago

Next time try running my post installer from the 11.1 macOS installer. It should do the same thing with macOS 11.1

tolmekian1453 commented 3 years ago

Same issue here, but I'm running the postinstaller from the Big Sur installer like the instructions say. BigMac commit 00c310ecbb4 MacPro4,1 upgraded to 5,1 with the firmware flash and Xeon x5670 (x2), was previously running High Sierra. SIP is disabled. I ran nvram boot-args="-no_compat_check" already.

I'm not sure whether I have the APFS ROM patch. Maybe it was applied when I used dosdude1's High Sierra patcher. When I try to run the standalone APFS patcher, it says my system is incompatible, and there's no further explanation. But given that my HS boot drive is APFS, I probably have it already.

Also tried commenting out the line that attempts to delete the snapshot, but then booting to my Big Sur installation after that causes an infinite boot loop with kernel panics. Use Jack Luke's tool to delete the snapshot afterwards didn't fix my installation.

jimmybrancaccio commented 3 years ago

I had this same issue and was able to resolve it using Jack Luke's tool. I just selected the 'BigSurFixes delete snapshot' item from the Utility menu, rebooted and all is happy now 😁

Of note, I have a Mac Pro 4,1, upgraded to 5,1 as well.

Screen Shot 2020-12-19 at 12 36 18 AM
StarPlayrX commented 3 years ago

As stated in this thread, Bigmac's post install script ./postinstall.sh has a builtin in tool that I wrote that deletes snapshots. It is meant to the run from the USB Installer. It runs at the end of the patcher. If it finds snapshots, it tries to remove them. This works best from a USB Installer or Software Recovery Disk.

A lot of this stuff will be easier in bigmac2 and that is what I am focusing on it right now.

jimmybrancaccio commented 3 years ago

Correct, however it didn't work. For whatever reason Jack Luke's tool did.

StarPlayrX commented 3 years ago

Did you run it from the USB installer or from a full system?

What version of Big Sur did you install?

Please be specific. Things like 'it didn't work' does not tell me any details. And saying something else did work doesn't either unless you can provide the source code and I am can compare the methods used.

I have seen several screenshots that appear to be from an OS an not a base system.

jimmybrancaccio commented 3 years ago

@StarPlayrX Yes, from the USB installer, it was for macOS 11.1. I followed all instructions in the README.

lumosideas commented 3 years ago

As stated in this thread, Bigmac's post install script ./postinstall.sh has a builtin in tool that I wrote that deletes snapshots. It is meant to the run from the USB Installer. It runs at the end of the patcher. If it finds snapshots, it tries to remove them. This works best from a USB Installer or Software Recovery Disk.

A lot of this stuff will be easier in bigmac2 and that is what I am focusing on it right now.

Just for curiosity. In your postinstall.sh, you list with diskutil for a snapshot into the primary Big Sur volume, grep the UUID and delete it with diskutil. Jackluke search for the snapshot into the preboot. Why this difference?

Thanks

StarPlayrX commented 3 years ago

`##This is Jack Luke's code

diskutil apfs listSnapshots /Volumes/"$label"/ /S/L/File/apfs/C/R/apfs_systemsnapshot -v . -r "" for XID in diskutil apfs listSnapshots /Volumes/"$label"/ |fgrep XID|awk '{print $2}' do echo $XID diskutil apfs deleteSnapshot /Volumes/"$label"/ -xid $XID done echo "\nAttempting to remove the tagged snapshot\n" diskutil apfs listSnapshots /Volumes/"$label"/ echo "\nDone" echo "\nRemoving a tagged snapshot is suffice to fix mount -uw / , but if you have other snapshots to delete just repeat the fix from Utilities menu\n" echo "\n\nAfter reboot your BigSur should boot without opencore , Penryn Core2Duo and maybe with working mount -uw /\n"`

Looking into from the USB boot disk if -xid acts any differently than -uuid

StarPlayrX commented 3 years ago

the -xid doesn't work for me, so there much be something else that enables it like his .EFI Boot loader. I'll look more into it when there is time.

One trick that I use is asr to another volume and delete the snapshot there and clone it back and repeat if necessary.

sudo asr -er -nov -s /Volumes/sourceName -t /Volume/targetName

then delete the snapshot

sudo diskutil apfs listSnapshots /Volumes/targetName sudo diskutil apfs deleteSnapshot /Volumes/targetName --uuid xxxxxxx-xxxxxxx-xxxxxxxx