AsahiLinux / asahi-installer

Asahi Linux installer
MIT License
782 stars 104 forks source link

[bug] this loop is dangerous - can break user's preferred boot capabilities #289

Closed PaulCharlton closed 3 days ago

PaulCharlton commented 1 week ago

this loop is dangerous - can break user's preferred boot capabilities:

https://github.com/AsahiLinux/asahi-installer/blob/5f0814ba90d2814081c2e9ed516675dd75ab3c6e/tools/wipe-linux.sh#L34

of note

1) if the user has configured bootable alternate storage media which is referenced in the iSCPreboot, and 2) the bootable alternate storage media is not present or powered on at the time this loop is executed, then 3) this loop will remove the volumes on that alternate storage media from the iSCPreboot

Most likely use cases

1) Apple Silicon MacPro with an internal PCIe NVME storage card 2) any Apple Silicon Mac[Book|Studio|Mini] with an externally attached storage device

[[ work in progress]]

Ideally, each install would drop a manifest of disk changes into its boot APFS partition, and that manifest would whitelist everything to be removed, subject to simpler sanity checks for correctness of the manifest. Only then remove items from the iSCPreboot which have been whitelisted by the verified manifest .

PaulCharlton commented 6 days ago

would be completely moot and fixable if we adopt #295

marcan commented 3 days ago

This tool is not intended to be used by end users. We know it's dangerous and it says it right at the top.