Skip to content

Format external storage

angrycandy edited this page Jul 8, 2017 · 1 revision

No FAT, please.

The file manager in Chrome OS can format external storage, but it uses FAT32, which doesn’t support symbolic links and other features that Linux users want in file storage. Here’s how to use Crouton CLI to format external storage to ext4.

Change the specifics of this example to match your situation:

  • User - bfw
  • SD card - Samsung SDXC 64GB Class 10 UHS-1
  • Device - mmcblk1
  • Partitions - none
  • File system type - ext4

My SD card had a partition, but yours may not.

(xenial)bfw@localhost:~$ lsblk | grep mmcblk1
mmcblk1       179:64   0 59.6G  0 disk 
`-mmcblk1p1   179:65   0 59.6G  0 part /var/host/media/removable/CB3-131
(xenial)bfw@localhost:~$

If the card is mounted, Chrome OS unmount it.

$ lsblk | grep mmcblk1
mmcblk1       179:64   0 59.6G  0 disk 
`-mmcblk1p1   179:65   0 59.6G  0 part 
$

Wipe any partition table with dd and format.

$ sudo dd if=/dev/zero of=/dev/mmcblk1 bs=1M count=100
...
104857600 bytes (105 MB, 100 MiB) copied, 6.76475 s, 15.5 MB/s
$ sudo mkfs.ext4 -L "Sam64GBext4" /dev/mmcblk1
...
$ sudo sync
$ 

Physically eject and reinsert the SD card.

Create directories and change permissions.

$ lsblk | grep mmcblk1
mmcblk1       179:64   0 59.6G  0 disk /var/host/media/removable/Sam64GBext4
$ cd /var/host/media/removable/Sam64GBext4
$ sudo mkdir Downloads bfw
$ sudo chmod a+rwx Downloads
$ sudo chown bfw bfw; sudo chgrp bfw bfw
$
Clone this wiki locally