Manage a flash filesystem
flashctl [-efimruvxz] [-A] [-a flags] [-b align] [-c flag] [-L] [-l limit] [-n path] [-o offset] -p path [-s num] [-U] [-u] [-v...]
The options are processed in the order given, and apply to the last partition specified by a -p option, letting you control multiple partitions with one command.
Use this option only with a "raw" device (e.g. /dev/fs0); don't use it with a mounted partition. You can't use the -l and -o options with the -A option. |
If you specify the -v option for verbose output, flashctl outputs a period (.) for every partition unit that it erases. On RAM disk, the unit size is 64K; on other devices, it varies. This output is reassuring because it can take several minutes to erase slow flash devices.
The -L option fails if the partition
(e.g. /dev/fs0p0)
is mounted.
You can use /dev/fs0 to bypass the mounted filesystem check, but we don't recommend that you do so, because the /dev/fs0 path bypasses all protection mechanisms. If you use it, the flash driver doesn't know what filesystem or partition the locking affects. The filesystem might think the flash is writable and suddenly it isn't. The filesystem will get very confused, and write operations will start to fail. Worse yet, if you lock a single block in a filesystem via /dev/fs0, most of your writes will fail and suddenly stop working. |
This option overrides any mountpoint specified with the mount attribute of the mkefs command.
The -U option fails if the partition
(e.g. /dev/fs0p0)
is mounted.
You can use /dev/fs0 to bypass the mounted filesystem check, but we don't recommend that you do so. |
The flashctl utility is used to manage a flash filesystem. The utility interacts with the flash filesystem driver using devctl() messages. Using flashctl, you can erase and format a raw partition, force a reclaim operation, and get information about flash filesystem partitions.
|
Create a flash filesystem between 1M and 3M in a 4M raw partition:
flashctl -p /dev/fs0p0 -o 1M -l 2M -e -f
This command line results in this organization:
|
Erase, format, and then mount (as /fs0p0) the flash filesystem partition /dev/fs0p0:
flashctl -p /dev/fs0p0 -e -f -n
Mount the given flash filesystem partition as /flash:
flashctl -p /dev/fs0p0 -n /flash -m
The mount/unmount facilities (the -m and -u options) are a hack and don't provide complete mount functionality, such as read-only (mount -r) and special options (mount -o).
devf-800fads, devf-generic, devf-i365sl, devf-mtx600-w8, devf-p5064, devf-ppaq, devf-ram, devf-rpx-lite, devf-sc400, devf-vr41xx, mkefs
"FFS3 filesystem" in the Filesystems chapter of the System Architecture.