当前位置:网站首页>Hard Disk Partitioning and Permanent Mounting
Hard Disk Partitioning and Permanent Mounting
2022-08-05 06:09:00 【Magic star】
Hard Disk Partitioning and Permanent Mounts
MBR partition
What is a hard disk: A computer hard disk is the main storage device of a computer.
The role of partitions
- Main partition: can be used directly, can be installed system
- Extended partition: cannot be used directly, it must be divided into logical partitions
- Logical partition: Relying on the extended partition, the space in the extended partition (with the operating system installed) is used
mbr partition:
Only partition the hard disk below 2T
A sector has 512 bytes, the first 446 bytes are the boot program
- Primary partition: serial number is 1-4
- Logical partition: sequence number starts from 5
- Extended partition: must be the primary partition
- The primary partition is not necessarily an extended partition
- The logical partition must not be the primary partition
gpt partition
It can have 128 partition tables and can partition hard disks above 2T
fdisk

Create a normal partition
Usage (fdisk disk name)

mkfs.xfs partition name (create filesystem)

mount: mount partition name folder name

Create a logical partition
Usage (fdisk hard drive name)

mkfs.xfs partition name (create filesystem)

mount: mount partition name folder name


Create a special partition (swap partition)
Usage (fdisk hard drive name)


mount: mount partition name folder name
Create a special partition swap
The partition type must be changed to 82 (swap partition)
t: Change the partition type

Permanent mount
[[email protected] ~]#vim /etc/fstab
[[email protected] ~]#mount -a
Mounting rules
1. A mount point can only mount one device at a time
2. A mount point mounts multiple devices at the same time, only the data of the last device can be seen, the data on other devices will be hidden
3. A device can be mounted to multiple mount points at the same time
4. Usually the mount point is usually an existing empty directory
If a user is mountingThe mount directory cannot be unmounted
I want to remount
mount -o remount /dev/sdb1 /mnt/
mount -o remount,ro /dev/sdb1 /mnt/
fuser -km /mnt/ ###Kill directly
MBR 446 before the master boot record 64 after the boot program Partition table 2 mark bit
1. Partition fidsk gdisk Primary partition extension logic
2. Create file system mkfs. File system type mkswap
3. Mountmount swapon
Repair file system:
dd if=/dev/zero of=/dev/sdb1 bs=512 count=1
dd copy
if copy from where what /dev/zero
ofIt is copied to /dev/sdb1
bs=512 once copied 512
count=1 copied once
边栏推荐
猜你喜欢
随机推荐
[Pytorch study notes] 8. How to use WeightedRandomSampler (weight sampler) when the training category is unbalanced data
Unity物理引擎中的碰撞、角色控制器、Cloth组件(布料)、关节 Joint
一个小时教你如何掌握ts基础
Getting Started Doc 08 Conditional Plugins
电子产品量产工具(1)- 显示系统实现
最简单的防抖节流理解法
新一代解析技术——云解析
调用TensorFlow Objection Detection API进行目标检测并将检测结果保存至本地
C语言的一些小常识
D41_缓冲池
将一句话的单词进行倒置(C语言纯代码)
每日一题-二分法
每日一题-三数之和-0716(2)
framebuffer应用编程及文字显示(1)
Leetcode刷题——对链表进行插入排序
入门文档05 使用cb()指示当前任务已完成
腾讯云消息队列CMQ
Autoware--北科天绘rfans激光雷达使用相机&激光雷达联合标定文件验证点云图像融合效果
【UiPath2022+C#】UiPath If条件语句
[Paper Intensive Reading] Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation (R-CNN)









