Machine brick & data loss after tring to convert the disk to btrfs and uninstalling from recoveryOS
See original GitHub issueSystem info:
Product name: MacBook Pro (13-inch, M1, 2020)
SoC: Apple M1
Device class: je293ap
Product type: MacBookPro17,1
Board ID: 0x24
Chip ID: 0x8103
System firmware: iBoot-7459.101.2
OS version: 12.3 (21E230)
System rOS version: 12.3 (21E230)
No Fallback rOS
Installation type: Asahi Linux Minimal (Arch Linux ARM)
Steps to reproduce:
###### WARNING ######
# Backup your data #
# before tring #
# these steps! #
#####################
- Install Asahi Linux
- Boot to USB stick (in GRUB)
- Verify that Asahi Linux is installed to nvme0n1p5
btrfs-convert /dev/nvme0n1p5 -L --uuid copy
reboot
Now GRUB will fail,and the filesystem is corrupted(I forgot to re-grub-install
).- Force shutdown
- Press and hold the power button, then selece Options in the boot picker
diskutil list
diskutil eraseVolume free free /dev/disk0s5
diskutil eraseVolume free free /dev/disk0s4
diskutil apfs deleteContainer /dev/disk0s3 free free 0
reboot
Now the machine is bricked. It’s not possible to get it into macOS or any recoveryOSs. An Apple Configurator revive oridevicerestore -l
will complete with no error, but after that it’s still not able to boot it.
An Apple Cofigurator restore or idevicerestore -ley
will unbrick it, but user data will lose.
Issue Analytics
- State:
- Created a year ago
- Comments:24 (3 by maintainers)
Top Results From Across the Web
How to recover from BTRFS errors | Support - SUSE
What to do if: A bad tree root is found at mount time: use "-o recovery" This attempts to autocorrect that error. Weird...
Read more >Please share your long time experience with Btrfs! - Reddit
Update: I tested both ZFS and Btrfs on Linux about a year back, ... from kernel crashes to very poor performance and eventual...
Read more >Root and home disks full and causing various problems
This is a report about btrfs filesystem issue on Jolla device's internal ... operations can cause loss of data and lead to a...
Read more >How to recover a btrfs filesystem with two identical devices
The first thing I'd try is to recover device A. This might be accomplished with btrfs rescue super-recover /dev/deviceA or btrfsck --repair ...
Read more >81981 – mount hangs after forced reboot from "device delete"
I have a four (2TB) device RAID-10 for data and metadata btrfs volume. ... One of the 2TB disks started misbehaving and disappeared...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Woot!
I used my modified script below, specifying the device:
DEVICE=/dev/sda ./make_usb.sh
A few issues along the way:
usb start
thenusb reset
here beforerun bootcmd_usb0
would find my USB drivemount /dev/sda2 /new_root && exit
e2fsck
andbtrfs-convert --copy-label --uuid copy /dev/nvme0n1p5
/mnt/etc/fstab
with your default mount options, subvolumes, and change type to btrfsarch-chroot /mnt
, and in the chroot:mount -a
to check your fstab and mount optionsupdate-grub
, make sure it says something about btrfs in its outputgrep subvol= /boot/grub/grub.cfg
if using a root subvolmkinitcpio -P
or I gotunknown filesystem
when trying to mount rootsudo mount /dev/nvme0n1p5 /mnt && sudo btrfs subvol delete /mnt/ext2_saved
if desiredsudo systemctl enable --now btrfs-scrub@-.timer
, installgrub-btrfs
,snapper
, etc. – off to the racesMy version of
make_usb.sh
:“Bricking” means rendering a device inoperable without specialized tools; nobody has ever bricked an Apple Silicon machine here. Screwing up the partitions such that you have to recover using DFU mode is not bricking. Apple gives you instructions on how to recover from that right on their website, and idevicerestore lets you do it from a non-Mac, without any special tools. It isn’t “bricking” any more than wiping the OS on a PC such that you have to plug in a USB drive to reinstall is “bricking”.
We don’t know of any way to do that so far. The most damage we have a strong suspicion you can cause so far is blow the speakers (which is why we aren’t enabling them until we have volume caps in place).
Now the question is what happened to make the machine unable to get into recovery. I have a hard time believing it had anything to do with the btrfs conversion, since Apple’s OS and tooling makes no attempt to parse ext4 or btrfs and couldn’t care less what filesystem exists in the partition. So either this is some freak accident, or a very weird bug, or something unrelated.
Can you reproduce this at will? If so, please provide detailed instructions on how to do so, including exactly what you are booting, with links to any downloads or files or images you used, and clear reproduction steps, one by one, without omission, starting with a cleanly wiped system (DFU erase). If the btrfs conversion really is making the system break after deleting the partitions later then that is way, way down the freak bug scale, and we aren’t going to get anywhere without a very clear reproducer.