ubuntu16.04重装以后进不去win10

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
ximeng0209
帖子: 3
注册时间: 2018-05-28 13:51
系统: linux
送出感谢: 0
接收感谢: 0

ubuntu16.04重装以后进不去win10

#1

帖子 ximeng0209 » 2018-05-28 14:02

原来是win10+ubuntu16.04双系统,重装了一下ubuntu16.04,好像是分区的时候删掉了在grub分区前的一个500M的ext4类型的分区,然后就失去了引导界面,也进不去win10了。

sudo update-grub 也没用

Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.10.0-28-generic
Found initrd image: /boot/initrd.img-4.10.0-28-generic
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
done

求助求助!有人可以帮忙解决吗?
ximeng0209
帖子: 3
注册时间: 2018-05-28 13:51
系统: linux
送出感谢: 0
接收感谢: 0

Re: ubuntu16.04重装以后进不去win10

#2

帖子 ximeng0209 » 2018-05-28 15:06

改了引导方式现在好像两个系统都能进入了,但是在uefi引导方式下只能进入Windows不能进入Linux,而在legacy下只能进入Linux,这是怎么回事呢?
poloshiao
论坛版主
帖子: 18182
注册时间: 2009-08-04 16:33
送出感谢: 21 次
接收感谢: 1925 次

Re: ubuntu16.04重装以后进不去win10

#3

帖子 poloshiao » 2018-05-28 15:07

1. 用 U 盘開機 選試用 登入試用桌面
把下面指令 複製 貼進終端機 執行
1-1. sudo efibootmgr -v
1-2. sudo parted -l print
1-3. sudo ls -al /dev/disk/by-uuid/*
1-4. sudo ls -al /dev/disk/by-partuuid/*
把指令及結果直接複製貼上來
ximeng0209
帖子: 3
注册时间: 2018-05-28 13:51
系统: linux
送出感谢: 0
接收感谢: 0

Re: ubuntu16.04重装以后进不去win10

#4

帖子 ximeng0209 » 2018-05-28 19:05

1. 用 U 盘開機 選試用 登入試用桌面
把下面指令 複製 貼進終端機 執行
1-1. sudo efibootmgr -v
1-2. sudo parted -l print
1-3. sudo ls -al /dev/disk/by-uuid/*
1-4. sudo ls -al /dev/disk/by-partuuid/*
把指令及結果直接複製貼上來
[email protected]:~$ sudo efibootmgr -v
BootCurrent: 1009
Timeout: 0 seconds
BootOrder: 0004,000A,0005,0008,0000,0003,0001,0002
Boot0000* Windows Boot Manager HD(2,GPT,0dce9115-f235-48a1-bb53-dc870c5be415,0xe1800,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...d................
Boot0001* Onboard NIC (IPV4) PciRoot(0x0)/Pci(0x1c,0x0)/Pci(0x0,0x0)/MAC(f48e387573ac,0)/IPv4(0.0.0.0:0<->0.0.0.0:0,0,0)..BO
Boot0002* Onboard NIC (IPV6) PciRoot(0x0)/Pci(0x1c,0x0)/Pci(0x0,0x0)/MAC(f48e387573ac,0)/IPv6([::]:<->[::]:,0,0)..BO
Boot0003* ubuntu HD(2,GPT,0dce9115-f235-48a1-bb53-dc870c5be415,0xe1800,0x32000)/File(\EFI\ubuntu\grubx64.efi)
Boot0004* Hard Drive BBS(HD,,0x0)..GO..NO........o.W.D.C. .W.D.2.0.E.Z.R.Z.-.0.0.Z.5.H.B.0....................A...........................>..Gd-.;.A..MQ..L. . . . .W. .-.D.C.W.4.C.4.M.E.Z.P.3.8.F........BO
Boot0005* CD/DVD Drive BBS(CDROM,,0x0)..GO..NO........o.H.L.-.D.T.-.S.T. .D.V.D.+./.-.R.W. .G.U.9.0.N....................A...........................>..Gd-.;.A..MQ..L.1.M.F.3.S.A.1.M.3.3. .6. . . . . . . . ........BO
Boot0008* Network Card BBS(Network,,0x0)..GO..NO........k.R.e.a.l.t.e.k. .P.X.E. .B.0.2. .D.0.0.........................rN.D+..,.\...........<..Gd-.;.A..MQ..L.R.e.a.l.t.e.k. .P.X.E. .B.0.2. .D.0.0........BO
Boot000A* USB BBS(USB,,0x0)..GO..NO........S.a.i.g.o. .M.i.n.i.K.i.n.g. .8...0.7....................A.......................&..Gd-.;.A..MQ..L.F.C.5.D.B.E.F.3........BO
[email protected]:~$ sudo parted -l print
Model: ATA WDC WD20EZRZ-00Z (scsi)
Disk /dev/sda: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 473MB 472MB ntfs Basic data partition hidden, diag
2 473MB 578MB 105MB fat32 EFI system partition boot, esp
3 578MB 595MB 16.8MB Microsoft reserved partition msftres
4 595MB 1000GB 1000GB ntfs Basic data partition msftdata
5 1000GB 1001GB 978MB ntfs hidden, diag
6 1001GB 1529GB 527GB ntfs Basic data partition msftdata
7 1529GB 1770GB 241GB ntfs Basic data partition msftdata
8 1770GB 1896GB 126GB ntfs Basic data partition msftdata
11 1896GB 1896GB 1049kB bios_grub
9 1896GB 1904GB 8193MB linux-swap(v1)
10 1904GB 1935GB 30.7GB ext4
12 1935GB 1936GB 1024MB ext4
13 1936GB 2000GB 64.4GB ext4


Model: aigo MiniKing (scsi)
Disk /dev/sdb: 31.2GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
4 131kB 31.2GB 31.2GB primary fat32 boot, lba


[email protected]:~$ sudo ls -al /dev/disk/by-uuid/*
lrwxrwxrwx 1 root root 10 May 28 11:00 /dev/disk/by-uuid/0630CAEA30CAE033 -> ../../sda6
lrwxrwxrwx 1 root root 10 May 28 11:00 /dev/disk/by-uuid/41fcd492-72a9-44c5-8a6e-c5ca511836da -> ../../sda9
lrwxrwxrwx 1 root root 11 May 28 11:00 /dev/disk/by-uuid/45adc410-a259-4e2c-8d22-2c66eac096f0 -> ../../sda13
lrwxrwxrwx 1 root root 11 May 28 11:00 /dev/disk/by-uuid/53e6da18-3da9-4e53-a81b-6fc9ec6e1f3d -> ../../sda10
lrwxrwxrwx 1 root root 10 May 28 11:00 /dev/disk/by-uuid/5E3284DC3284BB13 -> ../../sda1
lrwxrwxrwx 1 root root 10 May 28 11:00 /dev/disk/by-uuid/809AD3729AD36368 -> ../../sda7
lrwxrwxrwx 1 root root 10 May 28 11:00 /dev/disk/by-uuid/86A28A5EA28A531B -> ../../sda4
lrwxrwxrwx 1 root root 10 May 28 11:00 /dev/disk/by-uuid/B4FE-5315 -> ../../sdb4
lrwxrwxrwx 1 root root 10 May 28 11:00 /dev/disk/by-uuid/BED8DA20D8D9D72D -> ../../sda8
lrwxrwxrwx 1 root root 10 May 28 11:00 /dev/disk/by-uuid/DE4C1D9E4C1D730F -> ../../sda5
lrwxrwxrwx 1 root root 10 May 28 11:00 /dev/disk/by-uuid/E487-68CE -> ../../sda2
lrwxrwxrwx 1 root root 11 May 28 11:00 /dev/disk/by-uuid/ecf9a87f-d505-44b6-98c4-4c708d4e7e50 -> ../../sda12
[email protected]:~$ sudo ls -al /dev/disk/by-partuuid/*
lrwxrwxrwx 1 root root 10 May 28 11:00 /dev/disk/by-partuuid/0dce9115-f235-48a1-bb53-dc870c5be415 -> ../../sda2
lrwxrwxrwx 1 root root 10 May 28 11:00 /dev/disk/by-partuuid/11ece90f-5a3a-4934-97d0-4f07c67f2ccb -> ../../sda3
lrwxrwxrwx 1 root root 11 May 28 11:00 /dev/disk/by-partuuid/1f794419-22da-4e69-9263-dcddf09f28e4 -> ../../sda12
lrwxrwxrwx 1 root root 10 May 28 11:00 /dev/disk/by-partuuid/36e63b42-d697-4f1b-b767-8c9009eca8a7 -> ../../sda7
lrwxrwxrwx 1 root root 10 May 28 11:00 /dev/disk/by-partuuid/96b66146-1521-45ca-82cd-8f573b7e8607 -> ../../sda9
lrwxrwxrwx 1 root root 11 May 28 11:00 /dev/disk/by-partuuid/acb64f31-5fba-45ec-b990-604fabff2446 -> ../../sda11
lrwxrwxrwx 1 root root 11 May 28 11:00 /dev/disk/by-partuuid/aea4250c-d446-4df8-90f0-b39f200c0022 -> ../../sda13
lrwxrwxrwx 1 root root 10 May 28 11:00 /dev/disk/by-partuuid/af151cb1-fc02-4584-9b3c-ca56ac918457 -> ../../sda5
lrwxrwxrwx 1 root root 10 May 28 11:00 /dev/disk/by-partuuid/b82b2df2-c42f-4b63-b3c4-83967b78dbee -> ../../sda4
lrwxrwxrwx 1 root root 10 May 28 11:00 /dev/disk/by-partuuid/bf37e77b-3ba8-4bef-a264-2c9060bc71dd -> ../../sda6
lrwxrwxrwx 1 root root 10 May 28 11:00 /dev/disk/by-partuuid/cee1a4bb-a648-44da-93bb-88b09aa50e46 -> ../../sda8
lrwxrwxrwx 1 root root 11 May 28 11:00 /dev/disk/by-partuuid/d7655d27-27c8-431e-aa27-04f876c97c34 -> ../../sda10
lrwxrwxrwx 1 root root 10 May 28 11:00 /dev/disk/by-partuuid/f9c2dd0a-f55a-42bc-a925-98cef679d114 -> ../../sda1
poloshiao
论坛版主
帖子: 18182
注册时间: 2009-08-04 16:33
送出感谢: 21 次
接收感谢: 1925 次

Re: ubuntu16.04重装以后进不去win10

#5

帖子 poloshiao » 2018-05-28 21:07

sudo efibootmgr -v
...
1. 表示 你的開機模式是 uefi
1-1. 開機盤 必須是 gpt 分割
sudo parted -l print
Model: ATA WDC WD20EZRZ-00Z (scsi)
Disk /dev/sda: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
1-2. 開機硬盤 需要有一個 esp 分割
2 473MB 578MB 105MB fat32 EFI system partition boot, esp
1-2-1. /dev/sda2 就是 esp
1-2-2. /dev/sda2 的 uuid 是 0dce9115-f235-48a1-bb53-dc870c5be415
lrwxrwxrwx 1 root root 10 May 28 11:00 /dev/disk/by-partuuid/0dce9115-f235-48a1-bb53-dc870c5be415 -> ../../sda2
1-3. Ubuntu 的 uefi 開機檔案 grubx64.efi
Boot0003* ubuntu HD(2,GPT,0dce9115-f235-48a1-bb53-dc870c5be415,0xe1800,0x32000)/File(\EFI\ubuntu\grubx64.efi)
1-3-1. /dev/sda2 的 \EFI\ubuntu\grubx64.efi
1-3-2. /boot/efi/EFI/ubuntu/grubx64.efi

1-4. Windows 的 uefi 開機檔案 bootmgfw.efi
Boot0000* Windows Boot Manager HD(2,GPT,0dce9115-f235-48a1-bb53-dc870c5be415,0xe1800,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)
1-4-1. /dev/sda2 的 \EFI\Microsoft\Boot\bootmgfw.efi

1-5. 目前預設開機優先順序
BootOrder: 0004,000A,0005,0008,0000,0003,0001,0002
2. 如果把開機優先順序 改為 0003 排在第一個
就是預設 開機出現 Ubuntu 的 grub 2 開機選單
2-1. 開機需要先進 Uefi 把 Secure Boot 設為 disabled

3. 如果把開機優先順序 改為 0000 排在第一個
就是預設 開機出現 Windows 的 開機引導選單 (例如 EasyBCD)

4. 如何變更 開機最優先順序 請參閱 主板 UEFI 操作說明書
4-1. 也可以使用 指令 efibootmgr 設定
http://manpages.ubuntu.com/manpages/xen ... mgr.8.html
11 1896GB 1896GB 1049kB bios_grub
在legacy下只能进入Linux
5. 這個 bios_grub 分割區 是 在 uefi 關閉時 安裝 Ubuntu 所產生的 開機分割區 (把 Ubuntu 的 開機檔案 安裝到 bios_grub)
5-1. 如果 uefi 啟用
1-3-2. /boot/efi/EFI/ubuntu/grubx64.efi
可以正常開機
這個分割區 就是多餘的 可以移除或重新格式化 作為其它用途

6. 有問題 歡迎再貼文 不必急著動手
回复

回到 “启动和引导”