1,给U盘分区做启动盘
先下载ubuntu20.04.4-desktop-amd64.iso的镜像,双击打开UltraISO工具,然后点打开

点击写入,选择是

等待制作镜像写入U盘完成

系统镜像做完后,把需要给ubuntu安装的软件也一起拷贝到U盘里面
2,现将电脑的硬盘分出一个区,比如这里我压缩卷留出了527.34G用来安装双系统的ubuntu

对电脑进行加密操作,防止装不上

3,关机,按F2,然后选择第三条enter step进入

4,将boot priority中的UEIF:USB DISK用鼠标拖动到最上面第一个

拖动前后对比如图,将UEIF拖到第一个的位置后,按F7退出去设置启动模式
5,设置下图的界面

(1)security secure boot按回车改为disable(修改之前是enable)

(2) boot中的fast boot改为disable(修改前是enable)。boot option #1和#2不要动。

6,按F10,然后按回车,相当于保存退出了

重启后选择第一个ubuntu。虽然第二个也可以选,但是这里选第一个。

这时候开始准备安装,慢慢等待

7,这里不要选择Chinese,不断往下面拉,选择汉字版本的中文简体和安装ubuntu

选择两个Chinese,下面的检测键盘布局不要乱按,然后点继续

8,选择不要联网安装
如果是下面这种情况,已经联网了,那就从右上角断开联网然后退出一步再到这一步

按照下面这种不联网的安装

安装类型选择最底下的:其他选项,宁可以自己创建,调整分区或者位ubuntu选择多个分区

8,设置分区
分区下拉,找最大空闲的那个,也就是空闲566232M的那个,因为我压缩分区也是这个大小

(1)双击566232,大小输入:64000,用于:交换空间

(2) 双击566232,挂载点选择/,其余默认
(3)引导设备选择512G,也就是在windows下分区删除的大小那个盘

(4)然后点现在安装

点继续
安装完成后,打开teamviewer的话,双击能打开app

从windows看,59.6G+467.74G就是安装的ubuntu,分别是交换空间和逻辑分区。C盘名字变成OS字母,尽量不要换C盘的名字。

安装好了,开机选择系统,开机第一个是ubuntu系统,第三个win系统
sudo update-grub
sudo gedit /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nouveau.modeset=0"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"