每当我启动系统时,Linux 都会直接启动。如果我按shift,GRUB 只会显示 Linux,而不显示 Windows。以下是fdisk
和的结果update-grub
。我想我以错误的方式安装了 Linux。
$ fdisk
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sda1 1 1953525167 976762583+ ee GPT
Partition 1 does not start on physical sector boundary.
$ 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-3.19.0-32-generic
Found initrd image: /boot/initrd.img-3.19.0-32-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
No volume groups found
done
答案1
首先我尝试使用sudo os-prober
,sudo update-grub
但它无法识别我的窗口。
最后我按照以下步骤解决了这个问题启动修复
安装启动修复
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair
按下“推荐修复”并按照建议在终端中输入一些命令。
我认为我的 Grub 无法识别 Windows 是因为关机不当,它解决了这个问题。
我希望这对你有帮助。