Detailed tutorial on installing Ubuntu system

I. Introduction

        This article explains in detail how to install the Ubuntu system. The author stepped on many pitfalls during the installation process and reinstalled it many times. Now the problems encountered during the installation process are also listed for your reference.

2. Preparation

        This link is very important. If a worker wants to do a good job, he must first sharpen his tools.

2.1 SSD

        If you are doing system source code development, buy an SSD with a memory larger than 512G. If the economic conditions are good, the larger the capacity, the better. You must buy it from the official official website. Failure to comply will cause you to encounter many problems in the process of using it, and it will make you doubt your life.

2.2 UEFI + GPT installation

        Before installation, check the type of BIOS system of your computer, use the shortcut key win + R to enter msinfo32

 As shown in the picture:

As shown in the figure above, find "BIOS Mode" on the right to see if it is "UEFI".

        Generally, for computers after 2012, the mainstream mode of BIOS is UEFI mode.

        To boot from a hard disk partitioned by GPT, the motherboard uses UEFI, the hard disk uses GPT partition, and the operating system supports GPT and UEFI. These three conditions are indispensable. At present, the relatively new 64-bit Linux system and Win8 system both support UEFI, so they all need to be booted from the hard disk partitioned by GPT.

        If it is UEFI+GPT partition table mode, then you don’t need to set /boot partition when partitioning ubuntu, but set efi system partition;

        If it is a legacy+MBR partition table, then the /boot partition must be set (both in 2023, this installation method will be eliminated)

2.3 Make a boot disk

        1. Use the rufus tool to make a boot disk, download address: Rufus

        2. Download the Ubuntu iso image Download address:  ubuntu-releases

        3. Prepare a U disk of at least 8G to make a boot disk.

2.4 Computer settings

        Take the author's computer as an example, model : Lenovo E430c, the following settings are slightly different in other models of computers, please refer to the relevant information.

        Generally, notebooks have a built-in mechanical hard disk by default, and an interface (SATA format or mSATA format) that can expand the solid state disk. It is strongly recommended to install the two systems separately so that they will not affect each other. Avoid many inexplicable problems during use.

        I installed the Ubuntu system that I often use on a 1T solid-state hard drive. The previous Windows system was installed on the mechanical hard drive that comes with the computer by default. The computer sets the boot sequence priority in the BIOS. By default, the Ubuntu system is installed first. If you want to enter the window system, you can start the hard disk with the window system through the F12 option after booting.

      Tips: When installing the Ubuntu system on the solid-state hard disk, it is best to remove the mechanical hard disk, so that after the installation is complete, the two systems do not overlap and will not affect each other.

important! important! important!   Be sure to set up before installation:

Lenovo notebook is to enter the BIOS mode by pressing F1 after booting

1. Set the UEFI/Legacy Boot option to UEFI, as shown in the figure:

2. Turn off secure boot and set it to disable (very important, if not set, it may lead to infinite restart after installing the nvidia graphics card driver, some computers do not have it, you can skip this setting option)

3. The purpose of USB boot is enable    : The system can be booted from the USB disk, as shown in the figure below:

Go to StartUp -> Boot:

 Move the cursor to the USB option, then press the "+" sign to move the USB to the first line, and start the system from the USB

3. Normal installation

3.1 Solve the problem of being stuck on the logo interface

After booting through the USB system disk, enter the following interface

There will be a pit here. When Ubuntu starts, it is stuck on the logo page and cannot continue the installation steps. The reason for the problem is that the graphics card driver is not compatible with the Ubuntu system. The solution:

 Move to the Install Ubuntu item, and then enter e (edit mode) to enter the edit mode interface

turn up

quiet splash ---

Remove the following --- after the splash and modify it as follows

quiet splash new.modeset=0

The author's computer modification is as shown in the figure:

Other models of computers can be modified to: quiet splash nomodeset   

Try to modify according to the specific situation:   Fixing Ubuntu Freezing at Boot Time

Then F10 restart, reinstall

3.2 Complete the installation

For development purposes , it is recommended to choose English installation

 click continue

The installation process is relatively simple. In the following steps, it is recommended to choose normal installation instead of minimal installation. For normal installation, install the lib library files necessary for the system, so that you will not be too troublesome to install it yourself.

Select the first item "Normal installation (including web browsers, tools, office software, games and media players)

 last step:

 Wait for about 10 minutes, the system will automatically complete the installation and prompt to restart (unplug the U disk, so as not to start the system through the U disk)

 Well, the installation is complete here.

If your Ubuntu system is used for development, try to install as little entertainment, audio-visual, video, communication and other software as possible, and try to use the Ubuntu system’s own software. The more Chinese software you install, the greater the possibility of the system crashing. Installed on the entire disk, if the system crashes, you have to reinstall and all your data will be cleared, and the loss will be great.

Four. Partition installation

       The difference with the normal installation is that it sets CD E F disk like the window system. Of course, the Linux system is also similar. The advantage of this is that when the Ubunut system crashes and the system needs to be reinstalled, we can also keep the Home user data area to avoid users Data (code and documentation) is lost.

        When the partition is installed at this step, select "Other Installation"

"Setting order" problem of EFI  , /swap, /, /home subpartitions

However, the author believes that there is some necessity to discuss this issue to a certain extent:

(i) The /boot partition (that is, the EFI System Partition) is the loading location of the boot loader, and should be the first to bear the brunt; (ii) The size of the /home partition is often related to the user's own needs for program codes, data, etc. That is, what related resources the user needs to release in this partition, the default download address of many applications is /home/Username/programming_name, etc.

Simply after allocating the three necessary basic partitions of EFI System Partition, /swap, and /, leave the remaining space for /home, which is the main reason for dividing the /home partition at the end.

To sum up, here is a further summary of the detailed information of the four basic partitions of EFI , /swap, /, and /home:

mount point size new partition type The location of the new partition File system Setup order Remark
EFI 2G logical partition Spatial start position No need to choose when installing 1 boot loader partition
/swap 8G logical partition Spatial start position No need to choose when installing 2 Swap partition, its settings are related to the actual memory of the PC (the current PC memory is 16G)
/ 80G primary partition Spatial start position Ext4 journaling file system 3 /root
/home 900G logical partition Spatial start position Ext4 journaling file system 4 User partitions, whose settings are related to the user's own needs for program codes, data, etc.

For an example of EFI partition setting, the picture is as follows:

After the 4 partitions are set, the partitions are as follows:

Next, is the normal installation steps.

5. Dual system switching

At this point, after the Ubuntu system is installed, the next step is to set up the dual system (window and Ubuntu) switching

F1 to enter BIOS settings, set UEFI/Legacy Boot mode to Both

 

Every time after restarting, press F12 and use the up and down keys to select the system you want to enter.

 

Guess you like

Origin blog.csdn.net/u012514113/article/details/131269056