AsahiLinux / asahi-installer

Asahi Linux installer
MIT License
782 stars 103 forks source link

Unable to resize partition on installer #229

Closed twistquest closed 8 months ago

twistquest commented 8 months ago

I've been trying to install Asahi today, but every time i try resizing my partition i get this error

Collecting partition information...
  System disk: disk0

Collecting OS information...

Partitions in system disk (disk0):
  1: APFS [Macintosh HD] (170.11 GB, 7 volumes)
    OS: [B*] [Macintosh HD] macOS v14.1 [disk3s1s1, 7732CCCA-207B-4E62-BA05-08DD8BFCF35C]
  2: APFS [Untitled] (80.37 GB, 2 volumes)

  [B ] = Booted OS, [R ] = Booted recovery, [? ] = Unknown
  [ *] = Default boot volume

Using OS 'Macintosh HD' (disk3s1s1) for machine authentication.

Choose what to do:
  r: Resize an existing partition to make space for a new OS
  q: Quit without doing anything
» Action (r): r

We're going to resize this partition:
  APFS [Untitled] (80.37 GB, 2 volumes)
  Total size: 80.37 GB
  Free space: 80.25 GB
  Available space: 42.76 GB
  Overhead: 36.48 GB
  Minimum new size: 37.61 GB (46.79%)

  Warning: The selected partition has a large amount of overhead space.
  This prevents you from resizing the partition to a smaller size, even
  though macOS reports that space as free.

  This is usually caused by APFS snapshots used by Time Machine, which
  use up free disk space and block resizing the partition to a smaller
  size. It can also be caused by having a pending macOS upgrade.

  If you want to resize your partition to a smaller size, please complete
  any pending macOS upgrades and visit this link to learn how to manually
  delete Time Machine snapshots:
  https://alx.sh/tmcleanup

» Continue anyway? (y/N): ^C

Problem is, i don't even have Time Machine enabled. I've followed the guide to delete the snapshots, and the Time Machine menu is inaccessible. Typing

tmutil listlocalsnapshots / 

and

tmutil listlocalsnapshots /Volumes/Untitled

Just gives an empty list.

Snapshots for disk /Volumes/Untitled:

Am i doing something wrong?

twistquest commented 8 months ago

Meant to add a comment not to close the issue, my bad. I forgot to mention that I've also completed all the updates that were pending on my Mac, and the issue still persists

eslerm commented 8 months ago

What does diskutil list print?

Please read through https://github.com/AsahiLinux/docs/wiki/Partitioning-cheatsheet and resize macOS if needed.

twistquest commented 8 months ago

Running diskutil list prints out

/dev/disk0` (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *251.0 GB   disk0
   1:             Apple_APFS_ISC Container disk1         524.3 MB   disk0s1
   2:                 Apple_APFS Container disk3         170.1 GB   disk0s2
   3:                 Apple_APFS Container disk2         80.4 GB    disk0s3

/dev/disk2 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +80.4 GB    disk2
                                 Physical Store disk0s3
   1:                APFS Volume Untitled                856.1 KB   disk2s1
   2:                APFS Volume Untitled 2              839.7 KB   disk2s2

/dev/disk3 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +170.1 GB   disk3
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD            9.9 GB     disk3s1
   2:              APFS Snapshot com.apple.os.update-... 9.9 GB     disk3s1s1
   3:                APFS Volume Preboot                 5.7 GB     disk3s2
   4:                APFS Volume Recovery                885.7 MB   disk3s3
   5:                APFS Volume Data                    132.6 GB   disk3s5
   6:                APFS Volume VM                      2.1 GB     disk3s6
   7:                APFS Volume Nix Store               972.9 MB   disk3s7

Not sure what Update Snapshot is about, as I have installed all the pending updates

image

I have already resized macOS though Disk Utility prior to writing this issue, but I've now learned that that isn't the best way of doing it. Do i just delete the partition that I was intending to wipe while installing,merge it back with my main partition and then use diskutil to partition it as i need to?

eslerm commented 8 months ago

That is what I would try. See how to delete the container first https://github.com/AsahiLinux/docs/wiki/Partitioning-cheatsheet#do-not-blindly-copy-and-paste-these-commands

twistquest commented 8 months ago

All right, I deleted the container and it worked! I can now get past the partitioning stage of the installer. Thanks a lot for the help.

What i find weird is that the Disk Utility used to let me shrink my macOS virtual partition and leave the space as free unpartitioned space before, but this time it didn't.