PDA

View Full Version : [lubuntu] Boot up "Read Error" (grub)



cci[RR]us
June 11th, 2012, 04:29 PM
I installed Ubuntu Precise Pangolin successfully. For some reason, it cannot boot into grub. There is only one line "Read Error" and then the system hangs.

One way to "fix" i.e. to get to the grub boot menu, is to plug in a disk drive. After I connecting an empty USB thumb drive and let the system boot up, it will boot into the grub that is installed on the hard disk.

I tried Boot-Repair as well as purging/reinstalling grub2 but all that did not help. Please check out my /boot/grub/grub.cfg below:

#
# 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='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root c5d3ee37-7ac1-4e2b-95a9-1a04023c0b5e
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 c5d3ee37-7ac1-4e2b-95a9-1a04023c0b5e
set locale_dir=($root)/boot/grub/locale
set lang=en_SG
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-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 c5d3ee37-7ac1-4e2b-95a9-1a04023c0b5e
linux /boot/vmlinuz-3.2.0-24-generic-pae root=UUID=c5d3ee37-7ac1-4e2b-95a9-1a04023c0b5e ro
initrd /boot/initrd.img-3.2.0-24-generic-pae
}
menuentry 'Ubuntu, with Linux 3.2.0-24-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 c5d3ee37-7ac1-4e2b-95a9-1a04023c0b5e
echo 'Loading Linux 3.2.0-24-generic-pae ...'
linux /boot/vmlinuz-3.2.0-24-generic-pae root=UUID=c5d3ee37-7ac1-4e2b-95a9-1a04023c0b5e ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.2.0-24-generic-pae
}
submenu "Previous Linux versions" {
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 c5d3ee37-7ac1-4e2b-95a9-1a04023c0b5e
linux /boot/vmlinuz-3.2.0-23-generic-pae root=UUID=c5d3ee37-7ac1-4e2b-95a9-1a04023c0b5e ro
initrd /boot/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 c5d3ee37-7ac1-4e2b-95a9-1a04023c0b5e
echo 'Loading Linux 3.2.0-23-generic-pae ...'
linux /boot/vmlinuz-3.2.0-23-generic-pae root=UUID=c5d3ee37-7ac1-4e2b-95a9-1a04023c0b5e ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/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/30_os-prober ###
### 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 ###

Thanks for helping! 8-)

wilee-nilee
June 11th, 2012, 04:32 PM
Post the HTTP address from the boot-repair being run; the bootinfo summary.

cci[RR]us
June 11th, 2012, 04:40 PM
# cat RESULTS.txt
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 (,msdos1)/boot/grub on this drive.

sda1: __________________________________________________ ________________________

File system: ext4
Boot sector type: Grub2 (v1.99)
Boot sector info: Grub2 (v1.99) is installed in the boot sector of sda1
and looks at sector 50793416 of the same hard drive
for core.img. core.img is at this location and looks
for (,msdos1)/boot/grub on this drive.
Operating System: Ubuntu 12.04 LTS
Boot files: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda2: __________________________________________________ ________________________

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

sda3: __________________________________________________ ________________________

File system: vfat
Boot sector type: FAT32
Boot sector info: According to the info in the boot sector, sda3 starts
at sector 0. But according to the info from fdisk,
sda3 starts at sector 63621120.
Operating System:
Boot files:

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

Drive: sda __________________________________________________ ___________________

Disk /dev/sda: 41.1 GB, 41110142976 bytes
255 heads, 63 sectors/track, 4998 cylinders, total 80293248 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 63,621,119 63,619,072 83 Linux
/dev/sda2 79,769,600 80,291,839 522,240 82 Linux swap / Solaris
/dev/sda3 63,621,120 79,769,599 16,148,480 b W95 FAT32


"blkid" output: __________________________________________________ ______________

Device UUID TYPE LABEL

/dev/sda1 c5d3ee37-7ac1-4e2b-95a9-1a04023c0b5e ext4
/dev/sda2 bf706d40-9037-4432-8543-6b23568adc69 swap
/dev/sda3 316A-DCB9 vfat

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

Device Mount_Point Type Options

/dev/sda1 / ext4 (rw,errors=remount-ro)


=========================== sda1/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='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root c5d3ee37-7ac1-4e2b-95a9-1a04023c0b5e
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 c5d3ee37-7ac1-4e2b-95a9-1a04023c0b5e
set locale_dir=($root)/boot/grub/locale
set lang=en_SG
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-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 c5d3ee37-7ac1-4e2b-95a9-1a04023c0b5e
linux /boot/vmlinuz-3.2.0-24-generic-pae root=UUID=c5d3ee37-7ac1-4e2b-95a9-1a04023c0b5e ro
initrd /boot/initrd.img-3.2.0-24-generic-pae
}
menuentry 'Ubuntu, with Linux 3.2.0-24-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 c5d3ee37-7ac1-4e2b-95a9-1a04023c0b5e
echo 'Loading Linux 3.2.0-24-generic-pae ...'
linux /boot/vmlinuz-3.2.0-24-generic-pae root=UUID=c5d3ee37-7ac1-4e2b-95a9-1a04023c0b5e ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.2.0-24-generic-pae
}
submenu "Previous Linux versions" {
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 c5d3ee37-7ac1-4e2b-95a9-1a04023c0b5e
linux /boot/vmlinuz-3.2.0-23-generic-pae root=UUID=c5d3ee37-7ac1-4e2b-95a9-1a04023c0b5e ro
initrd /boot/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 c5d3ee37-7ac1-4e2b-95a9-1a04023c0b5e
echo 'Loading Linux 3.2.0-23-generic-pae ...'
linux /boot/vmlinuz-3.2.0-23-generic-pae root=UUID=c5d3ee37-7ac1-4e2b-95a9-1a04023c0b5e ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/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/30_os-prober ###
### 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/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/sda1 during installation
UUID=c5d3ee37-7ac1-4e2b-95a9-1a04023c0b5e / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=130e1f8f-132b-45b1-bc0a-4fe87163c02e none swap sw 0 0
--------------------------------------------------------------------------------

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

GiB - GB File Fragment(s)

22.342956543 = 23.990566912 boot/grub/core.img 1
12.319377899 = 13.227831296 boot/grub/grub.cfg 1
1.805664062 = 1.938817024 boot/initrd.img-3.2.0-23-generic-pae 2
1.985351562 = 2.131755008 boot/initrd.img-3.2.0-24-generic-pae 2
24.193149567 = 25.977196544 boot/vmlinuz-3.2.0-23-generic-pae 1
1.185337067 = 1.272745984 boot/vmlinuz-3.2.0-24-generic-pae 1
1.805664062 = 1.938817024 initrd.img 2
1.805664062 = 1.938817024 initrd.img.old 2
24.193149567 = 25.977196544 vmlinuz 1

wilee-nilee
June 11th, 2012, 04:50 PM
Script looks good it sound like you have a method for getting in if this is the case get to the install and run these two commands.


sudo grub-install /dev/sda
Then

sudo update-grub

Have you used the grub-customizer here?

cci[RR]us
June 11th, 2012, 05:18 PM
I am able to boot into Ubuntu because I plugged in a disk drive (I stated this in the first post). This goes to show that grub has been installed correctly, just that the configuration is messed up.

I believe the fault has to do with the part set root='(hd0,msdos1)'. There is only one hard disk /dev/sda and it only has Ubuntu on it; there shouldn't be anything to do with "msdos".

wilee-nilee
June 11th, 2012, 05:20 PM
us;12017562']I am able to boot into Ubuntu because I plugged in a disk drive (I stated this in the first post). This goes to show that grub has been installed correctly, just that the configuration is messed up.


Yes and the commands should take care of this.

You can run a purge and reinstall as well from the desktop if needed.

So if you are going to second guess and not answer questions we are done here to be honest.

cci[RR]us
June 11th, 2012, 05:36 PM
Yes and the commands should take care of this.

You can run a purge and reinstall as well from the desktop if needed.

So if you are going to second guess and not answer questions we are done here to be honest.
As stated in my first post, I purged and reinstalled grub2. Hope you saw that. In any case, I did all that again as instructed by you, and still didn't work. And yes, I did all that while booted into the fully working Ubuntu Desktop.

I am not second guessing, avoid answering questions or not being honest. I'm not sure why you are so firm that I'm not trying my very best here. Do you need to me to make a video showing:

1. purge and reinstall grub
2. reboot
3. "Read Error"

drs305
June 11th, 2012, 05:41 PM
Have you checked the boot priorities in BIOS? Normally the BIOS is going to attempt to boot the first drive, and if that fails or is unavailable, moves on to the next.

I could see if a situation wherein the BIOS tries to boot the external and if it isn't there it doesn't try any other drive. This could be your situation if Grub is also installed on your external but points to your real install.

If Grub isn't on the external's MBR/boot sector, perhaps your internal drive isn't ready for reading initially and requires some time before it can be read...

wilee-nilee
June 11th, 2012, 05:45 PM
us;12017597']As stated in my first post, I purged and reinstalled grub2. Hope you saw that. In any case, I did all that again as instructed by you, and still didn't work. And yes, I did all that while booted into the fully working Ubuntu Desktop.

I am not second guessing, avoid answering questions or not being honest. I'm not sure why you are so firm that I'm not trying my very best here. Do you need to me to make a video showing:

1. purge and reinstall grub
2. reboot
3. "Read Error"

Have you run the two commands from the live ubuntu install?

You have not answered that request to run them yet, and if you have, not said so.

Have you used the grub-customizer? This question has not been answered

There could have been an error in using the tool, it requires you to run commands.

User errors are common I'm not saying there has been here, but in order for us to help we need too run through a list of possibilities, while not being seconded guessed.

This is my last post best of luck.

cci[RR]us
June 11th, 2012, 05:57 PM
Have you checked the boot priorities in BIOS? Normally the BIOS is going to attempt to boot the first drive, and if that fails or is unavailable, moves on to the next.

I could see if a situation wherein the BIOS tries to boot the external and if it isn't there it doesn't try any other drive. This could be your situation if Grub is also installed on your external but points to your real install.

If Grub isn't on the external's MBR/boot sector, perhaps your internal drive isn't ready for reading initially and requires some time before it can be read...
Finally, someone who is on the right track!!! :KS

Boot priority is correct. In any case, I also tried manual boot selection. I hit F12 to select the correct hard disk. Here are some results of different boot up configurations:

Scenario #1 - Ubuntu HDD; no other drives connected
Read Error

Scenario #2 - Ubuntu HDD + USB thumbdrive. BIOS boot menu shows two boot devices:
Scenario #2a - At BIOS boot menu, select Ubuntu HDD... Boots to the correct grub and then to the correct Ubuntu OS.
Scenario #2b - At BIOS boot menu, select USB thumbdrive. Nothing happens because the thumbdrive has no boot loaer.

Scenario #3 - Ubuntu HDD + Windows 7 HDD
Scenario #3a - At BIOS boot menu, select Ubuntu HDD... Read Error
Scenario #3b - At BIOS boot menu, select Windows 7 HDD... Boots into Windows 7.


Any clues?

drs305
June 11th, 2012, 06:09 PM
us;12017660']
Any clues?

It's strange. The only idea I have is trying to substitute another thumbdrive to be absolutely sure the contents of the original thumbdrive aren't playing a role. (I know the thumbdrive won't boot if selected, but this would guarantee that it is not involved in any way except that a device is plugged in).

If you want, as a moderator I could edit the thread title to remove (grub) and substitute BIOS, Grub/BIOS or Grub/BIOS/Hardware.

It may still be related to Grub but there is also a chance it is BIOS or hardware related.