New Linux partition and file system
Today, let's talk about building partitions and file systems on Linux. Windows system partitioning can be done with partitioning tools, what about Linux partitions and file systems?
Open SECURECRT, connect to Linux, enter command fdisk-l, can be drawn.
disk/dev/dm-0 doesn ' t contain a valid partition table
Disk/dev/dm-1 doesn ' t contain a valid partition table
The two words mean that the device dm-0 and Dm-1 did not establish a partition. OK, let's enter the following command to set up partitions in dm-0 and dm-1, respectively.
The first command fdisk/dev/dm-0, such as:
As you can see, by entering N again, a new partition is created.
Command (M for help): N
Command Action
E Extended
P primary partition (1-4)
P #建主分区
Partition number (1-4): 1 #分区号为1
First cylinder (1-1019, default 1): #直接回车默认从第一个柱面开始划分
Using Default value 1
Last cylinder, +cylinders or +size{k,m,g} (1-1019, default 1019): +2g #加空间大小, there are a number of options: + rear units can be connected to m,g,k (remember to capitalize) to divide the space you add, It can also be a number of cylinders. Either way, you cannot exceed the remaining space on the disk otherwise it is invalid.
Command (M for help): P #分好后查看分区信息, all that has just been done at a glance.
Immediately following the creation of the extended partition and logical partition:
The input w is saved and then exited, the partition is created successfully. Enter the command fdisk-l view and you can see that the new partition has been created.
The above is the specific steps to create a new partition, let's start by creating a file system in the new partition.
The Linux Learning Trilogy (ii)