sudo diskutil list

sudo diskutil unmount /dev/disk2s1
sudo dd bs=1m if=2015-02-16-raspbian-wheezy.img of=/dev/rdisk2



※raspi-configで、expand root file systemはしない。すると、ルートファイルシステムがサイズ拡張されてSDの全エリア使ってしまうので。

$sudo fdisk /dev/mmcblk0

Command (m for help): n
Partition type:
p primary (2 primary, 0 extended, 2 free)
e extended
Select (default p): p
Partition number (1-4, default 3): 3
First sector (2048-15564799, default 2048): 6400000
Last sector, +sectors or +size{K,M,G} (6400000-15564799, default 15564799):
Using default value 15564799

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)
Syncing disks.

$ sudo reboot


sudo mkfs.ext4 /dev/mmcblk0p3

/etc/fstab 変更

/dev/mmcblk0p1 /boot vfat defaults 0 0
/dev/mmcblk0p2 / ext4 defaults,noatime 0 0
/dev/mmcblk0p3 /mnt ext4 defaults,noatime 0 0

5列目のパラメーター:0 -> fschkしない。

Leave a Comment.