linux 分区 格式化 挂载 新硬盘

一、给硬盘分区orm

fdisk /dev/sda
Command (m for help): n
Command action
e extended
p primary partition (1-4)
输入:e
Partition number (1-4): 1
First cylinder (1-9729, default 1):回车
Last cylinder or +size or +sizeM or +sizeK (1-9729, default 9729):回车
Command (m for help):w(保存退出)it

二、式化硬盘io

fdisk -l
mkfs -t ext3 /dev/sda1
Writing superblocks and filesystem accounting information:直接回车。ast

三、挂载form

 mkdir /testtest

mount -t ext3 /dev/sda1 /testfile

4、开机直接挂载
编辑/etc/fstab 文件
添加:/dev/sda1 /test ext3 defaults 1 1im

相关文章
相关标签/搜索