PDA

View Full Version : [ubuntu] 11.04 boots from CD, but not directly from Hard Disk



Polaris395
June 16th, 2012, 08:25 PM
Hi all!

I current have a small server running with Ubuntu 11.04. It has a DVD drive and a 2TB Seagate drive. I installed Natty Narwhal on the machine and got all my applications and going.

Unfortunately, after some time of use, I needed to restart the machine. I did so, and I find that the machine will not boot! I pass through BIOS, but then it hangs for ~10 seconds and gives the message "No boot device found - press any key to restart!"

To fix this, I put in the installation CD that I used and selected the option to "Boot from first hard disk". Lo and behold, everything boots up A-ok! I took a look at fdisk -- only thing mounted is /dev/sda (my 2TB drive).

I've restarted the machine to test different variations (presence of CD, different boot flags, ETC.) and the results are all the same. My hardware will not boot unless I select the option from the install CD to boot from the hard drive.

Can anyone shed any light on how to fix this problem?!

Cheers,
Polaris395!

Edit: I ran a boot info script that has been mentioned before. Here is the result:


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 34
of the same hard drive for core.img. core.img is at this location and
looks for (,gpt2)/boot/grub on this drive.

sda1: __________________________________________________ ________________________

File system: BIOS Boot partition
Boot sector type: Grub2's core.img
Boot sector info:

sda2: __________________________________________________ ________________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 11.04
Boot files: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda3: __________________________________________________ ________________________

File system: swap
Boot sector type: -
Boot sector info:

============================ Drive/Partition Info: =============================

Drive: sda __________________________________________________ ___________________

Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 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 1 3,907,029,167 3,907,029,167 ee GPT


GUID Partition Table detected.

Partition Start Sector End Sector # of Sectors System
/dev/sda1 34 1,987 1,954 BIOS Boot partition
/dev/sda2 1,988 3,898,673,863 3,898,671,876 Data partition (Windows/Linux)
/dev/sda3 3,898,673,864 3,907,029,118 8,355,255 Swap partition (Linux)

"blkid" output: __________________________________________________ ______________

Device UUID TYPE LABEL

/dev/sda2 f87fd6d6-bfbd-4fc3-82a0-995fff67d5b6 ext4
/dev/sda3 da4c532b-6ecd-4dc6-ba02-39ba107a174d swap

================================ Mount points: =================================

Device Mount_Point Type Options

/dev/sda2 / ext4 (rw,errors=remount-ro,commit=0)


=========================== sda2/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_gpt
insmod ext2
set root='(/dev/sda,gpt2)'
search --no-floppy --fs-uuid --set=root f87fd6d6-bfbd-4fc3-82a0-995fff67d5b6
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_gpt
insmod ext2
set root='(/dev/sda,gpt2)'
search --no-floppy --fs-uuid --set=root f87fd6d6-bfbd-4fc3-82a0-995fff67d5b6
set locale_dir=($root)/boot/grub/locale
set lang=en_US
insmod gettext
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 ###
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 2.6.38-10-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_gpt
insmod ext2
set root='(/dev/sda,gpt2)'
search --no-floppy --fs-uuid --set=root f87fd6d6-bfbd-4fc3-82a0-995fff67d5b6
linux /boot/vmlinuz-2.6.38-10-generic-pae root=UUID=f87fd6d6-bfbd-4fc3-82a0-995fff67d5b6 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-2.6.38-10-generic-pae
}
menuentry 'Ubuntu, with Linux 2.6.38-10-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_gpt
insmod ext2
set root='(/dev/sda,gpt2)'
search --no-floppy --fs-uuid --set=root f87fd6d6-bfbd-4fc3-82a0-995fff67d5b6
echo 'Loading Linux 2.6.38-10-generic-pae ...'
linux /boot/vmlinuz-2.6.38-10-generic-pae root=UUID=f87fd6d6-bfbd-4fc3-82a0-995fff67d5b6 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.38-10-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_gpt
insmod ext2
set root='(/dev/sda,gpt2)'
search --no-floppy --fs-uuid --set=root f87fd6d6-bfbd-4fc3-82a0-995fff67d5b6
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_gpt
insmod ext2
set root='(/dev/sda,gpt2)'
search --no-floppy --fs-uuid --set=root f87fd6d6-bfbd-4fc3-82a0-995fff67d5b6
linux16 /boot/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 ###
--------------------------------------------------------------------------------

=============================== sda2/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' 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
/dev/sda2 / ext4 errors=remount-ro 0 1
/dev/sda3 none swap sw 0 0
--------------------------------------------------------------------------------

=================== sda2: Location of files loaded by Grub: ====================

GiB - GB File Fragment(s)

1856.126016617 = 1993.000134656 boot/grub/core.img 1
872.308736801 = 936.634374144 boot/grub/grub.cfg 1
1.293382645 = 1.388759040 boot/initrd.img-2.6.38-10-generic-pae 2
0.919347763 = 0.987142144 boot/vmlinuz-2.6.38-10-generic-pae 1
1.293382645 = 1.388759040 initrd.img 2
0.919347763 = 0.987142144 vmlinuz 1

=============================== StdErr Messages: ===============================

xz: (stdin): Compressed data is corrupt