这真让我失望。我有Gentoo和Ubuntu,都带有Grub2。Gentoo有一个专用/boot
分区,而Ubuntu没有。我有一个menuentry
Gentoo /etc/grub.d/40_custom
来启动Ubuntu(而Ubuntu确实可以启动)。
因为Ubuntu是Grub附带的,所以我想将其链式加载到其中,而不是维护设置根,内核,initrd和其他东西的条目。这是链式装载机所需要的(Ubuntu已打开,/dev/sda4
并且我已经在那里安装了Grub):
menuentry 'Chainloader' {
insmod chain
set root=(hd0,4)
chainloader +1
}
它给了我error: Invalid signature
,但我找不到可用的解决方案。有人可以指出吗?
这是由于 </dev/sda4 head -c 512 | hd
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000200
这是的结果fdisk -l
。/dev/sda1
是/boot
Gentoo,Gentoo在/dev/sda2
,Ubuntu在/dev/sda4
。Ubuntu的/boot
是/dev/sda4
太多。
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe001152b
Device Boot Start End Blocks Id System
/dev/sda1 1 9 72261 83 Linux
/dev/sda2 10 13064 104864287+ 8e Linux LVM
/dev/sda4 * 18152 19457 10490445 83 Linux
没有错误 grub-install /dev/sda4 --no-floppy --force
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partition instead of the MBR. This is a BAD idea..
/usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
Installation finished. No error reported.
/dev/sda4
。您是否有多个磁盘?你的分区表是什么?请发布的输出fdisk -l
以及来自的消息grub-install /dev/sda4 --no-floppy --force
。