ECS LIZA Z 内蔵 eMMC を使う
はじめに
Fedora25ぐらいの新しいディストリビューションであればインストーラの時点で認識してフォーマット、マウントなどできていると思いますが、コマンドでフォーマットするまでの流れをメモしておきます。
デバイス名を確認する
/dev の下に生成はされていますがどれかはわからないので、 dmesg からデバイス名を探します。
[root@localhost ~]# dmesg | grep mmc [ 3.128699] mmc0: SDHCI controller on PCI [0000:00:1c.0] using ADMA 64-bit [ 3.294539] mmc0: new HS400 MMC card at address 0001 [ 3.299862] mmcblk0: mmc0:0001 DF4032 29.1 GiB [ 3.299969] mmcblk0boot0: mmc0:0001 DF4032 partition 1 4.00 MiB [ 3.300155] mmcblk0boot1: mmc0:0001 DF4032 partition 2 4.00 MiB [ 3.300327] mmcblk0rpmb: mmc0:0001 DF4032 partition 3 4.00 MiB
eMMCサイズが32GBなので、 mmcblk0 が該当します。 mmcblk0boot0, mmcblk0boot1, mmcblk0rpmb はeMMCの内蔵デバイスのようなので無視します。 (正確なうらとりはできていないです。)
[root@localhost ~]# ls -l /dev/mmcblk0 brw-rw----. 1 root disk 179, 0 Apr 7 14:58 /dev/mmcblk0
fdisk コマンドでも確認する
[root@localhost ~]# fdisk -lu Disk /dev/mmcblk0: 29.1 GiB, 31268536320 bytes, 61071360 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
初期化し利用する
デバイス名が確認できたら、 fdisk -> mkfs.xfs -> マウントポイントの作成 -> マウント で普通に利用できます。
手順では、 xfsにフォーマットしています。
[root@localhost ~]# fdisk /dev/mmcblk0 Welcome to fdisk (util-linux 2.28.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Device does not contain a recognized partition table. Created a new DOS disklabel with disk identifier 0x03c81196. Command (m for help): p Disk /dev/mmcblk0: 29.1 GiB, 31268536320 bytes, 61071360 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 Disklabel type: dos Disk identifier: 0x03c81196 Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): p Partition number (1-4, default 1): 1 First sector (2048-61071359, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-61071359, default 61071359): Created a new partition 1 of type 'Linux' and of size 29.1 GiB. Command (m for help): p Disk /dev/mmcblk0: 29.1 GiB, 31268536320 bytes, 61071360 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 Disklabel type: dos Disk identifier: 0x03c81196 Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 2048 61071359 61069312 29.1G 83 Linux [root@localhost ~]# ls -l /dev/mmcblk0p1 brw-rw----. 1 root disk 179, 1 Apr 7 14:58 /dev/mmcblk0p1 [root@localhost ~]# mkfs.xfs -f /dev/mmcblk0p1 meta-data=/dev/mmcblk0p1 isize=512 agcount=4, agsize=1908416 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=1, sparse=0 data = bsize=4096 blocks=7633664, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0 ftype=1 log =internal log bsize=4096 blocks=3727, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 [root@localhost ~]# mkdir /emmc [root@localhost ~]# vi /etc/fstab (省略) /dev/mmcblk0p1 /emmc xfs defaults 1 2 [root@localhost ~]# mount /emmc [root@localhost ~]# df | grep /emmc /dev/mmcblk0p1 30519748 32960 30486788 1% /emmc
以上