LoginSignup
5
3

More than 1 year has passed since last update.

Asahi Linux Desktop アルファ版の内蔵SSDへのインストールとアンインストール

Last updated at Posted at 2022-03-19

Asahi Linux

Asahi LinuxはApple Silicon搭載のMacへLinuxを移植するプロジェクトです。

2022/3/19にAsahi Linuxのアルファ版インストーラとArch Linuxベースのディストリビューションがリリースされました。まだパワーユーザや開発者向けのアルファ版なので、一部動かないアプリがありますが、実際にAsahi LinuxをM1 Mac miniにAsahi Linux Desktopのアルファ版をインストールしてみたので手順等を解説していきます。

筆者はAsahi Linuxのサイトや文書wikiの非公式日本語訳を作成しているので、こちらも参考にしてください。この記事の内容は基本的にAsahi Linuxのブログの日本語訳に沿っています。

注意事項

この記事の内容は間違えるとデータを破壊したりMacが起動しなくなる可能性があります。実際に行う場合は自己責任でお願いします。

インストール要件

Asahi Linuxのブログより

  • M1、M1 Pro、またはM1 Maxマシン(Mac Studioを除く)
  • macOS 12.3以降、管理者ユーザーとしてログインしていること
  • 53GB以上の空きディスク容量(Desktopインストール)
    • Asahi Linux Desktop用に空きパーティション15GB
    • さらにmacOSのパーティションに38GB以上空き容量を残す必要あり
  • インターネット接続が可能な環境 (4GBぐらいダウンロード)

さらに現時点(2022/3/19)ではBluetooth未対応なのでUSB接続のキーボードが必要です。また、Mac miniの場合Linux本体はUSB-Aポートに対応していますが、U-bootやgrubはUSB-Cのポートのみ対応なので、USB-C接続のキーボードまたはUSB-C接続のUSBハブもあったほうがいいです。

Asahi Linux Desktopのインストール

KDE Plasmaデスクトップ環境に対応したArch LinuxのリミックスであるAsahi Linux Desktopをインストールします。

ディスクのパーティションの確認

ターミナルを起動してdiskutilを使います。

$ diskutil list

M1 Mac mini メモリ8G SSD256GBでは内蔵SSDはこんな感じになっていると思います。

/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         251.0 GB   disk0
   1:             Apple_APFS_ISC ⁨⁩                        524.3 MB   disk0s1
   2:                 Apple_APFS ⁨Container disk3⁩         245.1 GB   disk0s2
   3:        Apple_APFS_Recovery ⁨⁩                        5.4 GB     disk0s3

/dev/disk3 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +245.1 GB   disk3
                                 Physical Store disk0s2
   1:                APFS Volume ⁨Macintosh HD⁩            15.2 GB    disk3s1
   2:              APFS Snapshot ⁨com.apple.os.update-...⁩ 15.2 GB    disk3s1s1
   3:                APFS Volume ⁨Preboot⁩                 921.0 MB   disk3s2
   4:                APFS Volume ⁨Recovery⁩                783.2 MB   disk3s3
   5:                APFS Volume ⁨Data⁩                    141.4 GB   disk3s5
   6:                APFS Volume ⁨VM⁩                      20.5 KB    disk3s6

/dev/disk0が内蔵SSDです。/dev/disk3disk0s2にあるApple APFSコンテナの中身です。APFSには複数のボリュームを含めることができるのでその内容が/dev/disk3になります。disk0s1の1:Apple_APFS_ISCは起動に必要な情報が存在するパーティションで、disk0s3の3:Apple_APFS_RecoveryはリカバリーOSです。この2つをいじると起動しなくなるので壊さないように気をつけてください。

Asahi Linuxをインストール後に、リカバリーOSがdisk0s6になり、Asahi Linuxのブート関係がdisk0s3、Asahi LinuxのESPがdisk0s4、Asahi Linuxのrootパーティションがdisk0s5に入ります。Asahi Linuxのインストール後にリカバリーOSの番号が変わるので気をつけてください。

インストーラの実行その1

macOSのターミナルで次のコマンドを実行し、指示に従ってインストールしていきます。

$ curl https://alx.sh | sh

以後メッセージは英語なので日本語で1つ1つ説明していきます。

Bootstrapping installer:
  Checking version...
  Version: v0.3.2
  Downloading...
  Extracting...
  Initializing...

The installer needs to run as root.
Please enter your sudo password if prompted.
Password:

まずインストールにroot権限が必要なのでsudoするためにパスワードを入れてください。

Welcome to the Asahi Linux installer!

This installer is in an alpha state, and may not work for everyone.
It is intended for developers and early adopters who are comfortable
debugging issues or providing detailed bug reports.

Please make sure you are familiar with our documentation at:
  https://alx.sh/w

Press enter to continue.

まだアルファ版で一般ユーザ向けではなくアーリーアダプタや開発者向けだと注意事項が表示されます。
Enterキーを押して続けます。

By default, this installer will hide certain advanced options that
are only useful for developers. You can enable expert mode to show them.
» Enable expert mode? (y/N):

インストーラをエキスパートモードで実行するか聞いてきますがnを押してEnterを押して通常モードで実行します。

Collecting system information...
  Product name: Mac mini (M1, 2020)
  SoC: Apple M1
  Device class: j274ap
  Product type: Macmini9,1
  Board ID: 0x22
  Chip ID: 0x8103
  System firmware: iBoot-7459.101.2
  Boot UUID: xxxxx
  Boot VGID: xxxxx
  Default boot VGID: xxxxx
  Boot mode: macOS
  OS version: 12.3 (21E230)
  System rOS version: 12.3 (21E230)
  No Fallback rOS
  Login user: asfdrwe

Collecting partition information...
  System disk: disk0

Collecting OS information...

Partitions in system disk (disk0):
  1: APFS [Macintosh HD] (245.11 GB, 6 volumes)
    OS: [B*] [Macintosh HD] macOS v12.3 [disk3s1, 79B19461-3517-43A7-B417-6558CC
9A17F1]
  2: APFS (System Recovery) (5.37 GB, 2 volumes)
    OS: [  ] recoveryOS v12.3 [Primary recoveryOS]

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

Using OS 'Macintosh HD' (disk3s1) 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):

システムの情報が表示されログインユーザ名が表示されディスクのパーティションが表示されます。このままではAsahi Linuxをインストールする空きスペースがないのでmacOSのパーティションをリサイズします。rを入れます。

We're going to resize this partition:
  APFS [Macintosh HD] (245.11 GB, 6 volumes)
  Total size: 245.11 GB
  Free space: 86.70 GB
  Minimum free space: 38.00 GB
  Minimum total size: 196.41 GB (80.13%)

Enter the new size for your existing partition:
  You can enter a size such as '1GB', a fraction such as '50%',
  or the word 'min' for the smallest allowable size.

  Examples:
  30%  - 30% to macOS, 70% to the new OS
  80GB - 80GB to macOS, the rest to your new OS
  min  - Shrink macOS as much as (safely) possible

» New size (min):

ディスクの使用状況によって空きスペースがどれくらいあるか変わります。こちらの状況ではFree space: 86.70 GBでした。このうち38GBはmacOS用に残すので、Asahi Linuxに割当できるのは86.70-38.0=48.7GBまでです。パーティション全体が245.11 GBなので245.11-48.7=196.41GB以上(80.13%)macOSのために残す必要があります。なおAsahi Linux Desktopの容量は15GBです。

とりあえず今回は200GBまで縮小して空き領域を45.11GB確保します。200GBを入力します。

» New size (min): 200GB 
Resizing will free up 45.11 GB of space.

» Continue? (y/N):

yを入れてリサイズします。ここでリサイズのために少々時間がかかります。

Started APFS operation
Aligning shrink delta to 45,108,101,120 bytes and targeting a new physical store
 size of 199,999,094,784 bytes
Determined the minimum size for the targeted physical store of this APFS Contain
er to be 162,504,114,176 bytes
Resizing APFS Container designated by APFS Container Reference disk3
The specific APFS Physical Store being resized is disk0s2
Verifying storage system
Using live mode
Performing fsck_apfs -n -x -l /dev/disk0s2
Checking the container superblock
Checking the space manager
Checking the space manager free queue trees
Checking the object map
Checking the encryption key structures
Checking volume /dev/rdisk3s1
Checking the APFS volume superblock
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking snapshot 1 of 1 (com.apple.os.update-2289385E1A6FCCF05D444673FB1FEB06DD
CF82A4C723EAD53AF1F3E08872CE0F)
Checking the fsroot tree
Checking the file extent tree
Checking the extent ref tree
Verifying volume object map space
The volume /dev/rdisk3s1 appears to be OK
Checking volume /dev/rdisk3s2
Checking the APFS volume superblock
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the fsroot tree
Checking the extent ref tree
Verifying volume object map space
The volume /dev/rdisk3s2 appears to be OK
Checking volume /dev/rdisk3s3
Checking the APFS volume superblock
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the fsroot tree
Checking the extent ref tree
Verifying volume object map space
The volume /dev/rdisk3s3 appears to be OK
Checking volume /dev/rdisk3s4
Checking the APFS volume superblock
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the fsroot tree
Checking the extent ref tree
Verifying volume object map space
The volume /dev/rdisk3s4 appears to be OK
Checking volume /dev/rdisk3s5
Checking the APFS volume superblock
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
hecking the document ID tree
Checking the fsroot tree
Checking the extent ref tree
Checking the file key rolling tree
Verifying volume object map space
The volume /dev/rdisk3s5 appears to be OK
Checking volume /dev/rdisk3s6
Checking the APFS volume superblock
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the fsroot tree
Checking the extent ref tree
Verifying volume object map space
The volume /dev/rdisk3s6 appears to be OK
Verifying allocated space
The container /dev/disk0s2 appears to be OK
Storage system check exit code is 0
Shrinking APFS Physical Store disk0s2 from 245,107,195,904 to 199,999,094,784 by
tes
Shrinking APFS data structures
Shrinking partition
Modifying partition map
Finished APFS operation

Resize complete. Press enter to continue.

リサイズが完了したので、Enterを押して続けます。

2022/3/20注記

Asahi Linuxのツイートより、リサイズ時に赤い文字でエラーが表示される場合、Time Machineに関する言及がある場合は、こちらを参考に、Time Machineのローカルスナップショットを削除する必要があるようです。tmutil listlocalsnapshots /コマンドでスナップショットの日付等を調べ、sudo tmutil deletelocalsnapshots '2021-06-26-162421'のようにいらない日付のスナップショットを削除してくださいとのことです。『verify or repair failed』が出る場合はファイルシステムが破損しているので、ディスクユーティリティのFirst AIDを使ってくださいとのことです。

Collecting partition information...
  System disk: disk0

Collecting OS information...

Partitions in system disk (disk0):
  1: APFS [Macintosh HD] (200.00 GB, 6 volumes)
    OS: [B*] [Macintosh HD] macOS v12.3 [disk3s1, 79B19461-3517-43A7-B417-6558CC
9A17F1]
  2: (free space: 45.11 GB)
  3: APFS (System Recovery) (5.37 GB, 2 volumes)
    OS: [  ] recoveryOS v12.3 [Primary recoveryOS]

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

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

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

空きスペースが2: (free space: 45.11 GB)として確保されました。ここにOSをインストールします。fを入れてください。

Choose an OS to install:
  1: Asahi Linux Desktop
  2: Asahi Linux Minimal (Arch Linux ARM)
  3: UEFI environment only (m1n1 + U-Boot + ESP)
» OS:

インストールするOSを選択します。1がAsahi Linux Desktopなのでこれをインストールします。1を入れてください。

Downloading OS package info...
.

Minimum required space for this OS: 15.00 GB

Available free space: 45.11 GB

How much space should be allocated to the new OS?
  You can enter a size such as '1GB', a fraction such as '50%',
  the word 'min' for the smallest allowable size, or
  the word 'max' to use all available space.
» New OS size (max):

OSをダウンロードルしました。空きスペース全体にAsahi Linuxを入れるか聞いて聞いてきています。maxと入れて空きスペース全体をAsahi Linuxが使用するようにします。

The new OS will be allocated 45.11 GB of space,
leaving 458.75 KB of free space.

Enter a name for your OS
» OS name (Asahi Linux): 

インストールするOSの起動時に表示する名前を入れます。そのままEnterを押せばAsahi LinuxになるのでEnterを押してください。OSの本体データをSSDに書き込んでいるので少し時間がかかります。

Using macOS 12.3 for OS firmware

Downloading macOS OS package info...
.

Creating new stub macOS named Asahi Linux
Installing stub macOS into disk0s5 (Asahi Linux)
Preparing target volumes...
Checking volumes...
Beginning stub OS install...
++
Setting up System volume...
Setting up Data volume...
Setting up Preboot volume...
+++++++++
Setting up Recovery volume...
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Wrapping up...

Stub OS installation complete.

Adding partition EFI (500.17 MB)...
  Formatting as FAT...
Adding partition Root (44.61 GB)...
Collecting firmware...
Installing OS...
  Copying from esp into disk0s4 partition...
+
  Copying firmware into disk0s4 partition...
  Extracting root.img into disk0s7 partition...
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++
Preparing to finish installation...
Collecting installer data...

OSの書き込みが終わりました。

To continue the installation, you will need to enter your macOS
admin credentials.

Password for asfdrwe:

macOSの管理者の権限が必要なのでパスワードを入れます。このときのユーザ名(上記の場合asfdrwe)を控えておいてください。後で使います。

Setting the new OS as the default boot volume...

Installation successful!

Install information:
  APFS VGID: F45DB52D-BC13-4B04-A941-1A5B40530D79
  EFI PARTUUID: 63dc7f54-f6f1-4d33-bacb-d98d966bbebb

インストールの第一段階が完了しました。

インストーラの実行その2

再起動

To be able to boot your new OS, you will need to complete one more step.
Please read the following instructions carefully. Failure to do so
will leave your new installation in an unbootable state.

When the system shuts down, follow these steps:

1. Wait 15 seconds for the system to fully shut down.
2. Press and hold down the power button to power on the system.
   * It is important that the system be fully powered off before this step,
     and that you press and hold down the button once, not multiple times.
     This is required to put the machine into the right mode.
3. Release it once 'Entering startup options' is displayed,
   or you see a spinner.
4. Wait for the volume list to appear.
5. Choose 'Asahi Linux'.
6. You will briefly see a 'macOS Recovery' dialog.
   * If you are asked to 'Select a volume to recover',
     then choose your normal macOS volume and click Next.
     You may need to authenticate yourself with your macOS credentials.
7. Once the 'Asahi Linux installer' screen appears, follow the prompts.

Press enter to shut down the system.

次にブートローダパーティションのmacOSのカーネルをAsahi Linuxのブートローダーであるm1n1+u-bootに置き換える必要があります。
次の手順で再起動して続けます。

  • Enterを押した後15秒待って完全にシステムをシャットダウンさせる
    • 完全に電源オフしないとダメ
  • 電源ボタンを押しっぱなしにしながらシステムを起動させる
    • 一回離してからまた押すのはダメ、電源オフの状態から電源ボタンをずっと押しっぱなしにする
  • 『起動オプションを読込中…』と表示されたり歯車マークが表示されたらボタンを離す
  • ボリュームリストが表示されるまで待つ
  • 『Asahi Linux』を選択(別な名前でOSをインストールしたならその名前)
  • 『macOS復旧』が表示されるはず
      * 『復旧するボリュームを選択』が表示されたら通常のmacOSのボリュームを選択
      * macOSの管理者を選択してパスワードを入れる必要がある場合がある
  • 『Asahi Linux installer』の画面が表示される

m1n1+u-bootのインストール

ここから先は手元でメッセージをちゃんと保存していないのでメモした範囲のメッセージで解説します。

System Volume: ...
...
Press enter to continue

インストールを続けるか聞いてくるのでEnterを押して続けます。

Operating on Volume Group UUID xxxxxxxxxxx
...

Please enter password for user asfdrwe: 

Asahi Linuxのブート用にイントーラが別途インストールしたmacOSのカーネルをブートローダーのm1n1+U-bootに置き換えます。そのためブート用macOSのセキュリティモードを下げます。通常のmacOSのセキュリティが変更されるのではありません。

表示されている管理者ユーザのパスワードを入れてください。

...

By setting a custom image object, you will be putting your system into Permissive Security.

Are you sure you want to do this ? (enter y or n):

セキュリティ制限なし(Permissive Security)にする必要があるので、yを入れます。

...
Usename: 

管理者ユーザ名を聞かれるので入力します。上記で控えておいたユーザ名です。自分の場合はasfdrweです。

Password:

さらにパスワードを聞かれるので入れます。

installing ... object...
done.

...
Installtion complete! Please enter to reboot.

これでm1n1+U-bootブートローダーがインストールされたのでEnterを押して再起動します。

Asahi Linux Desktopのインストールと設定

ここまでで問題なければ再起動後m1n1が起動しAsahi LinuxのロゴとU-bootのロゴが表示され、その後grubの画面が表示されるはずです。grubが起動したらそのまま待つかEnterを押してLinuxを起動します。

次にArch Linuxのインストーラが起動します。インストール言語を日本語にし、ロケーションをTokyoにし、キーボードをJapanese等にし、ユーザー情報で一般ユーザを追加し、セットアップを進めてください。

問題なければログイン画面が表示されKDE Plasmaデスクトップが起動するはずです。

残り設定はArch Linuxそのものなので、Arch Linuxのwikiを参考に設定してください。以下は日本語入力等の設定例を書いておきます。

fcitx+mozcによる日本語入力の設定

こちらを参考にメニューからターミナルを起動してfcitxとmozcと設定ツールをpacmanでインストールします(2022/3/28タイプミス修正)。

$ sudo pacman -S fcitx-im fcitx-configtool fcitx-mozc

~/.xprofileを編集して必要な環境変数を設定します。

$ vi ~/.xprofile

ファイルの中身に追記します。

export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=”@im=fcitx”

一旦ログアウトして再度ログインすれば日本語入力できるはずです。

Firefoxの日本語化とLibreOfficeのインストール

標準でもFirefoxは日本語表示できますがメニュー等が英語なので日本語言語パックをインストールします。

$ sudo pacman -S firefox-i18n-ja

Firefoxを起動し直せば日本語表示になるはずです。

LibreOfficeをインストールします。

$ sudo pacman -S libreoffice libreoffice-ja

libreoffice-freshが最新版でlibreoffice-stillが安定版です。どちらか聞かれると思うので必要な方をインストールしてください。

以上でAsahi Linuxのインストールができました。上記の動画はこの状態のAsahi Linuxを電源オンからFirefoxやLibreOfficeを起動しシャットダウンした内容になっています。

Asahi Linuxのアンインストール

Asahi Linuxのアンインストールは現時点ではAsahi Linuxがインストールされたパーティションを削除すればOKです。

ただし、間違って起動に必要なパーティションやリカバリーOSやmacOS本体などを削除してしてしまうとMacが起動しなくなってしまいます。どのパーティションを操作しているかdiskutil listで常に確認しながら作業するようにしてください。diskutilコマンドの詳細はdiskutil単独で実行したときのヘルプで確認してください。

パーティション分割のチートシートも参考にしてください(2022/3/25追記)。

通常のmacOSを標準起動に

シャットダウンしたあと電源ボタンを押しっぱなしで起動してブート選択画面を出し、通常のmacOSを起動してください。次に設定から起動ディスクを選び、macOSが標準起動するように変更して再起動してください。またはブート選択画面でオプションから起動ディスクを選んで通常のmacOSが標準起動するように変更して再起動してください。

Asahi Linux Desktopインストール時のパーティション例

Asahi Linux DesktopをインストールしたパーティションをmacOS上のターミナルでdiskutilを実行して確認します。

$ diskutil list
/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         251.0 GB   disk0
   1:             Apple_APFS_ISC ⁨⁩                        524.3 MB   disk0s1
   2:                 Apple_APFS ⁨Container disk4⁩         200.0 GB   disk0s2
   3:                 Apple_APFS ⁨Container disk2⁩         2.5 GB     disk0s3
   4:                        EFI ⁨EFI - ASAHI⁩             500.2 MB   disk0s4
   5:           Linux Filesystem ⁨⁩                        42.1 GB    disk0s5
   6:        Apple_APFS_Recovery ⁨⁩                        5.4 GB     disk0s6

/dev/disk2 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +2.5 GB     disk2
                                 Physical Store disk0s3
   1:                APFS Volume ⁨Asahi Linux - Data⁩      1.8 MB     disk2s1
   2:                APFS Volume ⁨Asahi Linux⁩             1.1 MB     disk2s2
   3:                APFS Volume ⁨Preboot⁩                 140.8 MB   disk2s3
   4:                APFS Volume ⁨Recovery⁩                1.9 GB     disk2s4

/dev/disk4 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +200.0 GB   disk4
                                 Physical Store disk0s2
   1:                APFS Volume ⁨Macintosh HD⁩            15.2 GB    disk4s1
   2:              APFS Snapshot ⁨com.apple.os.update-...⁩ 15.2 GB    disk4s1s1
   3:                APFS Volume ⁨Preboot⁩                 921.0 MB   disk4s2
   4:                APFS Volume ⁨Recovery⁩                783.2 MB   disk4s3
   5:                APFS Volume ⁨Data⁩                    141.4 GB   disk4s5
   6:                APFS Volume ⁨VM⁩                      20.5 KB    disk4s6

disk0s11:Apple_APFS_ISCは起動に必要なパーティション、disk0s66:Apple_APFS_RecoveryはリカバリーOS、disk0s22:Apple_APFS ⁨Container disk4⁩は通常のmacOSで/dev/disk4に中身が表示、disk0s33:Apple_APFS ⁨Container disk2はAsahi Linuxのブートローダであるm1n1+U-bootのパーティションで/dev/disk2に中身が表示、disk0s44:EFI ⁨EFI - ASAHI⁩はAsahi Linuxのgrubブートローダ等UEFI環境でブートプログラムが置かれるパーティション、disk0s55:Linux FilesystemはAsahi Linuxのrootパーティションです。

Asahi Linuxのアンインストールするために、disk0s3disk0s4disk0s5を削除し、元のmacOSのパーティションのdisk0s2を最大サイズまでリサイズします。

Asahi Linuxのrootパーティションの削除

作業前にdiskutil listを実行して処理対象のパーティションか確認してください。

disk0s5がAsahi Linuxのrootパーティションならば次のコマンドで削除できます。

$ diskutil eraseVolume free free disk0s5

これでdisk0s5が削除され空きパーティションになります。

Asahi LinuxのEFIパーティションの削除

改めてdiskutil listで処理対象のパーティションか確認してください。

disk0s4がAsahi LinuxのEFIパーティションならば次のコマンドで削除できます。

$ diskutil eraseVolume free free disk0s4

これでdisk0s4が削除され空きパーティションになります。

Asahi Linuxのブートローダパーティションの削除

改めてdiskutil listで処理対象のパーティションか確認してください。

disk0s3がAsahi Linuxのブートローダパーティションならば次のコマンドで削除できます。

$ diskutil apfs deleteContainer disk0s3

これでdisk0s3が削除され空きパーティションになります。

なおdiskutil eraseVolume free free disk0s3としてもエラーが出て削除できません。APFSのコンテナパーティションはdiskutil deleteContainerコマンドで削除します。

macOSのパーティションのリサイズ

改めてdiskutil listを実行してください。

/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         251.0 GB   disk0
   1:             Apple_APFS_ISC ⁨⁩                        524.3 MB   disk0s1
   2:                 Apple_APFS ⁨Container disk4⁩         200.0 GB   disk0s2
                    (free space)                         45.1 GB    -
   3:        Apple_APFS_Recovery ⁨⁩                        5.4 GB     disk0s6

/dev/disk4 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +200.0 GB   disk4
                                 Physical Store disk0s2
   1:                APFS Volume ⁨Macintosh HD⁩            15.2 GB    disk4s1
   2:              APFS Snapshot ⁨com.apple.os.update-...⁩ 15.2 GB    disk4s1s1
   3:                APFS Volume ⁨Preboot⁩                 921.0 MB   disk4s2
   4:                APFS Volume ⁨Recovery⁩                783.2 MB   disk4s3
   5:                APFS Volume ⁨Data⁩                    141.4 GB   disk4s5
   6:                APFS Volume ⁨VM⁩                      20.5 KB    disk4s6

disk0s2のすぐ下の(free space) 45.1 GBを取り込むようにリサイズすれば元のパーティションに戻ります。次のようにdiskutil resizeContainerコマンドを実行してください。

$ diskutil apfs resizeContainer disk0s2 0

最後のオプションはリサイズ後のパーティションサイズです。0を指定すると拡張可能な最大までリサイズします。

最後にdiskutil listで確認してください。

/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         251.0 GB   disk0
   1:             Apple_APFS_ISC ⁨⁩                        524.3 MB   disk0s1
   2:                 Apple_APFS ⁨Container disk4⁩         245.1 GB   disk0s2
   3:        Apple_APFS_Recovery ⁨⁩                        5.4 GB     disk0s6

/dev/disk4 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +245.1 GB   disk4
                                 Physical Store disk0s2
   1:                APFS Volume ⁨Macintosh HD⁩            15.2 GB    disk4s1
   2:              APFS Snapshot ⁨com.apple.os.update-...⁩ 15.2 GB    disk4s1s1
   3:                APFS Volume ⁨Preboot⁩                 921.0 MB   disk4s2
   4:                APFS Volume ⁨Recovery⁩                783.2 MB   disk4s3
   5:                APFS Volume ⁨Data⁩                    141.4 GB   disk4s5
   6:                APFS Volume ⁨VM⁩                      20.5 KB    disk4s6

これでAsahi Linuxのアンインストールができました。

何度もインストールとアンインストールを繰り返すと、古いブートポリシーが残り遅くなるようなので、遅くなった場合はリカバリーモードでこのスクリプトを実行するとよいとのことです。

まとめ

以上Asahi Linux Desktop アルファ版の内蔵SSDへのインストール、設定、アンインストールの解説をしました。

現時点ではchromiumなど一部動作しないもの対応していないハードがありますが、手元のM1 Mac miniではGPUアクセラレーションなしでも問題ない速度でKDE Plasmaデスクトップが動作しています。

パワーユーザの方や開発者の方はぜひともAsahi LinuxをインストールしてAsahi Linuxの開発に協力してみてください。

5
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
3