[daily] basic concepts of xiaobailai installation BIOS and hard disk partition


In the past two days, because of testing in Linux, the system of Linux was broken first, and then the boot was broken after reinstalling the Linux system. In the process of repairing the boot, the win8 system of the machine was damaged. After repairing the boot and reinstalling Linux again, Linux can access it. After reinstalling the windows system, it still can’t, and the boot part can’t either. From my experience, it can be seen that using Linux as a daily system has great risks, because its permissions are very high and the dependence of some software may modify the dependency Library of the local interface. After modification, it is very easy to make the interface unresponsive. You must be careful.

When we are installing the system, the first thing is to enter the BIOS setting interface of the computer first. What is the BIOS?
BIOS is the abbreviation of basic input output system. It means basic input output system. It is a system between hardware and operating system. In essence, BIOS is a software, which is integrated on the main board. Intel later upgraded the BIOS specification, and the BIOS was upgraded to UEFI BIOS. The new computer generally uses UEFI BIOS, and can be configured as a traditional BIOS, also known as legacy.

When using UEFI BIOS, UEFI needs to access EFI partition and look for boot file of operating system.
During the installation, there is also a secure boot option. This option itself is for security, but Microsoft has evolved into a tool to prevent changing the pre installed windows system to other systems. Therefore, it is recommended to turn off this option.

Use fdisk-l in the Linux system I can enter to check the partition of hard disk:

[email protected]:/boot# fdisk -l /dev/sda
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 7FB53ABC-61C6-43F7-B32D-2EC645A394CA

Device         Start       End   Sectors  Size Type
/dev/sda1       2048   2050047   2048000 1000M BIOS boot
/dev/sda2    2050048   2582527    532480  260M EFI System
/dev/sda3    2582528   2844671    262144  128M Microsoft reserved
/dev/sda4    2844672 317433855 314589184  150G Microsoft basic data
/dev/sda5  317435904 527149055 209713152  100G Microsoft basic data
/dev/sda6  527151104 736864255 209713152  100G Microsoft basic data
/dev/sda7  736866304 841721855 104855552   50G Microsoft basic data
/dev/sda8  841723904 946579455 104855552   50G Microsoft basic data
/dev/sda9  946581504 976773119  30191616 14.4G Windows recovery environment

Use the parted command to view the current partition situation, and enter the P command after parted

[email protected]:/boot# parted
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p                                                                
Model: ATA ST500LM021-1KJ15 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                          Flags
 1      1049kB  1050MB  1049MB                                             hidden, bios_grub
 2      1050MB  1322MB  273MB   fat32        EFI system partition          boot, esp
 3      1322MB  1456MB  134MB                Microsoft reserved partition  msftres
 4      1456MB  163GB   161GB   ntfs         Basic data partition          msftdata
 5      163GB   270GB   107GB   ext4         Basic data partition          msftdata
 6      270GB   377GB   107GB   ntfs         Basic data partition          msftdata
 7      377GB   431GB   53.7GB  ntfs         Basic data partition          msftdata
 8      431GB   485GB   53.7GB  ntfs         Basic data partition          msftdata
 9      485GB   500GB   15.5GB  ntfs                                       hidden, diag

Disklabel type: gpt
Partition table: GPT means that the partition table is GPT. GPT replaces the traditional MBR. Using GPT can support more than 2T of larger hard disks, and MBR will not work. Therefore, under the guidance of UEFI, GPT partition tables are used
The value in my other computer is DOS

The first partition / dev / sda1 is BIOS boot. The flags are hidden and BIOS grub. Under traditional BIOS legacy, if the hard disk uses GPT partition table, you need to create such a BIOS boot partition
The second partition, / dev / sda2, is EFI system, and flags are boot and esp. this is the ESP partition mentioned earlier. The file system is FAT32, which means that the boot program of the system will be called from this partition in UEFI mode
/Dev / sda5 is the partition where I install Linux system. It is mounted to the root directory and the file system is ext4
Other partitions are the ones that computers buy. They are related to win system

Use lsblk to list block device information – F to display the file system

[email protected]:/boot# lsblk -f
NAME   FSTYPE LABEL           UUID                                 MOUNTPOINT
├─sda2 vfat   SYSTEM_DRV      B467-E8A8                            
├─sda4 ntfs   Windows8_OS     8A461C98461C875B                     /media/tao/Windows8_OS
├─sda5 ext4                   e297ae56-7c17-48ea-aac5-f26c1e5cad84 /
├ - sda6 NTFS entertainment 7c387f10387ec8a2 / media / Tao / Entertainment
├ - sda7 NTFS office cc5a23c35a23a8e2 / media / Tao / Office
├ - sda8 NTFS software 4e8cef168ceef6fd / media / Tao / software
└─sda9 ntfs   Lenovo_Recovery CE3C64723C64578B


Recommended Today

Configure Apache to support PHP in the Apache main configuration file httpd.conf Include custom profile in

In Apache’s main configuration file / conf/ http.conf Add at the bottom Include “D:workspace_phpapache-php.conf” The file path can be any In D: workspace_ Create under PHP file apache- php.conf file Its specific content is [html] view plain copy PHP-Module setup LoadFile “D:/xampp/php/php5ts.dll” LoadModule php5_module “D:/xampp/php/php5apache2_2.dll” <FilesMatch “.php$”> SetHandler application/x-httpd-php </FilesMatch> <FilesMatch “.phps$”> SetHandler application/x-httpd-php-source </FilesMatch> […]