我的设置运行良好,适用于 Windows 7、Linux Mint 17.2 和 Kali Linux。我使用的是 Mint 的 grub2。只有一个硬盘。
然后我重新安装了 Kali(因为稍微改变了分区结构:创建了一个额外的交换分区),由于我更喜欢 mint 的 grub 风格,我告诉 Kali 不要在硬盘的 MBR 中安装 grub。它询问我要在哪里安装 grub,我将它安装在一个随机的 USB 驱动器上以摆脱它。
现在,启动时我收到“无效分区表!”错误,该错误在 BIOS 启动画面后立即显示。
我猜 Kali 仍然从我的硬盘的 MBR 中删除了旧的 grub?
然后我使用 mint live USB 驱动器重新安装 grub(根据此http://community.linuxmint.com/tutorial/view/245) 并且一切看上去都成功了。
但我仍然收到“分区表无效!”错误。可能是什么问题?
编辑:运行 bootinfoscript(http://sourceforge.net/projects/bootinfoscript/)
Boot Info Script 0.61 [1 April 2012]
============================= Boot Info Summary: ===============================
=> Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
in partition 112 for .
=> Syslinux MBR (3.00-3.35) is installed in the MBR of /dev/sdb.
sda1: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /bootmgr /Boot/BCD
sda2: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 7
Boot files: /Windows/System32/winload.exe
sda3: __________________________________________________________________________
File system: Extended Partition
Boot sector type: -
Boot sector info:
sda5: __________________________________________________________________________
File system: swap
Boot sector type: -
Boot sector info:
sda6: __________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Linux Mint 17.2 Rafaela
Boot files: /boot/grub/grub.cfg /etc/fstab
sda7: __________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Kali GNU/Linux 2.0
Boot files: /boot/grub/grub.cfg /etc/fstab
sda8: __________________________________________________________________________
File system: swap
Boot sector type: -
Boot sector info:
sdb1: __________________________________________________________________________
File system: vfat
Boot sector type: SYSLINUX 4.07
Boot sector info: Syslinux looks at sector 32776 of /dev/sdb1 for its
second stage. The integrity check of Syslinux failed.
No errors found in the Boot Parameter Block.
Operating System:
Boot files: /boot/grub/grub.cfg /syslinux.cfg
/efi/BOOT/grubx64.efi /ldlinux.sys
============================ Drive/Partition Info: =============================
Drive: sda _____________________________________________________________________
Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
Partition Boot Start Sector End Sector # of Sectors Id System
/dev/sda1 2,048 206,847 204,800 7 NTFS / exFAT / HPFS
/dev/sda2 206,848 924,803,071 924,596,224 7 NTFS / exFAT / HPFS
/dev/sda3 924,805,118 1,465,147,391 540,342,274 5 Extended
/dev/sda5 1,402,064,896 1,418,274,815 16,209,920 82 Linux swap / Solaris
/dev/sda6 924,805,120 1,402,064,895 477,259,776 83 Linux
/dev/sda7 1,418,276,864 1,457,336,319 39,059,456 83 Linux
/dev/sda8 1,457,338,368 1,465,147,391 7,809,024 82 Linux swap / Solaris
Drive: sdb _____________________________________________________________________
Disk /dev/sdb: 8011 MB, 8011120640 bytes
255 heads, 63 sectors/track, 973 cylinders, total 15646720 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Partition Boot Start Sector End Sector # of Sectors Id System
/dev/sdb1 * 2,048 15,646,719 15,644,672 c W95 FAT32 (LBA)
"blkid" output: ________________________________________________________________
Device UUID TYPE LABEL
/dev/loop0 squashfs
/dev/sda1 2C52EE4952EE177C ntfs System Reserved
/dev/sda2 343AF1F23AF1B0CA ntfs
/dev/sda5 63807e5a-5d56-47d9-92eb-1bbad9a20412 swap
/dev/sda6 0dddccca-ecd3-4ef9-a660-7ec5865232d5 ext4
/dev/sda7 79a616f3-b384-4020-a26a-467053ae764d ext4
/dev/sda8 10837372-304f-47a8-bb4e-724976945ed2 swap
/dev/sdb1 7C01-B8DA vfat MINT
================================ Mount points: =================================
Device Mount_Point Type Options
/dev/loop0 /rofs squashfs (ro,noatime)
/dev/sdb1 /cdrom vfat (ro,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
=========================== sda6/boot/grub/grub.cfg: ===========================
--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 0dddccca-ecd3-4ef9-a660-7ec5865232d5
else
search --no-floppy --fs-uuid --set=root 0dddccca-ecd3-4ef9-a660-7ec5865232d5
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=-1
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=10
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=10
fi
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/06_mint_theme ###
set menu_color_normal=white/black
set menu_color_highlight=white/light-gray
### END /etc/grub.d/06_mint_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
if [ "${recordfail}" != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Linux Mint 17.2 Cinnamon 64-bit' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-0dddccca-ecd3-4ef9-a660-7ec5865232d5' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 0dddccca-ecd3-4ef9-a660-7ec5865232d5
else
search --no-floppy --fs-uuid --set=root 0dddccca-ecd3-4ef9-a660-7ec5865232d5
fi
linux /boot/vmlinuz-3.16.0-38-generic root=UUID=0dddccca-ecd3-4ef9-a660-7ec5865232d5 ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.16.0-38-generic
}
submenu 'Advanced options for Linux Mint 17.2 Cinnamon 64-bit' $menuentry_id_option 'gnulinux-advanced-0dddccca-ecd3-4ef9-a660-7ec5865232d5' {
menuentry 'Linux Mint 17.2 Cinnamon 64-bit, with Linux 3.16.0-38-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-38-generic-advanced-0dddccca-ecd3-4ef9-a660-7ec5865232d5' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 0dddccca-ecd3-4ef9-a660-7ec5865232d5
else
search --no-floppy --fs-uuid --set=root 0dddccca-ecd3-4ef9-a660-7ec5865232d5
fi
echo 'Loading Linux 3.16.0-38-generic ...'
linux /boot/vmlinuz-3.16.0-38-generic root=UUID=0dddccca-ecd3-4ef9-a660-7ec5865232d5 ro quiet splash $vt_handoff
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.16.0-38-generic
}
menuentry 'Linux Mint 17.2 Cinnamon 64-bit, with Linux 3.16.0-38-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-38-generic-recovery-0dddccca-ecd3-4ef9-a660-7ec5865232d5' {
recordfail
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 0dddccca-ecd3-4ef9-a660-7ec5865232d5
else
search --no-floppy --fs-uuid --set=root 0dddccca-ecd3-4ef9-a660-7ec5865232d5
fi
echo 'Loading Linux 3.16.0-38-generic ...'
linux /boot/vmlinuz-3.16.0-38-generic root=UUID=0dddccca-ecd3-4ef9-a660-7ec5865232d5 ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.16.0-38-generic
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/10_lupin ###
### END /etc/grub.d/10_lupin ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry 'Memory test (memtest86+)' {
insmod part_msdos
insmod ext2
set root='hd0,msdos6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 0dddccca-ecd3-4ef9-a660-7ec5865232d5
else
search --no-floppy --fs-uuid --set=root 0dddccca-ecd3-4ef9-a660-7ec5865232d5
fi
knetbsd /boot/memtest86+.elf
}
menuentry 'Memory test (memtest86+, serial console 115200)' {
insmod part_msdos
insmod ext2
set root='hd0,msdos6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 0dddccca-ecd3-4ef9-a660-7ec5865232d5
else
search --no-floppy --fs-uuid --set=root 0dddccca-ecd3-4ef9-a660-7ec5865232d5
fi
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-2C52EE4952EE177C' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 2C52EE4952EE177C
else
search --no-floppy --fs-uuid --set=root 2C52EE4952EE177C
fi
parttool ${root} hidden-
chainloader +1
}
menuentry 'Kali GNU/Linux 2.0 (2.0) (on /dev/sda4)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-f066461b-de6a-4e20-b326-493a19ee8765' {
insmod part_msdos
insmod ext2
set root='hd0,msdos4'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos4 --hint-efi=hd0,msdos4 --hint-baremetal=ahci0,msdos4 f066461b-de6a-4e20-b326-493a19ee8765
else
search --no-floppy --fs-uuid --set=root f066461b-de6a-4e20-b326-493a19ee8765
fi
linux /boot/vmlinuz-4.0.0-kali1-amd64 root=UUID=f066461b-de6a-4e20-b326-493a19ee8765 ro quiet
initrd /boot/initrd.img-4.0.0-kali1-amd64
}
submenu 'Advanced options for Kali GNU/Linux 2.0 (2.0) (on /dev/sda4)' $menuentry_id_option 'osprober-gnulinux-advanced-f066461b-de6a-4e20-b326-493a19ee8765' {
menuentry 'Kali GNU/Linux (on /dev/sda4)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.0.0-kali1-amd64--f066461b-de6a-4e20-b326-493a19ee8765' {
insmod part_msdos
insmod ext2
set root='hd0,msdos4'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos4 --hint-efi=hd0,msdos4 --hint-baremetal=ahci0,msdos4 f066461b-de6a-4e20-b326-493a19ee8765
else
search --no-floppy --fs-uuid --set=root f066461b-de6a-4e20-b326-493a19ee8765
fi
linux /boot/vmlinuz-4.0.0-kali1-amd64 root=UUID=f066461b-de6a-4e20-b326-493a19ee8765 ro quiet
initrd /boot/initrd.img-4.0.0-kali1-amd64
}
menuentry 'Kali GNU/Linux, with Linux 4.0.0-kali1-amd64 (on /dev/sda4)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.0.0-kali1-amd64--f066461b-de6a-4e20-b326-493a19ee8765' {
insmod part_msdos
insmod ext2
set root='hd0,msdos4'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos4 --hint-efi=hd0,msdos4 --hint-baremetal=ahci0,msdos4 f066461b-de6a-4e20-b326-493a19ee8765
else
search --no-floppy --fs-uuid --set=root f066461b-de6a-4e20-b326-493a19ee8765
fi
linux /boot/vmlinuz-4.0.0-kali1-amd64 root=UUID=f066461b-de6a-4e20-b326-493a19ee8765 ro quiet
initrd /boot/initrd.img-4.0.0-kali1-amd64
}
menuentry 'Kali GNU/Linux, with Linux 4.0.0-kali1-amd64 (recovery mode) (on /dev/sda4)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.0.0-kali1-amd64-root=UUID=f066461b-de6a-4e20-b326-493a19ee8765 ro single-f066461b-de6a-4e20-b326-493a19ee8765' {
insmod part_msdos
insmod ext2
set root='hd0,msdos4'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos4 --hint-efi=hd0,msdos4 --hint-baremetal=ahci0,msdos4 f066461b-de6a-4e20-b326-493a19ee8765
else
search --no-floppy --fs-uuid --set=root f066461b-de6a-4e20-b326-493a19ee8765
fi
linux /boot/vmlinuz-4.0.0-kali1-amd64 root=UUID=f066461b-de6a-4e20-b326-493a19ee8765 ro single
initrd /boot/initrd.img-4.0.0-kali1-amd64
}
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
set timeout=10
fi
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------
=============================== sda6/etc/fstab: ================================
--------------------------------------------------------------------------------
# /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/sda6 during installation
UUID=0dddccca-ecd3-4ef9-a660-7ec5865232d5 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=cee5ac73-ffd4-49ee-a0cb-48eb741d4eab none swap sw 0 0
--------------------------------------------------------------------------------
=================== sda6: Location of files loaded by Grub: ====================
GiB - GB File Fragment(s)
=========================== sda7/boot/grub/grub.cfg: ===========================
--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7 79a616f3-b384-4020-a26a-467053ae764d
else
search --no-floppy --fs-uuid --set=root 79a616f3-b384-4020-a26a-467053ae764d
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_GB
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=-1
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Kali GNU/Linux' --class kali --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-79a616f3-b384-4020-a26a-467053ae764d' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7 79a616f3-b384-4020-a26a-467053ae764d
else
search --no-floppy --fs-uuid --set=root 79a616f3-b384-4020-a26a-467053ae764d
fi
echo 'Loading Linux 4.0.0-kali1-amd64 ...'
linux /boot/vmlinuz-4.0.0-kali1-amd64 root=UUID=79a616f3-b384-4020-a26a-467053ae764d ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.0.0-kali1-amd64
}
submenu 'Advanced options for Kali GNU/Linux' $menuentry_id_option 'gnulinux-advanced-79a616f3-b384-4020-a26a-467053ae764d' {
menuentry 'Kali GNU/Linux, with Linux 4.0.0-kali1-amd64' --class kali --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.0.0-kali1-amd64-advanced-79a616f3-b384-4020-a26a-467053ae764d' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7 79a616f3-b384-4020-a26a-467053ae764d
else
search --no-floppy --fs-uuid --set=root 79a616f3-b384-4020-a26a-467053ae764d
fi
echo 'Loading Linux 4.0.0-kali1-amd64 ...'
linux /boot/vmlinuz-4.0.0-kali1-amd64 root=UUID=79a616f3-b384-4020-a26a-467053ae764d ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.0.0-kali1-amd64
}
menuentry 'Kali GNU/Linux, with Linux 4.0.0-kali1-amd64 (recovery mode)' --class kali --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.0.0-kali1-amd64-recovery-79a616f3-b384-4020-a26a-467053ae764d' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7 79a616f3-b384-4020-a26a-467053ae764d
else
search --no-floppy --fs-uuid --set=root 79a616f3-b384-4020-a26a-467053ae764d
fi
echo 'Loading Linux 4.0.0-kali1-amd64 ...'
linux /boot/vmlinuz-4.0.0-kali1-amd64 root=UUID=79a616f3-b384-4020-a26a-467053ae764d ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.0.0-kali1-amd64
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
<snip>
删除了末尾的一些行以符合字符限制。
答案1
我的电脑(Dell Latitude e6430)无法从逻辑分区启动(即使我使用的是 GRUB 2)。我制定了一个分区方案,以便从主分区启动,一切正常。