挂载硬盘
489
2021-08-13 13:55
fdisk -l
fdisk /dev/vdb
Command (m for help): n #新建分区
Command action
e extended
p primary partition (1-4)
p #分区类型
Partition number (1-4): 1 #分区编号
First cylinder (1-1305, default 1):1
Using default value 1 #分区起始位置,默认即可
Last cylinder, +cylinders or +size{K,M,G} (1-1305, default 1305): 1305 #结束位置,默认即可
Command (m for help): t #指定分区格式
Selected partition 1
Hex code (type L to list codes): 83 #设置为Linux分区
Changed system type of partition 1 to 8e (Linux LVM)
Command (m for help): w #保存
The partition table has been altered!
Calling ioctl() to re-read partition table. Syncing disks.
fdisk -l
partprobe
mkfs.ext3 /dev/vdb1
mount /dev/vdb1 /home
df -l