UbuntuAsahi / ubuntu-asahi

Native Ubuntu installations for Apple silicon hardware
https://ubuntuasahi.org/
870 stars 27 forks source link

Document uninstall process in README/website #28

Open tobhe opened 1 year ago

tobhe commented 1 year ago

We currently don't have any documentation on how to remove Ubuntu-Asahi or how to repair a failed installation. There should be a detailed easy to follow guide on how to do that, probably including links to the relevant upstream Asahi docs.

nreef12 commented 1 year ago

probably including links to the relevant upstream Asahi docs

Definitely include this guide: https://github.com/AsahiLinux/docs/wiki/Partitioning-cheatsheet

bbbbbb11 commented 1 year ago

Usefull screenshot. File system after / before installation

image

As guy from youtube showed (https://youtu.be/aXh_d1OixRI), we able to erase EFI EFI - UBUNTU after installing

diskutil eraseVolume JHFS+ empty /dev/disk0s4

cowpod commented 1 year ago

What worked for me was booting into recovery, and running the wipe-linux.sh script provided by the Asahi team. Running it in normal OS resulted in permission denied errors, and leftover partitions (such as the EFI partition).

tobhe commented 1 year ago

@cowpod Thanks, I almost forgot about that. Maybe I should mirror that on my domain too. I vaguely remember the Asahi docs warning against using it blindly and I don't know how well it plays with multiple Linux installations.

clementperon commented 1 year ago

@tobhe at the moment the script will erase a random APFS container where the size match 2.5GB, and volumes that match 'asahi|linux|EFI'. https://github.com/AsahiLinux/asahi-installer/blob/main/tools/wipe-linux.sh

I would have been interested to know that it exist before manually wiping my previous ArchLinux

It could be improved a bit by adding a user confirmation before performing these operations.

cowpod commented 1 year ago

The script warned you what it'd do when you ran the script.

echo "THIS SCRIPT IS DANGEROUS!"
echo "DO NOT BLINDLY RUN IT IF SOMEONE JUST SENT YOU HERE."
echo "IT WILL INDISCRIMINATELY WIPE A BUNCH OF PARTITIONS"
echo "THAT MAY OR MAY NOT BE THE ONES YOU WANT TO WIPE."
echo
echo "You are much better off reading and understanding this guide:"
echo "https://github.com/AsahiLinux/docs/wiki/Partitioning-cheatsheet"
echo
echo "Press enter twice if you really want to continue."
echo "Press Control-C to exit."

We could get the partition UUIDs using like diskutil info /dev/diskXsX | grep "Disk / Partition UUID" | sed 's/.*: //' and place them somewhere, eg. in the EFI partition. Then when we run the uninstall script it'll delete partitions by UUID.

Downside: If we somehow delete the EFI partition, we'd lose those UUIDs. This is unlikely, and if we do lose the EFI partition we've likely already nuked the other partitions as well.

Another option would be to somehow label each partition with a single (newly generated) UUID tied to the install. This would allow us to delete all partitions with said UUID, matching whatever OS you want to remove. We'd still need to place that single UUID somewhere as well...

eslerm commented 1 year ago

from upstream

PSA: Stop telling people to run wipe-linux

That script is deliberately dangerous and only intended for developers wiping regularly.

Going forward mentioning it [on reddit] is banned. Your comments/posts will be removed and repeat offenders will be banned. Yes, this is that serious.

If people are asking how to uninstall, send them to the Partitioning cheatsheet instead, which does mention that script with all the appropriate warnings that y'all never do, as well as documents the right way of doing things manually.

cowpod commented 1 year ago

I fail to see how a reddit post contributes to this. We all know that the script can be dangerous. If you're somehow surprised that a script that warns it'll wipe everything... wipes everything, then I don't know what to say.

eslerm commented 1 year ago

When the docs are made, we should just link to upstream for the uninstall process :)