NanoPi NEOの起動SDカードをMacにさすと認識できなくて、
「セットしたディスクは、このコンピュータで読み取れないディスクでした。」
と言われてしまいます。
rootfsのext4の部分がMacで読めないのは理解できますが、bootのパーティションはVFATなので、Macで読み書きできていいはず。
実はこれはbootのパーティションのIDが誤っているのが原因でした。
Linuxでは無視してくれるけど、Macではそれではじいているのでした。
以下のようにして修正することができます。
パーテションの情報を見てみる
LinuxにNanoPi NEOの起動SDカードを挿します。
そのデバイスファイルが/dev/sdc とすると、fdiskのpコマンドで状態を見ることができます。
$ sudo fdisk /dev/sdc
[sudo] password for koba:
Command (m for help): p
Disk /dev/sdc: 7948 MB, 7948206080 bytes
245 heads, 62 sectors/track, 1021 cylinders, total 15523840 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0e5a3eb0
Device Boot Start End Blocks Id System
/dev/sdc1 49152 131071 40960 83 Linux
/dev/sdc2 131072 15523839 7696384 83 Linux
/dev/sdc1はVFATなのに、Linuxと同じIDになっています。これが誤り。
パーティションIDの修正
引き続きfdiskコマンドで
t
1
b
と入力し、
p
で状態を確認します。
Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): b
Changed system type of partition 1 to b (W95 FAT32)
Command (m for help): p
Disk /dev/sdc: 7948 MB, 7948206080 bytes
245 heads, 62 sectors/track, 1021 cylinders, total 15523840 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0e5a3eb0
Device Boot Start End Blocks Id System
/dev/sdc1 49152 131071 40960 b W95 FAT32
/dev/sdc2 131072 15523839 7696384 83 Linux
この状態を書き込むには w を入力します。
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
書き込みの後fdiskコマンドが終了します。
このSDカードをMacに挿すと、今度はbootパーティションの読み書きができるようになります。