win10+debian10.2双系统,uefi

最大的社区版本,Ubuntu的发源地
回复
pang15975386
帖子: 193
注册时间: 2011-05-16 18:00

win10+debian10.2双系统,uefi

#1

帖子 pang15975386 » 2020-01-31 11:22

参考资料:
https://blog.csdn.net/lhq_22/article/details/46586115
https://blog.csdn.net/BlueSkyansion/art ... s/52893329 GPT硬盘下使用Debian急救模式修复引导
https://blog.csdn.net/qq_34570910/artic ... s/78205915
https://blog.csdn.net/Fengyueshengqi/ar ... s/79474892 UEFI+GPT分区win10与Ubuntu17.10双系统(双硬盘)安装

ISO版本:debian-10.2.0-amd64-DVD-1.iso
rufus-3.5,最小化安装,安装过程中不选择gnome等桌面
win10+debian10.2双系统
笔记本:神州z7m-kp7gc

0、磁盘分区
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 16M 0 part
├─sda2 8:2 0 200G 0 part /mnt/e
├─sda3 8:3 0 300G 0 part /mnt/f
├─sda4 8:4 0 31.5G 0 part /mnt/g
├─sda5 8:5 0 488M 0 part /boot/efi
├─sda6 8:6 0 7.5G 0 part [SWAP]
├─sda7 8:7 0 93.1G 0 part /
└─sda8 8:8 0 299G 0 part /home
sdb 8:16 0 119.2G 0 disk
├─sdb1 8:17 0 64M 0 part
├─sdb2 8:18 0 128M 0 part
├─sdb3 8:19 0 70G 0 part /mnt/c
└─sdb4 8:20 0 49.1G 0 part /mnt/d


1. win10中,win+R 启动msinfo32 查看BIOS模式,确认win10系统是否为EUFI启动,分区是否为GPT模式,电池计划里“关闭快速启动”

2、bios中设置,F2进入
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Advanced
--> OS Support [UEFI OS]
--> SATA Mode Selection [AHCI]
Security
--> Secure Boot [Disable]
Boot
--> Boot Option #1 USB UEFI
--> UEFI Hard Disk Driver BBS Priorties
--> Boot Option #1 debian
--> Boot Option #2 Windows Boot Manager
--> Boot Option #3 disable
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
F4保存后重启,F12进入启动盘安装

# 如果出现下面错误,尝试一下
3、安装过程中打开另外一个终端Alt+F2(安装终端是Alt+F5),进入目录/sys/firmware/efi/efivars,查看是否有dump-*文件,如果有则删除,否则会产生“grub-install dummy 错误”
grub-install出现问题:(ubuntu18.04也同理)
root@debian:~# grub-install /dev/sda5
Installing for x86_64-efi platform.
grub-install: warning: Cannot set EFI variable Boot0001.
grub-install: warning: efivarfs_set_variable: writing to fd 7 failed: 设备上没有空间.
grub-install: warning: _efi_set_variable_mode: ops->set_variable() failed: 设备上没有空间.
grub-install:错误: failed to register the EFI boot entry: 设备上没有空间.

cd /sys/firmware/efi/efivars
rm -rf /sys/firmware/efi/efivars/dump-*

4、安装好后重启进入debian,在N卡中会无法reboot,也可能是黑屏,需要禁止nouveau,然后安装grub及更新,如果正常则不需安装grub
nano /etc/modprobe.d/blacklist-nouveau.conf
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blacklist nouveau
options nouveau modeset=0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


5、修复grub(如果需要)
用debain启动盘进入“rescue mode”急救模式, /分区:/dev/sda7 efi分区:/dev/sda5
# mount /dev/sda7 /mnt
# mount /dev/sda5 /mnt/boot/efi
# mount -t proc proc /mnt/proc
# mount -o bind /sys /mnt/sys
# mount -o bind /dev /mnt/dev
# chroot /mnt /bin/bash
# grub-install /dev/sda5
# update-grub2


6、UEFI中debian10添加win10启动项(没有win10启动项时)
在/etc/grub.d/04_custom中添加
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
menuentry "win10" {
insmod part_gpt
insmod fat
# windows EFI位置
set root='hd1,gpt1'
chainloader /EFI/Microsoft/boot/bootmgfw.efi
}
上次由 pang15975386 在 2020-01-31 16:41,总共编辑 3 次。
pang15975386
帖子: 193
注册时间: 2011-05-16 18:00

Re: win10+debian10.2双系统,uefi

#2

帖子 pang15975386 » 2020-01-31 12:24

桌面环境:lxde+xfce4
上次由 pang15975386 在 2020-11-15 18:13,总共编辑 3 次。
pang15975386
帖子: 193
注册时间: 2011-05-16 18:00

Re: win10+debian10.2双系统,uefi

#3

帖子 pang15975386 » 2020-02-02 11:32

# 另外需要禁用自带的 nouveau nvidia驱动 ,防止开机出现黑屏,先在grub引导菜单中添加nomodeset(调用集显)
cat << EOF > /etc/modprobe.d/blacklist-nouveau.conf
blacklist nouveau
options nouveau modeset=0
EOF
# 显卡相关
sed 's/GRUB_CMDLINE_LINUX_DEFAULT/#GRUB_CMDLINE_LINUX_DEFAULT/g' -i /etc/default/grub
echo 'GRUB_CMDLINE_LINUX_DEFAULT="panic=5 quiet acpi_osi=linux"' >> /etc/default/grub

update-grub
update-initramfs -u
pang15975386
帖子: 193
注册时间: 2011-05-16 18:00

Re: win10+debian10.2双系统,uefi

#4

帖子 pang15975386 » 2020-05-09 9:21

注:最好选择高级安装,防止安装过程中要下载文件,很费时间
Advanced options--> Graphical expert install (十几分钟就安装好,内核选择linux-image-amd64,不下载更新)
pang15975386
帖子: 193
注册时间: 2011-05-16 18:00

Re: win10+debian10.2双系统,uefi

#5

帖子 pang15975386 » 2020-06-27 8:53

不要用Ventoy制作启动盘工具(1.055版本之前),否则安装过程有问题,测试4-5次均是如此,用win下的rufus则没有问题
Ventoy 1.088版本后,可以正常安装debian
回复