Win10 + centos8 dual system construction stepping pit

Time:2021-7-30

Xiaomi Pro notebook, the original win10 system, comes with a 255gb SSD and is equipped with Samsung’s 860evo (500g). It plans to take out 250g to install Linux. But because Xiaomi has its own boot, it encountered some strange pits. Record it.

Production and installation of startup disk

  1. Download Image: there’s nothing to say about this. You can download it on the official website. There will be many image sources
  2. Boot disk production: I have read many tutorials and learned some concepts. What mainly affects the dual system installation is UEFI boot mode and traditional legacy boot mode. The differences between the two are summarized in a separate section below.

    • Xiaomi supports UEFI and legacy boot. Because UEFI boot mode starts quickly, the first idea must be to use UEFI
    • An online tutorial mentioned that you can directly decompress the ISO image to the USB flash disk without burning in UEFI mode, but this method seems to be limited to the USB flash disk supporting FAT32 (without verification, the effectiveness is not negotiable). In short, I failed after trying (Xiaomi’s boot seems unable to recognize the USB flash disk)
  3. Using startup disk making tool

    • Rufus: an extremely lightweight tool, only about 3MB, one click operation, the speed is OK, depending on your USB flash disk reading speed. However, although the startup disk made with this tool can be installed, it will prompt “error in setting the basic software warehouse”. According to the reaction of others on the Internet, it seems that this problem often occurs with rufus. The reason is unknown
    • Win32diskmanager: This tool is a little larger, but it is also very lightweight. The operation is very simple. The process of making the startup disk is very smooth. There are no problems
  4. Installation: fool operation. CentOS installation is very friendly. Just follow the instructions

USB flash disk repair

Although it can be successfully installed with win32diskmanager, the disadvantage is that the capacity of the USB flash disk will become very small after the installation, and my USB flash disk will disappear directly in my computer interface. However, there are also corresponding methods to repair. The repair process is carried out in CMD.

#Open Diskpart
diskpart

#Show all disks
DiskPart> list disk

#Select a disk
DiskPart> select disk xxx

#Clear disk data
DiskPart> clean

#Create partition & & activate
create partition primary

#Quick formatting; Depending on the format of the USB flash disk, it may be FAT32 or NTFS or exFAT
format fs=exFat quick

Difference between UEFI and legacy startup

legacy+MBR

Legacy adopts BIOS standard (basic input output system); Basic input and output system), which has been adopted since the birth of PC. MBR partition came into being with BIOS.

  1. MBR partition: it supports 2TB hard disk at most and 4 main partitions at most. It theoretically supports the installation of all versions of windows.
  2. Startup process: startup — > exception detection — > hardware initialization — > system update detection — > start the operating system
  3. advantage

    • Good compatibility: since the BIOS standard is the first generation standard, later operating systems will generally be compatible with this standard, so they theoretically support all windows standards
    • You can install 32-bit or 64 bit systems

UEFI+GPT

UEFI is a new standard negotiated by several manufacturers to replace the old BIOS and GPT partition to replace MBR partition.

  1. GPT partition: each disk is allowed to have up to 128 primary partitions. It supports more than 2TB disks. Theoretically, it only supports operating systems above win8.
  2. Startup process: boot — > preload environment — > drive execution environment — > start the operating system
  3. advantage

    • The supported hard disk is basically equivalent to infinity
    • Fast startup speed (win10’s startup speed is really fast)
    • Provide advanced graphical interface: you can use the mouse
    • It provides a modular interface independent of CPU architecture, and also provides a modular interface for applications and devices based on EFI driver (called ebc-efi bytecode)

Terminator installation

At the beginning of a project, due to the characteristics of the project, several terminals need to be opened for development. At first, I just wanted to use Linux’s own Gnome terminal, thinking about the big deal and switching more. However, the shortcut keys of the built-in terminal can’t be used, so I searched and found that the terminator is highly praised. It can open multiple terminals in the same window, and the default shortcut keys are set reasonably, which is very in line with my expectations. So, he began a new round of pit stepping journey.

Installation method 1: compressed package installation

This is done according to the tutorial:

#Download package
wget -c http://li.nux.ro/download/nux/dextop/el7/x86_64//terminator-0.97-6.el7.nux.noarch.rpm

#Installation
yum install terminator-0.97-6.el7.nux.noarch.rpm --skip-broken

#Installation成功后启动
terminator

An error occurs when executing: no module named psutil, so install the psutil module

wget http://dl.fedoraproject.org/pub/epel/7/x86_64/p/python2-psutil-5.6.7-1.el7.x86_64.rpm

#RPM installation
rpm -ivh python2-psutil-5.6.7-1.el7.x86_64.rpm

The first error is reported: package XXX doesn’t digest
I can’t find the cause of the error on the Internet. I guess it’s because of the version problem, because I installed CentOS 8, and this installation package is for CentOS 7 (just guess). So I went to this website directly, and then I downloaded the el8 version of the installation package.

wget http://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/Packages/p/python2-psutil-5.6.3-6.el8.x86_64.rpm

#RPM installation
rpm -ivh python2-psutil-5.6.3-6.el8.x86_64.rpm
#Installation succeeded

#Attempt to start Terminator
terminator

I thought it was done, but another error was reported: you need to install Python bindings for gobject, GTK, XXX to run terminator
I thought Python was not installed, so I took a lot of trouble to install Python 3 again… However… When I started again, I still reported this error… I couldn’t find a solution online… So the first solution failed

The second installation scheme: Yum direct installation

In fact, most of the posts on the Internet are based on this scheme, but when I first used it, I couldn’t find the package terminator. But after trying the first method, the direct installation method actually succeeded… The reason is not clear. Maybe it is because the package of terminator has been downloaded or installed?

yum install terminaotr
#Here we will directly put the required packaging, including psutil

#After the installation is successful, start the terminator
#If & is not added here, some errors will be reported, such as unsuccessful session
terminator &

Terminator common shortcut keys

CTRL + Shift + O: open a new window up and down
CTRL + Shift + e: open new window vertically
CTRL + Shift + right: zoom in to the right
CTRL + Shift + left: enlarges the window to the left
CTRL + Shift + up: zooms up the window
CTRL + Shift + down: enlarge the window to the left
CTRL + Shift + s: hide / show scroll bar
CTRL + Shift + F: search in the terminal
CTRL + Shift + n or Ctrl + Tab: switch to the next tab in the unified window
CTRL + Shift + P or Ctrl + Shift + Tab: switch to the previous tab in the unified window
Alt + up: switch to the upper window
Alt + down: switch to the following window
Alt + left: switch to the left window
Alt + right: switch to the zip code window
CTRL + Shift + C: copy
CTRL + Shift + V: paste
CTRL + Shift + W: close the current terminal
CTRL + Shift + Q: exit
CTRL + Shift + X: maximize the current window
CTRL + Shift + Z: display all terminals / display only the current terminal
CTRL + Shift + T: open new terminal
Ctrl+Shift+Alt+T:Open new tab at root level, if using extreme_tabs.
CTRL + pagedown: move to the next tab
CTRL + pageup: move to previous tab
CTRL + Shift + pagedown: swap this tab with the next tab
CTRL + Shift + pageup: swap this tab with the previous tab
CTRL + (Shift +) plus (+): expand the window
CTRL + minus (-): reduce the window
CTRL + zero (0): Restore window size