ubuntu启动项没有win10启动项 求教

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: ubuntu启动项没有win10启动项 求教

#16

帖子 vickycq » 2015-09-10 8:36

qy117121 写了:话说我的win10也是认出的 windows recovery environment
os-prober 搞错名字是常有的事
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
saszr
帖子: 11
注册时间: 2015-09-09 4:43
系统: ubuntu

Re: ubuntu启动项没有win10启动项 求教

#17

帖子 saszr » 2015-09-10 12:42

poloshiao,

2,saszr@saszr-CP65S:~$ [ -d /sys/firmware/efi ] && echo "Installed in UEFI mode" || echo "Installed in Legacy mode"
Installed in Legacy mode
saszr@saszr-CP65S:~$ sudo cat /etc/fstab
[sudo] password for saszr:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda10 during installation
UUID=1b932baf-770e-4f92-af2c-9b3b6349f44d / ext4 errors=remount-ro 0 1
# swap was on /dev/sda11 during installation
UUID=7936390a-3065-4382-a067-183631f57b71 none swap sw 0 0
saszr@saszr-CP65S:~$ sudo dpkg -l | grep grub
ii grub-common 2.02~beta2-15 amd64 GRand Unified Bootloader (common files)
ii grub-gfxpayload-lists 0.6 amd64 GRUB gfxpayload blacklist
ii grub-pc 2.02~beta2-15 amd64 GRand Unified Bootloader, version 2 (PC/BIOS version)
ii grub-pc-bin 2.02~beta2-15 amd64 GRand Unified Bootloader, version 2 (PC/BIOS binaries)
ii grub2-common 2.02~beta2-15 amd64 GRand Unified Bootloader (common files for version 2)
saszr@saszr-CP65S:~$ sudo efibootmgr -v
sudo:efibootmgr: command not found
saszr@saszr-CP65S:~$


3,开机第一画面是笔记本的牌子logo宣传(就是这里重启按F2可以进入bios),过去了就是启动项的地方了这时候最上面是 GNU Grub 2.02~beta2-15版(这是启动管理器?

4韧体? 就是进入bios ? 左下角是 f2 setup(进入是bios) 右下角 boot options


5我再用u盘启动看看开机界面,,,,额 开机界面和1-1很像 最上面也是 GNU Grub 2.02~beta2-15版
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu启动项没有win10启动项 求教

#18

帖子 poloshiao » 2015-09-10 13:25

为什么我的开机界面是1-1(使用 Ubuntu Live CD/DVD/USB 開機)
1. 所有的 Ubuntu 版本的 ISO 燒錄的 CD/DVD/USB 開機 都會出現 1-1 畫面
2. 只有 Ubuntu Desktop 版本的 ISO 燒錄的 CD/DVD/USB 開機 會額外加載 ubuiquity 套件
2-1. https://wiki.ubuntu.com/Ubiquity
2-2. 載入 ubuiquity 套件後 會出現 1-2 畫面 覆蓋 1-1 畫面
2-3. 因為時間差距很短 一般使用者 無法看出已經顯示過 1-1 畫面 只有看到 1-2 畫面
2-4. ubuiquity 套件目前與 UEFI 還不相容 所以 在 UEFI 開機 還無法載入 ubuiquity 套件 顯示 1-2 所以在 UEFI 只有看到 1-1
2-5. 如果基於某些原因顯示 1-2 失敗 也可能只看到 1-1

3. Ubuntu Desktop 版本的 ISO 燒錄的 CD/DVD/USB 開機 會額外加載 ubuiquity 套件
才會出現 1-2 及 歡迎畫面 及 試用桌面 選項 所以才能稱為 Live CD/DVD/USB
3-1. 例如 Ubuntu Server 版本的 ISO 燒錄的 CD/DVD/USB 因為沒有 載入 ubuiquity 套件 所以沒有試用桌面
因此不稱它為 Live CD/DVD/USB
saszr
帖子: 11
注册时间: 2015-09-09 4:43
系统: ubuntu

Re: ubuntu启动项没有win10启动项 求教

#19

帖子 saszr » 2015-09-10 14:31

poloshiao, 感谢 :em11
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu启动项没有win10启动项 求教

#20

帖子 poloshiao » 2015-09-16 8:25

https://bugs.debian.org/cgi-bin/bugrepo ... =698914#10
because Grub menu
entries produced by `od-prober` were wrong.
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows Recovery Environment (loader) (on /dev/sda2)"
--class windows --class os {
insmod part_gpt
insmod ntfs
set root='(hd0,gpt2)'
search --no-floppy --fs-uuid --set=root F0A837FBA837BF42
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Windows 8 (loader) (on /dev/sda4)" --class windows --class os {
insmod part_gpt
insmod ntfs
set root='(hd0,gpt4)'
search --no-floppy --fs-uuid --set=root 86B23B6FB23B633B
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_os-prober ###

Trying to boot these will fail, as bootloader will complain that it
does not recognize "drivemap" directive.

I tried replacing the entries by :

menuentry "Windows (UEFI)" {
search --set=root --file /EFI/Microsoft/Boot/bootmgfw.efi
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

That helped find `bootmgfw.efi` but went directly into Windows
Recovery blue screen, saying that device is not connected and gving an
error 0xc000000f.

At least this confirms that Windows 8 bootloader was found, but the
way it was executed was wrong.

Finally, I found that solution escribed here worked fine :
http://falstaff.agner.ch/2012/12/18/ubu ... boot-mode/

This script : https://gist.github.com/falstaff84/4330 ... ndows_uefi
seem to be doing a job of broken `os-prober` and creates correct
grub.cfg entry :

### BEGIN /etc/grub.d/25_windows_uefi ###
menuentry "Windows 8 (loader)" {
insmod search_fs_uuid
insmod chain
insmod part_gpt
insmod fat
set root='(hd0,gpt1)'
search --no-floppy --fs-uuid --set=root BA44-790F
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/25_windows_uefi ###
1. 在 上面的 Bug Report 發現 同時存在
Windows Recovery Environment (loader) (on /dev/sda2)
Windows 8 (loader) (on /dev/sda4)
在 grub 2 開機選單
1-1. /etc/grub.d/25_windows_uefi
裡面的內容 解決了這個問題
最後只有
Windows 8 (loader)
在 grub 2 開機選單
https://bugs.debian.org/cgi-bin/bugrepo ... =698914#20
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows Boot Manager (UEFI on /dev/sda1)" --class windows
--class os {
insmod part_gpt
insmod fat
set root='(hd0,gpt1)'
search --no-floppy --fs-uuid --set=root BA44-790F
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/30_os-prober ###
2. 這是 在 debian 的 Bug Report

3. 建議
等 Ubuntu 的 os-prober 套件 發行穩定版本 1.65 以上 再來檢視這個問題
(目前是 1.63 版本)
回复