我正在尝试设置自己的家庭服务器 - 无头。这是一台 Fit-PC2 机器(完整技术规格在此处:http://www.fit-pc.com/web/fit-pc/fit-pc2-specifications/),配备 160GB HDD,因此 BIOS 设置有限,而且显卡是臭名昭著的 Poulsbo。我花了两天时间尝试将 Debian Squeezy 安装在它上面。安装运行正常,但 GRUB 无法通过"Welcome to GRUB!"
。
我启动 LiveCD 进行编辑/etc/default/grub
以启用文本终端,然后运行 sudo update-grub2。什么都没变,我甚至找不到grub.cfg
里面的东西/boot
!Debian 无法启动。
所以我尝试了 Ubuntu Server 12.04 LTS。我使用 LVM(一个大的 ext3 分区用于主系统和 2GB 交换分区。我特意在这里使用 ext3,因为我读到 GRUB 中有一个错误,在 ext4 下会导致类似的问题)在 LVM 组“technodrome”下安装。与 Debian 的错误相同。打开机器后,我只看到黑屏。按住 Shift 时,我看到消息"GRUB loading"
。就是这样。
再次,我使用 LiveCD 挂载/dev/sda
并 chroot 它以尝试终端设置技巧,但这次我的整个 160GB 驱动器在 Ubuntu 10.10 LiveCD 中显示为 255 MB 分区。我无法挂载它。我真的很困惑,没有选择。
我附上了 Ubuntu 服务器安装的启动信息脚本的输出:
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
for (technodrome-technodrome)/boot/grub on this drive.
sda1: __________________________________________________________________________
File system: ext2
Boot sector type: -
Boot sector info:
Operating System:
Boot files: /grub/grub.cfg /grub/core.img
sda2: __________________________________________________________________________
File system: Extended Partition
Boot sector type: -
Boot sector info:
sda5: __________________________________________________________________________
File system: LVM2_member
Boot sector type: -
Boot sector info:
============================ Drive/Partition Info: =============================
Drive: sda _____________________________________________________________________
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 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 * 2,048 499,711 497,664 83 Linux
/dev/sda2 501,758 312,580,095 312,078,338 5 Extended
/dev/sda5 501,760 312,580,095 312,078,336 8e Linux LVM
"blkid" output: ________________________________________________________________
Device UUID TYPE LABEL
/dev/loop0 squashfs
/dev/sda1 65e70348-a920-4603-a9da-2867eadfdf76 ext2
/dev/sda5 m1KgMz-8fsi-UOLw-Qgs4-mYpp-uln2-7E3Na7 LVM2_member
================================ Mount points: =================================
Device Mount_Point Type Options
/dev/loop0 /rofs squashfs (ro,noatime)
/dev/sda1 /media/65e70348-a920-4603-a9da-2867eadfdf76 ext2 (rw,nosuid,nodev,uhelper=udisks)
/dev/sr0 /cdrom iso9660 (ro,noatime)
============================= sda1/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 lvm
insmod part_msdos
insmod ext2
set root='(technodrome-root)'
search --no-floppy --fs-uuid --set=root 61135891-b2f0-438c-be0a-c145bfd48445
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 65e70348-a920-4603-a9da-2867eadfdf76
set locale_dir=($root)/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
### 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-23-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 65e70348-a920-4603-a9da-2867eadfdf76
linux /vmlinuz-3.2.0-23-generic-pae root=/dev/mapper/technodrome-root ro acpi=off noapic quiet splash $vt_handoff
initrd /initrd.img-3.2.0-23-generic-pae
}
menuentry 'Ubuntu, with Linux 3.2.0-23-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 65e70348-a920-4603-a9da-2867eadfdf76
echo 'Loading Linux 3.2.0-23-generic-pae ...'
linux /vmlinuz-3.2.0-23-generic-pae root=/dev/mapper/technodrome-root ro recovery nomodeset acpi=off noapic
echo 'Loading initial ramdisk ...'
initrd /initrd.img-3.2.0-23-generic-pae
}
### 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='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 65e70348-a920-4603-a9da-2867eadfdf76
linux16 /memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 65e70348-a920-4603-a9da-2867eadfdf76
linux16 /memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
if [ "x${timeout}" != "x-1" ]; then
if keystatus; then
if keystatus --shift; then
set timeout=-1
else
set timeout=0
fi
else
if sleep --interruptible 3 ; then
set timeout=0
fi
fi
fi
### 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 ###
--------------------------------------------------------------------------------
=================== sda1: Location of files loaded by Grub: ====================
GiB - GB File Fragment(s)
0.195413589 = 0.209823744 grub/core.img 2
0.191498756 = 0.205620224 grub/grub.cfg 1
0.041124344 = 0.044156928 initrd.img-3.2.0-23-generic-pae 62
0.009570122 = 0.010275840 vmlinuz-3.2.0-23-generic-pae 22
=============================== StdErr Messages: ===============================
xz: (stdin): Compressed data is corrupt
先生们,请提供你们的见解和解决方案,因为我的已经用完了。非常感谢你们所有人!
答案1
我自己找到了解决方案。必须将 BIOS 设置为适应“Windows XP”,而不是“其他”操作系统。只有这样它才能起作用。