我刚刚从 11.10 更新到 12.04,没有遇到什么大问题(需要花一些时间才能通过重新启动 ssh、mysql 和其他一些服务的请求,但我自己没有动手,一切都由安装程序完成)。但是,重新启动后,grub 无法执行任何操作。选择新的 linux 安装(第一个条目),我只是得到
error: no such partition
error: no such partition
error: no such partition
并选择恢复版本只会显示 5 行而不是 3 行。我在另一个驱动器上安装了 Windows 7,可以通过从该驱动器启动来运行它。从 grub 菜单中选择它会出现与上述相同的错误(虽然不记得有多少行)。不过,老实说,我不记得在更新之前是否可以从 grub 启动 win 7。简而言之,grub 菜单上的任何内容都不起作用。
有什么解决办法吗?grub 菜单的外观发生了变化 - 以前是紫色背景,小字母,现在是黑底白字,大字母,看起来非常简单。
最初的安装是从 USB 驱动器进行的,在我开始使用 Google 搜索此问题之前,我还没有听说过 wubi,所以我怀疑它们之间是否存在任何联系。
我真的希望那里有一些懂得食物的人:)
编辑:
好的。我制作了一个可启动的 USB,现在正在运行。当我运行 bootinfoscript 时,它警告我
"gawk" could not be found, using "busybox awk" instead.
This may lead to unreliable results.
只是想让你知道。
RESULTS.txt的内容为:
Boot Info Script 0.61 [1 April 2012]
============================== 启动信息摘要: =================================
=> Windows is installed in the MBR of /dev/sda.
=> Grub2 (v1.99) is installed in the MBR of /dev/sdb and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for (,msdos3)/boot/grub on this drive.
=> Syslinux MBR (4.04 and higher) is installed in the MBR of /dev/sdc.
sda1:__________________________________________
File system: vfat
Boot sector type: Dell Utility: FAT16
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /DELLBIO.BIN /DELLRMK.BIN /COMMAND.COM
sda2:__________________________________________
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:
sda3:__________________________________________
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: /bootmgr /Boot/BCD /Windows/System32/winload.exe
sda4:__________________________________________
File system: Extended Partition
Boot sector type: -
Boot sector info:
sda5:__________________________________________
File system: vfat
Boot sector type: Windows 7: FAT32
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows XP
Boot files: /boot.ini /bootmgr /ntldr /NTDETECT.COM
数据库1:__________________________________________
File system: ntfs
Boot sector type: Windows XP: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files:
数据库2:__________________________________________
File system: swap
Boot sector type: -
Boot sector info:
数据库3:__________________________________________
File system: ext4
Boot sector type: Grub2 (v1.99)
Boot sector info: Grub2 (v1.99) is installed in the boot sector of sdb3
and looks at sector 375893584 of the same hard drive
for core.img. core.img is at this location and looks
for (,msdos3)/boot/grub on this drive.
Operating System: Ubuntu 12.04 LTS
Boot files: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img
sdb4:__________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files:
sdc1:__________________________________________
File system: ntfs
Boot sector type: SYSLINUX 4.06 4.06-pre1
Boot sector info: Syslinux looks at sector 4649656 of /dev/sdc1 for its
second stage. SYSLINUX is installed in the directory.
The integrity check of the ADV area failed. No errors
found in the Boot Parameter Block.
Operating System:
Boot files: /boot/grub/grub.cfg /syslinux/syslinux.cfg /ldlinux.sys
============================= 驱动器/分区信息: ==============================
驱动器:sda_______________________________________
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 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/sda1 63 240,974 240,912 de Dell Utility
/dev/sda2 241,664 21,213,183 20,971,520 7 NTFS / exFAT / HPFS
/dev/sda3 * 21,213,184 483,151,863 461,938,680 7 NTFS / exFAT / HPFS
/dev/sda4 483,151,872 488,394,751 5,242,880 f W95 Extended (LBA)
/dev/sda5 483,153,920 488,394,751 5,240,832 dd Dell Media Direct
驱动器: sdb_______________________________________
Disk /dev/sdb: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 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 63 345,886,749 345,886,687 7 NTFS / exFAT / HPFS
/dev/sdb2 345,888,768 361,510,911 15,622,144 82 Linux swap / Solaris
/dev/sdb3 * 361,510,912 390,807,786 29,296,875 83 Linux
/dev/sdb4 390,809,600 488,394,751 97,585,152 83 Linux
驱动器:sdc_______________________________________
Disk /dev/sdc: 8015 MB, 8015282176 bytes
255 heads, 63 sectors/track, 974 cylinders, total 15654848 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/sdc1 * 2,048 15,652,863 15,650,816 7 NTFS / exFAT / HPFS
“blkid”输出:____________________________________
Device UUID TYPE LABEL
/dev/loop0 squashfs
/dev/sda1 07D8-0411 vfat DellUtility
/dev/sda2 E2765BBC765B9061 ntfs RECOVERY
/dev/sda3 98DC5E54DC5E2D2E ntfs OS
/dev/sda5 7061-9DF5 vfat MEDIADIRECT
/dev/sdb1 01CBBB4C3374C3B0 ntfs Data1
/dev/sdb2 1ca45f3f-f888-43d1-8137-02699597189a swap
/dev/sdb3 6bc1b599-ad4b-403c-a155-a5bc81211f5e ext4
/dev/sdb4 58e2b257-8608-4b11-b20b-dc162bb80b62 ext4
/dev/sdc1 0C02B64402B63316 ntfs PENDRIVE
=================================== 挂载点: ===================================
Device Mount_Point Type Options
/dev/loop0 /rofs squashfs (ro,noatime)
/dev/sdb4 /media/58e2b257-8608-4b11-b20b-dc162bb80b62 ext4 (rw,nosuid,nodev,uhelper=udisks)
/dev/sdc1 /cdrom fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
================================= sda5/boot.ini: ==================================
[boot loader]
timeout=0
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Embedded" /fastdetect /KERNEL=NTOSBOOT.EXE /maxmem=1024
============================ sdb3/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
set default="0"
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 {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}
insmod part_msdos
insmod ext2
set root='(hd1,msdos3)'
search --no-floppy --fs-uuid --set=root 6bc1b599-ad4b-403c-a155-a5bc81211f5e
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
insmod part_msdos
insmod ext2
set root='(hd1,msdos3)'
search --no-floppy --fs-uuid --set=root 6bc1b599-ad4b-403c-a155-a5bc81211f5e
set locale_dir=($root)/boot/grub/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
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
if background_color 44,0,30; then
clear
fi
### END /etc/grub.d/05_debian_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
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 3.2.0-24-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos3)'
search --no-floppy --fs-uuid --set=root 6bc1b599-ad4b-403c-a155-a5bc81211f5e
linux /boot/vmlinuz-3.2.0-24-generic root=UUID=6bc1b599-ad4b-403c-a155-a5bc81211f5e ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.2.0-24-generic
}
menuentry 'Ubuntu, with Linux 3.2.0-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos3)'
search --no-floppy --fs-uuid --set=root 6bc1b599-ad4b-403c-a155-a5bc81211f5e
echo 'Loading Linux 3.2.0-24-generic ...'
linux /boot/vmlinuz-3.2.0-24-generic root=UUID=6bc1b599-ad4b-403c-a155-a5bc81211f5e ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.2.0-24-generic
}
submenu "Previous Linux versions" {
menuentry 'Ubuntu, with Linux 3.0.0-19-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos3)'
search --no-floppy --fs-uuid --set=root 6bc1b599-ad4b-403c-a155-a5bc81211f5e
linux /boot/vmlinuz-3.0.0-19-generic root=UUID=6bc1b599-ad4b-403c-a155-a5bc81211f5e ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.0.0-19-generic
}
menuentry 'Ubuntu, with Linux 3.0.0-19-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos3)'
search --no-floppy --fs-uuid --set=root 6bc1b599-ad4b-403c-a155-a5bc81211f5e
echo 'Loading Linux 3.0.0-19-generic ...'
linux /boot/vmlinuz-3.0.0-19-generic root=UUID=6bc1b599-ad4b-403c-a155-a5bc81211f5e ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.0.0-19-generic
}
}
### END /etc/grub.d/10_linux ###
### 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='(hd1,msdos3)'
search --no-floppy --fs-uuid --set=root 6bc1b599-ad4b-403c-a155-a5bc81211f5e
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd1,msdos3)'
search --no-floppy --fs-uuid --set=root 6bc1b599-ad4b-403c-a155-a5bc81211f5e
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/sda3)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set=root 98DC5E54DC5E2D2E
chainloader +1
}
menuentry "Microsoft Windows XP Embedded (on /dev/sda5)" --class windows --class os {
insmod part_msdos
insmod fat
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root 7061-9DF5
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
### 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 $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
================================ sdb3/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>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sdb3 during installation
UUID=6bc1b599-ad4b-403c-a155-a5bc81211f5e / ext4 errors=remount-ro 0 1
# /home was on /dev/sdb4 during installation
UUID=58e2b257-8608-4b11-b20b-dc162bb80b62 /home ext4 defaults,user_xattr 0 2
# swap was on /dev/sdb2 during installation
UUID=1ca45f3f-f888-43d1-8137-02699597189a none swap sw 0 0
=================== sdb3:Grub 加载的文件位置: ====================
GiB - GB File Fragment(s)
= boot/grub/core.img 1
= boot/grub/grub.cfg 1
= boot/initrd.img-3.0.0-19-generic 2
= boot/initrd.img-3.2.0-24-generic 2
= boot/vmlinuz-3.0.0-19-generic 2
= boot/vmlinuz-3.2.0-24-generic 1
= vmlinuz 1
= vmlinuz.old 2
============================= sdc1/boot/grub/grub.cfg: =============================
if loadfont /boot/grub/font.pf2 ; then
set gfxmode=auto
insmod efi_gop
insmod efi_uga
insmod gfxterm
terminal_output gfxterm
fi
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
menuentry "Try Ubuntu without installing" {
set gfxpayload=keep
linux /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash --
initrd /casper/initrd.lz
}
menuentry "Install Ubuntu" {
set gfxpayload=keep
linux /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity quiet splash --
initrd /casper/initrd.lz
}
menuentry "Check disc for defects" {
set gfxpayload=keep
linux /casper/vmlinuz boot=casper integrity-check quiet splash --
initrd /casper/initrd.lz
}
=========================== sdc1/syslinux/syslinux.cfg: ============================
# D-I config version 2.0
include menu.cfg
default vesamenu.c32
prompt 0
timeout 50
# If you would like to use the new menu and be presented with the option to install or run from USB at startup, remove # from the following line. This line was commented out (by request of many) to allow the old menu to be presented and to enable booting straight into the Live Environment!
# ui gfxboot bootlogo
=================== sdc1:Grub 加载的文件位置: ====================
GiB - GB File Fragment(s)
?? = ?? boot/grub/grub.cfg 0
================= sdc1:Syslinux 加载的文件位置: ==================
GiB - GB File Fragment(s)
?? = ?? ldlinux.sys 1
?? = ?? syslinux/chain.c32 1
?? = ?? syslinux/gfxboot.c32 1
?? = ?? syslinux/syslinux.cfg 0
?? = ?? syslinux/vesamenu.c32 1
============== sdc1:Syslinux 使用的 COM32(R) 文件的版本: ===============
syslinux/chain.c32 : COM32R module (v4.xx)
syslinux/gfxboot.c32 : COM32R module (v4.xx)
syslinux/vesamenu.c32 : COM32R module (v4.xx)
================================ StdErr 消息: =================================
xz: (stdin): Compressed data is corrupt
xz: (stdin): Compressed data is corrupt
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
./bootinfoscript: line 1646: [: 2.73495e+09: integer expression expected
答案1
烧掉超级 Grub2 磁盘,并使用它启动 Ubuntu。然后再次执行 bootinfoscript(不是必需的,只是为了确保 /dev-Names 没有改变)。检查
=> Grub2 (v1.99) is installed in the MBR of /dev/sdb and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for (,msdos3)/boot/grub on this drive.
改变(重要的是在 MBR 中 ...)。如果是这样,您必须调整以下命令(例如/dev/sdc代替/dev/sdb),否则您可以从任何终端执行它:
sudo grub-install /dev/sdb