Ubuntu && windows dual system installation

Ubuntu && windows dual system installation

Article Directory

最近一直在做基于linux服务器的项目,慢慢的对Linux系统熟悉。对于Windows系统,我是欣然接受的,而且感觉好用。但是2个月的服务器操作让我对Linux系统青睐有加,命令行似乎有一种魔幻的吸引力,除此之外这对我以后的工作可能有所帮助,也受到前辈门的感染想要探索Linux到底有什么魅力? 我下了很大的决心,筹备系统迁移。

我已经有了一台surfaceGo,满足一些基本的办公需求,Adobe系列的软件我不能丢,所以我决定安装双系统,Ubuntu作为主力机,windows作为辅助,必要时用来视频剪辑和应对课程中指定的exe。当然我从不打无准备的仗,在此之前必须对两个系统的磁盘,分区,格式,做足够的了解。并且做好数据,账号的备份。祝好运~
                                                                                                                	2020/9/27

Installation process

I use Ubuntu as the main system and windows as the auxiliary system, but I want to install them on a 128G system disk. There are these tasks to do:

  • The first is the data backup of the windows system, which will be imported into the Ubuntu system in the future.
  • Second, download Ubuntu 20.04.1 LTS and make a burn file.
  • Third, make a good disk partition plan and compress the volume.
  • Fourth, start reinstalling according to the plan.

Problems encountered

1. Backup data

  • Physical data backup : Needless to say, data backup, because I want to import the data in Windows into Ubuntu, I use the simplest method to copy some necessary files directly to the U disk, just 18G data

  • Account data : This is more important. Many software synchronize user data to the cloud. As long as you remember the account and password, you can easily back up the data. Here I mainly have two accounts. The first is a Google account. , Used to synchronize Chrome shortcuts, plug-ins, etc.; the other is Nut Cloud, used to synchronize some of my own files that have been transferred to the cloud (I usually use surfaceGo to view documents in the classroom to connect with the big computer through Nut Cloud)

  • Software backup : This is all you need to remember the software name, and then download again (the development environment configuration under windows is really a headache, switching to linxu only found that the development environment configuration is so simple ~ dry):

Insert picture description here

dock栏是我平时用的最多的:
Typora,Chrome,IDEA,Pycharm,VsCode,PostMan,Navicat,坚果云,Xshell,Vnc,WeChat,Pr,PS,Keil,QQ音乐,Eclipse,CodeBlocks,Git,火绒,VMware,我们学校的VPN,有道词典....(Adobe家的在linux系统下无法安装,我用windows作辅助)

2. Download the iso file of the operating system to make a burn file

In fact, I was worried at first that the 20.04 version was too high. If I encountered a problem, there was nowhere to ask for help (in fact, I was too worried). I brushed the 18.04 version of Ubuntu, but after two days I felt that the experience was not very good. I heard that the 20.04 interface is more beautiful , So it changed to 20.04, and then I was surprised!

  • Ubuntu 20.04.1 LTS download address https://ubuntu.com/download/desktop , the official website download is as fast!

  • Making a burned file: I followed the online tutorial and installed it with a U disk. First burn the downloaded iso file to a U disk, and then use the U disk to reinstall the system. A communication software UltraISO is used: http://cn.ultraiso.net/xiazai.html. Then follow the steps:

    1. Insert the U disk

    2. File/Open the downloaded iso file

    3. Start/write hard disk image/check burn verification/write (note that the U disk will be formatted here, so do not install important files on the U disk)

Insert picture description here
Insert picture description here

The first picture above was found elsewhere, and it was not photographed at the time. The steps are no problem.

3. Do a good job of disk partition planning

Opening is the most troublesome problem for me is the concept of disk partitioning and mounting balabala. I was careful not to make mistakes. I found a lot of information to supplement this knowledge. You can take a look. It should be helpful (I have already noted the author) , If you offend please contact me to delete):

(1) What do the names of hard disk primary partition, extended partition, logical partition, and dynamic partition mean?

作者:Frost
链接:https://www.zhihu.com/question/294460786/answer/490756226
	
	这玩意跟Linux没啥关系,MBR分区表设计时用来存放分区信息的磁盘空间只够记录4个分区的信息,所以最多4个主分区,不过总有人有超过4个的需求比如要装一大堆Linux发行版,于是搞了一个扩展分区的概念,把原来的主分区里面再按照类似的套路分成4个区域,取名为逻辑分区,这个分成4个逻辑分区的分区就叫扩展分区。这样就从4个主分区变成了3个主分区+1个扩展分区(包含4个逻辑分区)。要是还不够呢就在逻辑分区里面继续套逻辑分区(3+13+13+1)))


作者:杜旻晖
链接:https://www.zhihu.com/question/20281689/answer/14607229
	
	为了使得系统和其它硬件支持硬盘内容的读写,整个硬盘的某些区域,被认为地规定了一些特殊的格式。比如整个硬盘的首扇区(第一个512kb的区域),其中除了一些启动操作系统前的初始化代码mbr外,还包括了一个分区表项。这个分区表项的作用是标识了一些分区的基本信息,比如所在的位置、分区格式、大小等,以方便boot loader(所谓的初始化代码)将控制权转交给这些分区(比如装在C盘的win7操作系统),并继续启动系统。可是由于分区表项的大小限制(只能占用首扇区的64kb),它最多只能拥有4条分区记录,而被分区表项记录的那些分区,则称为主分区,他们特点之一是可以用来安装和启动操作系统(linux的grub原理有些不同,这句话对linux不适用)。这是你也许会问,那我的分区有c、d、e、f、g、h……已经超过了4个,这又是怎么回事?是这个样子,我们可以在分区表项中拿出一项来,把这一项作为扩展分区。与主分区的mbr引导记录不同的是,扩展分区所指向的位置不再是一个分区,而是多个分区(即所谓的逻辑分区)的集合,而这些分区,会通过指针(下一跳的位置)的方式串联起来(实际上扩展分区项所指向的是第一个逻辑分区的首扇区,而在第一个逻辑分区的首扇区中,会记录下一个逻辑分区首扇区的地址)。这时你会发现逻辑分区与主分区的不同之处是,要想访问到逻辑分区中的内容,需要进行多次的跳转。而要实现这一点,在启动操作系统以前是难以完成的,这也就是为什么,操作系统不能安装在逻辑分区的原因了。而动态分区,会打破这种固定分区的记录模式。操作系统会帮你接管整个磁盘,以它自己的方式规定、调整磁盘,这时的分区概念已经是逻辑上的,而不再是物理上的概念了。也就是为什么ubuntu读不了win7所规定的分区了。动态分区操作是不可逆的,也就是说,如果你现在想要安装ubuntu并且wubi方式不可以的话,也就意味着你必须备份好资料,重新进行分区和格式化才行。linux下也有动态分区的技术,叫lvm。

(2) The tree file structure of the Linux system?

作者:czpcalm
链接:https://zhuanlan.zhihu.com/p/101307629
来源:知乎
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

分区设置是这里最重要也最容易疑惑的点了,不好的分区会导致文件管理不易,磁盘空间浪费等问题,或者面不得不重装系统解决问题。关于磁盘分区,网上各种教程说法不一。我通过查找之后,得出如下分区指导(有误请指正)

对Linux文件系统的一点了解可能会对你的分区大有帮助。与Windows不同,Linux有一个默认的不可变的由目录组成的树形文件系统,最顶层为`root`(`/`),下面有`boot`,`home`, `usr`等。

img

Windows支持在安装后对磁盘进行分区设置D盘、E盘等,而Linux则是你在安装的时候可以把某些重要文件夹(称为**挂载点**)分配到不同的磁盘分区。一般情况下,只有`root`是必须要设置的,其它的默认挂载到root分区下。但是,为了方便管理,很多人会独立设置`boot`,`home`, `usr`, `swap`,下面分别说明这几个分区的作用
Partition type Introduction Remarks
/boot Boot partition Store the files needed for system startup. It is not recommended to divide the /boot partition.
/ Root partition All directories that do not specify a mount point will be placed under this mount point.
/home User directory User directory. Each user will generate a folder to store user files (Windows also has similar). It is recommended to set up a separate partition, the size of the partition depends on the remaining space.
/tmp Temporary Files It is convenient to load ISO image files, and it is necessary to mount them independently for multi-user systems or network servers. The temporary file directory is also one of the most frequently problematic directories.
/usr File system Most of the software programs installed by users are here. Just like the Windows directory and the Program Files directory. Many Linux family systems sometimes use /usr/local as a separate mount point.
/where Variable data directory Contains data to be changed while the system is running. Usually, the size of the directory where the data is located often changes, and the system log records are also under /var/log. Generally, multi-user systems or network servers need to create this partition. Setting up this partition is very helpful for the maintenance of system logs. Generally set the size of 2-3G, you can also divide all the remaining space of the hard disk into var.
/srv System Service Directory The directory used to store the files and data required for service startup, which is not often changed.
/opt Additional application Store optional installation files. I usually install large software under this, such as IDEA
swap Swap partition Swap space. The role is similar to virtual memory. It is recommended to set up an independent partition, the size is the same as the system memory, and the memory above 16G can be considered not.
/bin Binary executable directory Store the binary executable program, the program inside can be called directly through the command line without entering the folder where the program is located.
/sbin System administrator command storage directory Store standard system administrator files
/dev Store equipment files Driver files etc.

It /is only necessary to partition. If it is not necessary, it is not recommended to partition independently, just hang it under root by default. If necessary, you can refer to the following table for allocation:

img

(3) After reading the analysis of the boss, I decided to partition my system disk (C) and the 1T mechanical hard disk as follows:

系统盘(c盘):
	压缩出64G的空闲区用来装Ubuntu操作系统,挂载根目录\,剩下的64G(实际上只有54多G给windows)
1T的硬盘:
	压缩出521G的空间挂载 /home,作为用户目录(我可能有多个用户要创建),存放我的文档,PPT,视频,图片等等。
	压缩出128G的空间挂载 /usr, 作为系统绝大部分软件安装目录。
	压缩出128G的空间挂载 /opt, 作为一些大型软件安装目录。

(4) Attention! Compressed volume

Because the C drive is occupied by windows, if you want to install another Ubuntu system here, you must compress the volume instead of simply creating a new partition (it is black after compression, showing free). Compress 64G of space from the windows system disk to Ubuntu. Compressing directly in the disk management is not allowed by windows. You need to use third-party tools! (No side effects) Aomei Partition Assistant

At the beginning I wanted to allocate 70G of memory to Ubuntu, but it would fail no matter how much it was compressed. Later, I reduced it bit by bit. It was determined that around 64G could just compress a free partition. Like this (without taking the final size, I took a picture of when adjusting the partition):

Insert picture description here

  • After compressing it, open it under windows: This computer/Management/Disk Management/ looks like this (the free area is black and unallocated instead of partition):
    Insert picture description here

4. Reinstall according to the plan

As long as the previous disk partitioning strategy is set, the subsequent reinstallation is very simple:

The first step is to press the F2 key repeatedly to enter this interface.

Insert picture description here

The second step is to press F8 according to the prompts to enter BootMenu. (Steps 1 and 2 may be related to different computers. Mine is ASUS Crash Fortress. It is recommended that you only need to enter the Ubuntu installation interface to check online)

The third step is to let you choose the USB flash drive (note the name of your USB flash drive), which is the source of your operating system installation

Insert picture description here

The fourth step, a selection interface pops up, select the default ubuntu, and then the system will do some checks on the file

Insert picture description here

The fifth step is to enter the visual installation interface, select the language/and choose to install Ubuntu

Insert picture description here

The sixth step, choose normal installation (don’t choose to install third-party software for graphics or wireless hardware and other media formats for now)

Insert picture description here

The seventh step is to select the installation type. Since we are a dual system here, we have to customize the installation! , Choose another option

Insert picture description here

The eighth step, this is the most important step, you need to customize the disk mounting, and select the disk mounting according to the plan I made before:

Insert picture description here

We need to mount 4 locations, /root directory, /home, /usr, /opt, you can see that there are currently two disks, namely: /dev/nvme0n1 , which means my system disk (solid state), idle 688851MB is the free area allocated by my compressed volume before; /dev/sda represents my mechanical hard disk, with 824636MB of free area.

1. Put the /root directory 64G to the SSD /dev/nvme0n1

Insert picture description here

2. Hang 521G from /home directory to mechanical hard disk /dev/sda
Insert picture description here

3. Mount 128G in the /usr directory to the mechanical hard disk /dev/sda && 4. Mount 128G in the /opt directory to the mechanical hard disk /dev/sda

Their settings are similar to /home, the setting size is 128G, which is used for Ext4 file system, format this partition, and the mount points are /usr and /opt respectively, as shown below:

Insert picture description here

The above picture is the disk diagram I mounted according to the disk allocation plan. Click Install Now to install successfully.

Five. Encountered two problems

Generally, there are two problems. One is that it may be stuck after logging in and cannot log in to the desktop environment. The other is that it cannot connect to Wifi. This is all caused by the driver. The former is the driver mismatch between the Invida N card and the graphics card. The latter is missing the WIFI driver. The solution is to replace the driver. However, because the driver download search depends on the network, but you cannot connect to the WIFI, you must prepare a network cable or use a mobile phone to share the network to the computer via USB, and then perform the following operations:

Replace NVIDIA driver && WIFI driver

  • If you can't log in for the first time after installation, then choose the safe Graph option to install when reinstalling (I haven't tried it, I found this answer on the Internet, you can try it)
  • If you can successfully log in to the system desktop, it does not mean that your driver is okay (there was no problem when I installed it for the first time, but the login stuck suddenly after a long time), you still need to replace the driver:

Enter: "Software and Update"/ubuntu software/Select Alibaba source, close "Software and Update" will update the software download driver. After the update is complete, enter "Software and Updates"/Additional Drivers again

There will be a missing driver, choose the Invida driver (I choose the latest 450), and choose the WIFI driver. Then apply the changes. After the changes are completed, close the "Software and Updates" and restart the software to solve the problem of WIFI and login stuck.

Insert picture description here

6. Installation is complete

Enjoy it

Insert picture description here

Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here

Some feelings of Ubuntu installation

It took me 4 days from the installation of the Ubuntu system to the deployment of the environment. At the beginning, because the course needs to install a virtual machine, I also have a project with a cloud server, so I am familiar with the terminal. I was born with the idea of ​​installing Ubuntu and using it as the main system. I spent the afternoon collecting system installation and disk mounting information, and reinstalled the system immediately in the evening. At the beginning I installed Ubuntu 18.04. Because the iso file was damaged, I worked hard until 2:00 pm to find out that my file was damaged. Then I went to the official website to download the new file. I stayed up to 4.00 at night and slept for more than two hours. Get up at 6 am excited to set up the system. It took another day to beautify (the following is a screenshot of my beautifying Ubuntu 18.04), and I feel that Ubuntu 18.04 is not as smooth as Windows 10, and there are often lags. Why not install a new system?

Insert picture description here
The beautiful and slightly lagging Ubuntu 18.04... I started to install Ubuntu 20.04 in the afternoon of the third day, and the restored files and environment have to be cleared again, so I started again, staying up until 1 o’clock, but it’s been Encountered the login stuck phenomenon, I have installed it 6-7 times or there is this login stuck phenomenon, so give up today? I went to bed at 1 o'clock. I only found out that it was the N card problem after swiping Zhihu. So I changed the driver early on the fourth day. As expected, it lived... and left tears of excitement, just do it! Today is the fourth day at 23:58. I like this leopard head.
Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_44307065/article/details/108898521