这两天因为在Linux进行测试,先是搞坏了linux的系统,然后在重装Linux系统后搞坏了引导。在修复引导的过程中,搞坏了本机的Win8系统,再次修复引导与重装Linux后,Linux可以访问了,Windows系统重装后还是不行,引导部分也还是不行。从我的经历可以体现出,使用Linux作为日常系统具有极大的风险,因为他的权限非常高并且某些软件的依赖有可能修改本地界面的依赖库,修改后非常容易使得界面无反应,大家一定谨慎使用。
当我们在装系统的时候,第一件事肯定是要先进入电脑的BIOS设置界面,那么这个BIOS到底是个什么东西呢?
BIOS是Basic Input Output System的缩写,它的意思就是基本的输入输出系统,是介于硬件与操作系统之间的一个系统,本质上是一个软件,被集成在了主板上。英特尔后来又升级了BIOS的规范,BIOS就升级为了UEFI BIOS。新电脑一般使用的为UEFI BIOS,并且可以进行配置选择,选择成传统的BIOS也叫legacy。
当使用UEFI BIOS的时候,UEFI需要去访问EFI分区,寻找操作系统的引导文件。
在安装的时候还有个Secure Boot的选项,这选项本身是为了安全,却被微软演化成了防止更改预装的Windows系统为其他系统的工具,因此这个选项都是建议关闭的。
在我自己可以进入的Linux系统中使用,使用fdisk -l来查看硬盘分区情况:
root@tao-PC:/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
使用parted命令查看现在的分区情况,parted后输入p指令
root@tao-PC:/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

