PDA

View Full Version : [SOLVED] No grub after install



david1982
January 19th, 2012, 05:11 AM
Hi,

Here's my problem i installed Ubuntu 11.10, on my computer. Its a duel boot, I've already got win7 installed. The installation all appeared to go smoothly, at the end it restarted and booted straight to windows, no grub boot menu! I've looked around and saw a few other people with similar problems but I haven't been able to find a clear solution. I've ran duel boot win7/Ubuntu in the past and never experienced this issue.

I've ran a boot_info_script and the results.txt is below.

Any help would be greatly appreciated.

Thanks,
Dave.



Boot Info Script 0.60 from 17 May 2011


============================= 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 5 for .
=> Windows is installed in the MBR of /dev/sdb.
=> Syslinux MBR (4.04 and higher) is installed in the MBR of /dev/sdc.

sda1: __________________________________________________ ________________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: According to the info in the boot sector, sda1 starts
at sector 2048. But according to the info from fdisk,
sda1 starts at sector 63. According to the info in the
boot sector, sda1 has 1953519615 sectors, but
according to the info from fdisk, it has 1953523056
sectors.
Mounting failed:
sdb1: __________________________________________________ ________________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Mounting failed:
sdb2: __________________________________________________ ________________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Mounting failed:
sdb3: __________________________________________________ ________________________

File system: Extended Partition
Boot sector type: -
Boot sector info:

sdb5: __________________________________________________ ________________________

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

sdb6: __________________________________________________ ________________________

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

sdc1: __________________________________________________ ________________________

File system: vfat
Boot sector type: SYSLINUX 4.05 2011-12-09
Boot sector info: Syslinux looks at sector 4202592 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

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

Drive: sda __________________________________________________ ___________________

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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 1,953,523,119 1,953,523,057 42 SFS


Drive: sdb __________________________________________________ ___________________

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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 206,847 204,800 7 NTFS / exFAT / HPFS
/dev/sdb2 206,848 1,757,083,488 1,756,876,641 7 NTFS / exFAT / HPFS
/dev/sdb3 1,757,083,646 1,953,523,711 196,440,066 5 Extended
/dev/sdb5 1,757,083,648 1,940,961,279 183,877,632 83 Linux
/dev/sdb6 1,940,963,328 1,953,523,711 12,560,384 82 Linux swap / Solaris


Drive: sdc __________________________________________________ ___________________

Disk /dev/sdc: 7933 MB, 7933526016 bytes
68 heads, 4 sectors/track, 56967 cylinders, total 15495168 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 * 8,064 15,495,167 15,487,104 c W95 FAT32 (LBA)


"blkid" output: __________________________________________________ ______________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/loop1 f57759ce-69f3-e74e-bacc-3af4451b321e ext2 casper-rw
/dev/sda1 68DC923BDC92038A ntfs Storage
/dev/sdb1 2C86607186603D88 ntfs System Reserved
/dev/sdb2 847C61E27C61D00A ntfs
/dev/sdb5 df93ce5a-76c3-41d6-b693-986a18b7bfa2 ext4
/dev/sdb6 327b20a4-38e4-4afa-b337-050db115b3c5 swap
/dev/sdc1 120C-66DD vfat PENDRIVE

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

Device Mount_Point Type Options

/dev/loop0 /rofs squashfs (ro,noatime)
/dev/sdc1 /cdrom vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437, iocharset=iso8859-1,shortname=mixed,errors=remount-ro)


=========================== sdb5/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,msdos5)'
search --no-floppy --fs-uuid --set=root df93ce5a-76c3-41d6-b693-986a18b7bfa2
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set=root df93ce5a-76c3-41d6-b693-986a18b7bfa2
set locale_dir=($root)/boot/grub/locale
set lang=en_IE
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 ###
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.0.0-12-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set=root df93ce5a-76c3-41d6-b693-986a18b7bfa2
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=df93ce5a-76c3-41d6-b693-986a18b7bfa2 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry 'Ubuntu, with Linux 3.0.0-12-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set=root df93ce5a-76c3-41d6-b693-986a18b7bfa2
echo 'Loading Linux 3.0.0-12-generic ...'
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=df93ce5a-76c3-41d6-b693-986a18b7bfa2 ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.0.0-12-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,msdos5)'
search --no-floppy --fs-uuid --set=root df93ce5a-76c3-41d6-b693-986a18b7bfa2
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set=root df93ce5a-76c3-41d6-b693-986a18b7bfa2
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/sdb1)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 2C86607186603D88
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 ###
--------------------------------------------------------------------------------

=============================== sdb5/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/sdb5 during installation
UUID=df93ce5a-76c3-41d6-b693-986a18b7bfa2 / ext4 errors=remount-ro 0 1
# swap was on /dev/sdb6 during installation
UUID=327b20a4-38e4-4afa-b337-050db115b3c5 none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
--------------------------------------------------------------------------------

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

GiB - GB File Fragment(s)

= boot/grub/core.img 1
= boot/grub/grub.cfg 1
= boot/initrd.img-3.0.0-12-generic 1
= boot/vmlinuz-3.0.0-12-generic 1
= initrd.img 1
= vmlinuz 1

=========================== 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: Location of files loaded by Grub: ====================

GiB - GB File Fragment(s)

?? = ?? boot/grub/grub.cfg 1

================= sdc1: Location of files loaded by Syslinux: ==================

GiB - GB File Fragment(s)

?? = ?? ldlinux.sys 1
?? = ?? syslinux/chain.c32 1
?? = ?? syslinux/gfxboot.c32 1
?? = ?? syslinux/syslinux.cfg 1
?? = ?? syslinux/vesamenu.c32 1

============== sdc1: Version of COM32(R) files used by Syslinux: ===============

syslinux/chain.c32 : COM32R module (v4.xx)
syslinux/gfxboot.c32 : COM32R module (v4.xx)
syslinux/vesamenu.c32 : COM32R module (v4.xx)

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

unlzma: Decoder error
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
/home/ubuntu/Desktop/boot_info_script.sh: line 1579: [: 2.73495e+09: integer expression expected


My computer has an Asus motherboard (not sure if it makes a difference), but sure the more info i provide the better.

oldfred
January 20th, 2012, 02:43 AM
If you are booting into Windows, you must be booting sdb, but grub is in sda. Have you tried booting the other drive in BIOS or one time boot key (f12 on my system).

You also have SFS or dynamic partitions on sda. But you only have one partition?? Normally Windows converts to dynamic when you try to create more than 4 primary partitions. Linux does not work with dynamic partitions as they are proprietary to Windows. Some have reported that not all Windows tools for repair work either.

Dynamic volume is a Microsoft proprietary format developed together with Veritas (now acquired by Symantec) for logical volumes.
You can use a third-party tool, such as Partition Wizard MiniTool to convert a convert a dynamic disk to a basic disk without having to delete or format them.
The Partition Wizard software for Windows is supposed to be able to convert dynamic disks to regular partitions without data loss, so it may be what you need to get around this problem; however, I've never used it and so I can't be sure it will work.

Several users have used this, it has a liveCD download to use:
MiniTool Partition Wizard Professional Edition 5.2 to convert without loss of data the disk from dynamic disk to a basic disk.
also used Partition Wizard to set an existing partition logical instead of primary
http://www.partitionwizard.com/convertpartition/convert-to-basic-disk.html
Converted from dynamic with MiniTool, & repaired windows
http://ubuntuforums.org/showthread.php?t=1779529

david1982
January 21st, 2012, 07:02 PM
Oldfred thanks for the response. The dynamic disk is a second hard drive used only for storage. No OS or boot partitions on that that disk. I downloaded mini-tool and the main disk with Ubuntu and windows is set to basic. Still no sign of grub on start up. So unfortunately i'm no closer to a solution.

dino99
January 21st, 2012, 08:00 PM
boot on a livecd and open a terminal, then run:

sudo grub-install /dev/sdb
sudo update-grub

sudo reboot

oldfred
January 21st, 2012, 08:03 PM
From liveCD you cannot just install. That does work if booting from another install.

Yanni has created a easy way to download boot repair & run script:
HOWTO : easily create a Boot-Info summary
http://ubuntuforums.org/showthread.php?p=11164270
Boot Repair:
https://help.ubuntu.com/community/Boot-Repair
You can repair many boot issues with this or post the link to a run of boot info script so we can see your exact configuration. May be better to run the git/beta version of boot script as it has some fixes.

If you want to use liveCD to reinstall grub2's boot loader.

#Comments are anything after the #, enter commands in terminal session
#Install MBR from LiveCD/usb, Ubuntu install on sda5 and want grub2's bootloader in drive sda's MBR:
#Find linux partition, change sda5 if not correct:
sudo fdisk -l
#confirm that linux is sda5
sudo mount /dev/sda5 /mnt
sudo grub-install --root-directory=/mnt/ /dev/sda
#If grub 1.99 with Natty or later uses boot not root.
sudo grub-install --boot-directory=/mnt/boot /dev/sda

# If no errors on previous commands reboot into working system and run this:
sudo update-grub

david1982
January 21st, 2012, 09:33 PM
dino99,

i tried to run those commands and this was the output from the terminal after the first command: "/usr/sbin/grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?)."

oldfred,

I tried Boot-repair but it just hangs during the system scan during the install the terminal says:
"W: Failed to fetch cdrom://Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012)/dists/oneiric/Release Unable to find expected entry 'restricted/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)
E: Some index files failed to download. They have been ignored, or old ones used instead."

Could this be why boot-repair doesn't work?

oldfred
January 21st, 2012, 09:41 PM
Did you try the mount of sda5 and then grub install? You have to mount it first for the grub install to work.

Did the install fully complete? I have not seen the sources list still looking for the CD unless you want that on a non-Internet capable install. Did you have a wired Ethernet connected when you installed?

david1982
January 21st, 2012, 09:49 PM
Fred i followed the commands on your previous post, on restart grub version 1.99 starts. but i don't have any options to boot an OS. just a black screen with "Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists possible device or file completions.
grub>
"
So now i cant boot widows either.

david1982
January 21st, 2012, 10:04 PM
Guys thanks for all the help its finely working now,
So when i followed oldfred's instructions the first time round i also enterd: sudo grub-install --boot-directory=/mnt/boot /dev/sda. which caused the grub version 1.99 to be installed.

the situation was resolved when i entered just

sudo mount /dev/sda5 /mnt
sudo grub-install --root-directory=/mnt/ /dev/sda

Now on start up i get a grub menu to choose my OS. Thanks again for all the help.

oldfred
January 21st, 2012, 11:01 PM
Glad that worked.

Both are supposed to work with grub 1.99 but boot version is preferred for some reason? Maybe it has changed again.