Those things of the hard disk (primary partition, extended partition, logical partition, active partition, system partition, boot partition, boot sector, MBR, etc.

Primary partition, extended partition, logical partition, active partition, system partition, boot partition. . . . . . . . .
Master Boot Sector, MBR, bootloader. . . . . . . . . .
Various concepts, do you know what they mean?
It took a day to finally research it clearly. The explanations of many posts on the Internet are wrong, or they do not go deep into the essence. What are the C drives and D drives, they have all been brainwashed by windows. Wasted a long time.

Primary partition: In fact, there was no concept of primary partition, extended partition and logical partition in early hard disk partitions, and the type of each partition is primary partition. Since the hard disk only reserves 64 bytes of storage space for the partition table, and the parameters of each partition occupy 16 bytes, the master boot sector can only store data of 4 partitions in total. That is to say, a physical hard disk can only be divided into 4 logical disks. In specific applications, four logical disks often cannot meet actual requirements. In order to create more logical disks for the operating system, extended partition and logical partition are introduced, and the original partition type is called primary partition.

Extended partition: As mentioned above, 4 partitions obviously cannot meet the requirements, but what if the physical hardware limit can only have 4 partitions? So the operating system started to go out and named one of the main partitions as the extended partition. Remember that it is just a name. In principle, the extended partition and the main partition are the same, but the functions are different. After talking about logical partitions below, you will understand what I am talking about.

Logical partition: 4 partitions are definitely not enough, I want 20 partitions, what should I do? Turn one of the main partitions into an extended partition, and then cut on this extended partition to turn into D disks, E disks, F disks, etc., but these disks are combined into an extended partition, and these disks are linked to each other. , unlike the main partition, the 4 are independent of each other and do not interfere with each other. The logical partition is linked by a linked list. If the partition information in the E drive is lost, the operating system cannot find the F drive.


Those things about the hard disk - Xorrlei - Xu Lei's technical blog
Boot partition: very simple, the partition for storing operating system files, for example, if you install two systems: win7+linux, then you have two boot partitions. If Windows is installed, it depends on the area where the windows folder (system32 file) is stored, which area is your boot partition, the C drive is installed by default, and you can also install the F drive. If Linux is installed, it depends on where the / partition is installed, which is the boot partition.

System partition: The partition where Ntldr program or Grub program is stored. Windows is usually installed in the C drive, and Linux is usually installed in the /boot partition.

Active partition: the active partition is the main partition, and the active partition is the system partition. Each time the PC starts, a hard disk can only There is an active partition. If you want to start Windows, set the Windows system partition as the active partition, and the computer will go there to load the boot program (Ntldr or Grub) and execute it. If you want to start Linux, set the Linux system partition as the active partition. .

Those things about hard disk (primary partition, extended partition, logical partition, active partition, system partition, boot partition, boot sector, MBR, etc.) - Xorrlei - Xu Lei's technical blog
did you see? The above picture shows the partition of my hard disk. My win7 is installed on the C drive, that is, my windows folder is on the C drive, so the C drive is the boot partition; but I installed Grub on the Z drive, that is, the boot program Ntldr. boot.ini or something, so the Z disk is the system partition. . . . . And because I am currently starting the win7 system, the system partition of win7 is also the active partition.

You children's shoes should all understand it~~~~~
 Let's talk about the startup
 

Master boot sector: each hard disk, yes, each hard disk is not each partition, there is only one master boot sector, that is, the first sector of the No. 0 cylinder and No. 0 head of the hard disk, with a size of 512 bytes . The master boot sector contains MBR (hard disk master boot record MBR occupies 446bytes), DPT (partition table DP occupies 64bytes), MN (hard disk valid mark Magic Numbe occupies 2byte. AA and 55 are called magic numbers (Magic Number), BOIS When reading MBR, always check whether there are these two magic numbers at the end, if not, it is considered as a hard disk that has not been partitioned), these three areas are independent of the operating system and exist on each hard disk; The MBR is an executable program, and different codes are written by each operating system. The storage space of the MBR is limited to 446 bytes, and the only thing the MBR does is load the second boot loader. The MBR load generated by Windows runs PBR; the MBR load generated by GRUB runs grldr

MBR: As mentioned above, it is a program with a length of 446 bytes, which is used to load the bootloader.

 

The three terms of primary partition, extended partition and logical partition are for the operating system, mainly from the concept of functional division;

The three terms system partition, boot partition, and boot partition are used for disk partition types.

 

1. Primary partition, extended partition and logical partition

1. Concept

MBR下的硬盘分区有三种,主磁盘分区、扩展磁盘分区、逻辑分区。ps现在的GPT分区至少可以划分128个主分区,未来很有可能将不存在扩展分区和逻辑分区的概念。

本段摘自http://www.pc6.com/infoview/Article_53651.html

主分区:也叫引导分区,最多可能创建4个,当创建四个主分区时候,就无法再创建扩展分区了,当然也就没有逻辑分区了。主分区是独立的,对应磁盘上的第一个分区,“一般”就是C盘。在Windows系统把所有的主分区和逻辑分区都叫做“盘”或者“驱动器”,并且把所有的可存储介质都显示为操作系统的“盘”。因此,从“盘”的概念上无法区分主分区和逻辑分区。并且盘符可以在操作系统中修改,这就是要加上“一般”二字的原因。

扩展分区:除了主分区外,剩余的磁盘空间就是扩展分区了,扩展分区可以没有,最多1严格地讲它不是一个实际意义的分区,它仅仅是一个指向下一个分区的指针,这种指针结构将形成一个单向链表。这样在主引导扇区中除了主分区外,仅需要存储一个被称为扩展分区的分区数据,通过这个扩展分区的数据可以找到下一个分区(实际上也就是下一个逻辑磁盘)的起始位置,以此起始位置类推可以找到所有的分区。无论系统中建立多少个逻辑磁盘,在主引导扇区中通过一个扩展分区的参数就可以逐个找到每一个逻辑磁盘。

逻辑分区:在扩展分区上面,可以创建多个逻辑分区。逻辑分区相当于一块存储截止,和操作系统还有别的逻辑分区、主分区没有什么关系,是“独立的”。

2、

给新硬盘上建立分区时都要遵循以下的顺序:建立主分区→建立扩展分区→建立逻辑分区→激活主分区→格式化所有分区

分区从实质上说就是对硬盘的一种格式化。当我们创建分区时,就已经设置好了硬盘的各项物理参数,指定了BIOS系统下硬盘主引导记录(即Master Boot Record,一般简称为MBR)和引导记录备份的存放位置。
而对于文件系统以及其他操作系统管理硬盘所需要的信息则是通过之后的高级格式化,即Format命令来实现。

主分区+扩展分区总共不能超过4(扩展分区也可以看成是主分区)其个数是由硬盘的主引导记录MBR(Master Boot Recorder)决定的,MBR存放启动管理程序(如GRUB)和分区表记录。扩展分区下又可以包含多个逻辑分区.

hd0,0)表示第一块硬盘第一个主分区,(hd1,4)表示第2块硬盘第一个逻辑分区。

linux中第一块硬盘分区为hda分区,主分区编号为hda1-4,逻辑分区从5开始。

 

3、关于MBR与GPT

MBR全称为Master Boot Record,即硬盘的主引导记录。

一般把它和分区联系起来的时候,就会代表一种分区的制式。

由于硬盘的主引导记录中仅仅为分区表保留了64个字节的存储空间,而每个分区的参数占据16个字节,故主引导扇区中总计只能存储4个分区的数据。也就是说,一块物理硬盘只能划分为4个主分区磁盘。并且MBR最大仅支持2TB的硬盘,在现在这个连4T都不稀奇的时代,MBR出场的机会恐怕会越来越少。

GPTGlobally Unique Identifier Partition Table Format,全局唯一标识符的分区表的格式

这种分区模式相比MBR有着非常多的优势。

首先,它至少可以分出128个分区,完全不需要扩展分区和逻辑分区来帮忙就可以分出任何想要的分区来。其次,GPT最大支持18EB的硬盘,几乎就相当于没有限制。

 

二、系统分区、引导分区和启动分区

      简单地把别人C盘中的所有文件复制到自己的C盘,虽然包括Windows文件夹,但并不能成功启动这个系统。原因何在呢?这是因为系统分区和启动分区存在区别的原因。(系统分区也叫引导分区)

  1、概念

根据微软帮助文档的解释:

      系统分区是指导包含加载Windows(比如Ntldr、Boot.ini、Ntdetect.com)所需的硬件特定文件的分区,系统分区可以(但不是必须)与启动分区相同。

      启动分区则是指包含操作系统及其支持文件的分区。

通俗理解,系统分区就是保存各种引导文件的分区(也叫引导分区),启动分区则是指保存Windows目录的分区。比如对于Windows 7系统,保存Bootmgr文件和boot目录的分区就是系统分区,启动分区则是保存Windows目录的分区。

  2、系统分区和引导分区的联系与区别 

情况1:系统分区就是启动分区

对于系统用户,系统分区一般就是启动分区,因为引导文件和Windows目录都存在于同一位置。比如XP安装在C盘单系统用户,ntldr、boot.ini、Ntdetect.com引导文件和Windows目录都在C盘,所以这两个分区是一致的。

情况2:系统分区不是启动分区

对于c:Windows XP+d:Windows 7双系统用户,此时系统分区就不一定是启动分区了。比如当你通过Bootmgr多重启动菜单进入Windows 7,此时对于Windows 7而言,系统分区就是C盘(因为其中包含c:\bootmgr引导文件和c:\boot引导目录),启动分区则是D盘(因为该分区保存着d:\windows系统目录)。进入Windows 7后打开磁盘管理组件,可以非常清楚看到两者的不同,这也就是解释文档中但不是必须的实例解读。

对于一些品牌机或者使用Windows 7安装光盘全新安装系统的用户,由于这此电脑的C盘前还存在隐藏分区,隐藏分区负责保存系统引导文件,因此系统分区也不是启动分区。别轻易碰系统分区。

3、应用

清楚了系统分区,启动分区的联系与区别,就很容易对付一些常见启动故障了。比如,对于c:Windows XP+D:Windows 7双系统用户,如果对C盘进行格式化重装XP后就无法进入Windows 7.因为对于Windows 7来说,格式化C盘后就破坏了其系统分区,自然无法进行成功地引导。

系统分区担负系统引导功能,如果该分区文件丢失就会告成系统无法引导。比如对于XP用户,如果丢失ntldr引导文件,开机就会出现ntldr is missing(ntldr文件丢失)提示。常规修复方法是添加启动文件,或对启动配置(比如Windows 7下BCD文件)进行重新编辑。可以通过一些启动U盘的PE系统的引导修复软件NTBOOTautofix进行修复。启动分区则是系统核心文件、系统初始化、核心加载、驱动配置、系统服务管理都是基于该分区文件的存在。

(题外话:

NT5.x=2000/XP/2003    这些操作系统的启动文件和启动菜单配置文件,存放在c:\boot.ini文件里;

      NT5.0=Win2000;NT5.1=XP;NT5.2=WIN2003;

NT6.x=Vista/2008/Win7/2008r2  这些操作系统的启动文件和启动菜单配置文件,存放在c:\boot\bcd文件里;
      NT6.0=Vista/2008;NT6.1=Win7/2008r2;)

如果先安装了XP,然后想在另外一个分区安装win7或以上,有时安装完会找不到启动项,则可以通过修改boot.ini文件来增加引动启动菜单项。

在下图所示的文件末尾增加一行"multi(0)disk(0)rdisk(0)partition(2)\windows="Microsoft Windows 7 x86    " /NOEXECUTE=OPTIN /FASTDETECT"

Note that the number in brackets after the partition indicates the serial number of the partition. You can refer to the CMD command diskpatition in the previous article. For the meaning of other parameters, please search for the keyword "boot.ini"

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325806950&siteId=291194637