# mke2fs

创建磁盘分区上的“etc2/etc3”文件系统

## 补充说明

**mke2fs命令** 被用于创建磁盘分区上的“etc2/etc3”文件系统。

### 语法

```
mke2fs(选项)(参数)
```

### 选项

```
-b<区块大小>：指定区块大小，单位为字节；
-c；检查是否有损坏的区块；
-f<不连续区段大小>：指定不连续区段的大小，单位为字节；
-F：不管指定的设备为何，强制执行mke2fs；
-i<字节>：指定"字节/inode"的比例；
-N<inode数>：指定要建立的inode数目；
-l<文件>：从指定的文件中，读取文件西中损坏区块的信息；
-L<标签>：设置文件系统的标签名称；
-m<百分比值>：指定给管理员保留区块的比例，预设为5%；
-M：记录最后一次挂入的目录；
-q：执行时不显示任何信息；
-r：指定要建立的ext2文件系统版本；
-R=<区块数>：设置磁盘阵列参数；
-S：仅写入superblock与group descriptors，而不更改inode able inode bitmap以及block bitmap；
-v：执行时显示详细信息；
-V：显示版本信息。
```

### 参数

* 设备文件：指定要创建的文件系统的分区设备文件名；
* 块数：指定要创建的文件系统的磁盘块数量。

### 实例

创建指定的ext2文件系统。

```
mke2fs -q /dev/hda1
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hezhiqiang.gitbook.io/linux/ming-ling/mke2fs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
