1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

AsahiLinuxをインストール

Posted at

Mac mini(M2)にAsahiLinuxをインストール

Mac mini(M2)にAsahiLinuxをインストールした。少々ハマったところもあり、その記録。本家サイトは下記。

参考URL

  1. M2 MacBook AirのメインOSとしてAsahi Linuxを使うのです
  2. How To Dual Boot Fedora Asahi Remix And MacOS // Install Asahi Linux 2025
  3. Asahi Linux Desktop アルファ版の内蔵SSDへのインストールとアンインストール

インストール

本家サイト及び参考URLのとおりに進める。

インストールコマンド後の入力

下記コマンドにてインストールできる。

$ curl https://alx.sh | sh

ログを取得できた途中までであるが、以降、入力したところなどを中心に記載。

% curl https://alx.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2293    0  2293    0     0   2904      0 --:--:-- --:--:-- --:--:--  2906

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

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

MacOSアカウントのパスワード入力。

Welcome to the Asahi Linux installer!

This installer will guide you through the process of setting up
Asahi Linux on your Mac.

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

Press enter to continue.

Enterキーを押す。

Collecting system information...
  Product name: Mac mini (2023)
  SoC: Apple M2
  Device class: j473ap
  Product type: Mac14,3

(省略)

Partitions in system disk (disk0):
  1: APFS [Macintosh HD] (494.38 GB, 7 volumes)
    OS: [B*] [Macintosh HD] macOS v15.5 [disk3s1s1, XXXXXXXX-FDFD-AAAA-B928-YYYYFD28ZZZZ]
  2: APFS (System Recovery) (5.37 GB, 2 volumes)
    OS: [  ] recoveryOS v15.5 [Primary recoveryOS]

  [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 [Macintosh HD] (494.38 GB, 7 volumes)
  Total size: 494.38 GB
  Free space: 94.85 GB
  Available space: 56.76 GB
  Overhead: 89.76 MB
  Minimum new size: 437.63 GB (88.52%)

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): 80%
Size is too small, please enter a value > 437.63 GB (88.52%)
» New size (min): 90%

状況よくわからず、最初は80%と入れたが怒られたので、90%を入力。

Resizing will free up 49.44 GB of space.

Note: your system may appear to freeze during the resize.
This is normal, just wait until the process completes.
» Continue? (y/N): y

”y”入力。

Started APFS operation
Aligning shrink delta to 49,438,347,264 bytes and targeting a new container size of 444,946,448,384 bytes
Determined the minimum size for the APFS Container to be 405,924,741,120 bytes
Resizing APFS Container designated by APFS Container Reference disk3
The specific APFS Physical Store being resized is disk0s2

(省略)

The container /dev/disk0s2 appears to be OK
Storage system check exit code is 0
Shrinking APFS Physical Store disk0s2 from 494,384,795,648 to 444,946,448,384 bytes
Shrinking APFS data structures
Shrinking partition
Modifying partition map
Finished APFS operation

Resize complete. Press enter to continue.

Enterキーを押す。

Collecting partition information...
  System disk: disk0

Collecting OS information...

Partitions in system disk (disk0):
  1: APFS [Macintosh HD] (444.95 GB, 7 volumes)
    OS: [B*] [Macintosh HD] macOS v15.5 [disk3s1s1, C708049B-FDFD-4951-B928-B027FD2867E4]
  2: (free space: 49.44 GB)
  3: APFS (System Recovery) (5.37 GB, 2 volumes)
    OS: [  ] recoveryOS v15.5 [Primary recoveryOS]

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

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

”f”入力。

Choose an OS to install:
  1: Fedora Asahi Remix 42 with KDE Plasma
  2: Fedora Asahi Remix 42 with GNOME
  3: Fedora Asahi Remix 42 Server
  4: Fedora Asahi Remix 42 Minimal
  5: UEFI environment only (m1n1 + U-Boot + ESP)
» OS: 2

ここではGNOME(2)を選択。

Downloading OS package info...
- 

Minimum required space for this OS: 27.21 GB

Available free space: 49.44 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): max

”max”入力。

The new OS will be allocated 49.44 GB of space,
leaving 86.02 KB of free space.

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

ここでは、”Asahi”入力。

Using macOS 13.5 for OS firmware

Downloading macOS OS package info...

(省略)

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

Installation successful!
Help us improve Asahi Linux!
We'd love to know how many people are installing Asahi and on what
kind of hardware. Would you mind sending a one-time installation
report to us?

This will only report what kind of machine you have, the OS you're
installing, basic version info, and the rough install size.
No personally identifiable information (such as serial numbers,
specific partition sizes, etc.) is included. You can view the
exact data that will be sent.

Report your install?
  y: Yes
  n: No
  d: View the data that will be sent
» Choice (y/n/d): n

”n”入力(レポートしない)。

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.

Press enter to continue.

Enterキーを押す。

When the system shuts down, follow these steps:

1. Wait 25 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 you see 'Loading startup options...' or a spinner.
4. Wait for the volume list to appear.
5. Choose 'Asahi'.
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.

If you end up in a bootloop or get a message telling you that macOS needs to
be reinstalled, that means you didn't follow the steps above properly.
Fully shut down your system without doing anything, and try again.
If in trouble, hold down the power button to boot, select macOS, run
this installer again, and choose the 'p' option to retry the process.

Press enter to shut down the system.

ここは大事らしい。内容を把握して、最後に、Enterキーを押す。その後、上記のとおり、進めるとインストール完了。適宜、再起動。

ディスクのパーティション(diskutil list)

何かしらの情報になるかもしれないので記録。

AsahiLinuxインストール前

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

/dev/disk3 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +494.4 GB   disk3
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD            11.3 GB    disk3s1
   2:              APFS Snapshot com.apple.os.update-... 11.3 GB    disk3s1s1
   3:                APFS Volume Preboot                 7.3 GB     disk3s2
   4:                APFS Volume Recovery                1.0 GB     disk3s3
   5:                APFS Volume Data                    378.6 GB   disk3s5
   6:                APFS Volume VM                      20.5 KB    disk3s6
   7:                APFS Volume ForCross                28.3 GB    disk3s7

AsahiLinuxインストール後(にMacOS上で実施)

/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.3 GB   disk0
   1:             Apple_APFS_ISC Container disk1         524.3 MB   disk0s1
   2:                 Apple_APFS Container disk4         444.9 GB   disk0s2
   3:                 Apple_APFS Container disk3         2.5 GB     disk0s3
   4:                        EFI EFI - ASAHI             524.3 MB   disk0s4
   5:           Linux Filesystem                         1.1 GB     disk0s5
   6:           Linux Filesystem                         45.3 GB    disk0s6
   7:        Apple_APFS_Recovery Container disk2         5.4 GB     disk0s7

/dev/disk3 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +2.5 GB     disk3
                                 Physical Store disk0s3
   1:                APFS Volume Asahi - Data            1.8 MB     disk3s1
   2:                APFS Volume Asahi                   1.1 MB     disk3s2
   3:                APFS Volume Preboot                 148.4 MB   disk3s3
   4:                APFS Volume Recovery                776.7 MB   disk3s4

/dev/disk4 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +444.9 GB   disk4
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD            11.3 GB    disk4s1
   2:              APFS Snapshot com.apple.os.update-... 11.3 GB    disk4s1s1
   3:                APFS Volume Preboot                 7.3 GB     disk4s2
   4:                APFS Volume Recovery                1.0 GB     disk4s3
   5:                APFS Volume Data                    349.9 GB   disk4s5
   6:                APFS Volume VM                      20.5 KB    disk4s6
   7:                APFS Volume ForCross                28.2 GB    disk4s7

disk0s3からdisk0s6までの4つのAsahiLinux用のパーティションが作成されている(詳細不明)。90%をMacOSに割り当てる指定をしているので、サイズ的には正しそう。

AsahiLinuxのディスク状況

$ dh -h
ファイルシス   サイズ  使用  残り 使用% マウント位置
/dev/nvme0n1p6    43G  7.8G   34G   19% /
vendorfw          12G   33M   12G    1% /usr/lib/firmware/vendor
devtmpfs         4.0M     0  4.0M    0% /dev
tmpfs             12G  1.4M   12G    1% /dev/shm
tmpfs            4.7G  8.7M  4.7G    1% /run
tmpfs            1.0M     0  1.0M    0% /run/credentials/systemd-journald.service
tmpfs             12G   64K   12G    1% /tmp
/dev/nvme0n1p6    43G  7.8G   34G   19% /home
/dev/nvme0n1p5   974M  292M  616M   33% /boot
/dev/nvme0n1p4   499M  129M  371M   26% /boot/efi
tmpfs            1.0M     0  1.0M    0% /run/credentials/systemd-resolved.service
tmpfs            1.0M     0  1.0M    0% /run/credentials/serial-getty@ttySAC0.service
tmpfs            2.4G  656K  2.4G    1% /run/user/1000

おそらく、先ほどの”disk0s6”の詳細であろう。

後始末。

どこかで見つけたもの。インストール後に、後述する起動後のオプションから起動できるMacOS復旧メニューのターミナルにて下記を実行する。

curl -L https://alx.sh/cleanbp | sh

ChatGPTに問い合わせると、上記により、ブートポリシーのリセット、MacOS 側の警告解消、整合性復元が行われるらしい。

起動:MacかAsahiLinux

電源スイッチを長押ししたまま起動すると、下記画面が表示される(結構長く押したままにする必要あり)。ここで、いずれかを選択することができる(クリック)。

IMG_20250727_082419.jpg

なお、オプションを選択すると、いつものMacOS復旧画面に移行できる。また、MacOS上では、システム設定画面の起動ディスク選択で、MacOSかAsahiLinuxかを選択できる(下記)。

起動ディスク.png

インストール後

uname -a

Linux fedora 6.14.8-400.asahi.fc42.aarch64+16k #1 SMP PREEMPT_DYNAMIC Fri May 30 20:27:54 UTC 2025 aarch64 GNU/Linux

”aarch64”が見える。

パッケージマネージャー:pacmanではなくdnfであった

(少なくとも日本語で)見つかる情報では、パッケージマネージャーとしてpacmanがAsahiLinuxで使う記事が多かった。なので、pacmanを使おうとしたのであるが、インストール直後にpacmanが見つからず。無理やりインストールしたが、全く機能せず、、、。ChatGPTに問い合わせすると、/etc/os-releaseを見せろと言われた。

/etc/os-release
NAME="Fedora Linux Asahi Remix"
VERSION="42 (Forty Two [Adams])"
RELEASE_TYPE=stable
ID=fedora-asahi-remix
ID_LIKE=fedora
VERSION_ID=42
VERSION_CODENAME="adams"
PLATFORM_ID="platform:f42"
PRETTY_NAME="Fedora Linux Asahi Remix 42 (Forty Two [Adams])"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora-asahi-remix:42"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedora-asahi-remix.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f42/system-administrators-guide/"
SUPPORT_URL="https://discussion.fedoraproject.org/c/neighbors/asahi/asahi-help/94"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=42
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=42
VARIANT="Workstation Edition"
VARIANT_ID=workstation

曰く、「NAME="Fedora Linux Asahi Remix"」は、Arch ベースの「Asahi Linux」ではなく、Fedoraベースの「Asahi Remix」とのこと。なので、「dnf」を使うことになる。

終わりに

MacOSとAsahiLinuxとでベンチマークする予定。同じM2でどうなるか、、というところ。なお、AsahiLinuxは、M1及びM2しか対応していない。M4 Macを所持しているので、早くM4対応してほしいところ。

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?