PDA

View Full Version : [SOLVED] I've confused Grub2!! Help.



FraserG
March 21st, 2011, 07:36 PM
Newbie alert!!
I've built a system with windows 7 on one hard drive and Ubuntu 10.04 64bit on the other, and would like to choose OS on startup using Grub.
I installed each OS with only that drive connected in isolation. I then connected both drives and pointed the bios startup at the Ubuntu drive.
sudo os-prober sees the windows 7(loader) and sudo update-grub has given the windows option on startup.
However, when i choose windows in Grub I get 'error: no such device' and 'error:invalid signature'. Windows starts ok when the drive is chosen from the BIOS.

Hope someone can help. Thanks.

sikander3786
March 22nd, 2011, 07:48 PM
Welcome to the forums :-)

Please boot Ubuntu and run and post the output of bootinfoscript as per instructions here.

http://bootinfoscript.sourceforge.net

While posting, click the # icon in post menu and paste your text in between the generated [code] tags for readability purposes as this will be a long output.

It would help us diagnose any problems related to Grub.

FraserG
March 23rd, 2011, 02:22 PM
Thanks for your reply :)

Here is the output as requested.


Boot Info Script 0.55 dated February 15th, 2010

============================= Boot Info Summary: ==============================

=> Windows is installed in the MBR of /dev/sda
=> Grub 2 is installed in the MBR of /dev/sdb and looks at sector 2048 of the
same hard drive for core.img, but core.img can not be found at this
location.

sda1: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs: /bootmgr /Boot/BCD

sda2: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 7
Boot files/dirs: /Windows/System32/winload.exe

sdb1: __________________________________________________ _______________________

File system: Bios Boot Partition
Boot sector type: Unknown
Boot sector info:

sdb2: __________________________________________________ _______________________

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

sdb3: __________________________________________________ _______________________

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

=========================== 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 End Size Id System

/dev/sda1 * 2,048 206,847 204,800 7 HPFS/NTFS
/dev/sda2 206,848 1,953,521,663 1,953,314,816 7 HPFS/NTFS


Drive: sdb ___________________ __________________________________________________ ___

Disk /dev/sdb: 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 End Size Id System

/dev/sdb1 1 3,907,029,167 3,907,029,167 ee GPT


GUID Partition Table detected.

Partition Start End Size System
/dev/sdb1 2,048 4,095 2,048 Bios Boot Partition
/dev/sdb2 4,096 3,859,128,319 3,859,124,224 Linux or Data
/dev/sdb3 3,859,128,320 3,907,028,991 47,900,672 Linux Swap

blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/sda1 DE2871C628719DE9 ntfs System Reserved
/dev/sda2 82F8734DF8733E8B ntfs
/dev/sda: PTTYPE="dos"
/dev/sdb2 46d49d3a-ebb1-4c4c-abb1-64949b73229e ext4
/dev/sdb3 f08d3cd6-36f6-4aed-b411-e025e9819cc8 swap
/dev/sdb: PTTYPE="gpt"

============================ "mount | grep ^/dev output: ===========================

Device Mount_Point Type Options

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


=========================== sdb2/boot/grub/grub.cfg: ===========================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/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
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
}
insmod ext2
set root='(hd1,2)'
search --no-floppy --fs-uuid --set 46d49d3a-ebb1-4c4c-abb1-64949b73229e
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=1280x1024
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
insmod ext2
set root='(hd1,2)'
search --no-floppy --fs-uuid --set 46d49d3a-ebb1-4c4c-abb1-64949b73229e
set locale_dir=($root)/boot/grub/locale
set lang=en
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
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-30-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd1,2)'
search --no-floppy --fs-uuid --set 46d49d3a-ebb1-4c4c-abb1-64949b73229e
linux /boot/vmlinuz-2.6.32-30-generic root=UUID=46d49d3a-ebb1-4c4c-abb1-64949b73229e ro quiet splash nomodeset video=uvesafb:mode_option=1280x1024-24,mtrr=3,scroll=ywrap
initrd /boot/initrd.img-2.6.32-30-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-30-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd1,2)'
search --no-floppy --fs-uuid --set 46d49d3a-ebb1-4c4c-abb1-64949b73229e
echo 'Loading Linux 2.6.32-30-generic ...'
linux /boot/vmlinuz-2.6.32-30-generic root=UUID=46d49d3a-ebb1-4c4c-abb1-64949b73229e ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-30-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-28-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd1,2)'
search --no-floppy --fs-uuid --set 46d49d3a-ebb1-4c4c-abb1-64949b73229e
linux /boot/vmlinuz-2.6.32-28-generic root=UUID=46d49d3a-ebb1-4c4c-abb1-64949b73229e ro quiet splash nomodeset video=uvesafb:mode_option=1280x1024-24,mtrr=3,scroll=ywrap
initrd /boot/initrd.img-2.6.32-28-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-28-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd1,2)'
search --no-floppy --fs-uuid --set 46d49d3a-ebb1-4c4c-abb1-64949b73229e
echo 'Loading Linux 2.6.32-28-generic ...'
linux /boot/vmlinuz-2.6.32-28-generic root=UUID=46d49d3a-ebb1-4c4c-abb1-64949b73229e ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-28-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd1,2)'
search --no-floppy --fs-uuid --set 46d49d3a-ebb1-4c4c-abb1-64949b73229e
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd1,2)'
search --no-floppy --fs-uuid --set 46d49d3a-ebb1-4c4c-abb1-64949b73229e
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/sda1)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set de2871c628719de9
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 ###

=============================== sdb2/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
# / was on /dev/sda2 during installation
UUID=46d49d3a-ebb1-4c4c-abb1-64949b73229e / ext4 errors=remount-ro 0 1
# swap was on /dev/sda3 during installation
UUID=f08d3cd6-36f6-4aed-b411-e025e9819cc8 none swap sw 0 0

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


1514.1GB: boot/grub/core.img
908.6GB: boot/grub/grub.cfg
1514.2GB: boot/initrd.img-2.6.32-28-generic
4.0GB: boot/initrd.img-2.6.32-30-generic
1514.1GB: boot/vmlinuz-2.6.32-28-generic
1514.1GB: boot/vmlinuz-2.6.32-30-generic
4.0GB: initrd.img
1514.2GB: initrd.img.old
1514.1GB: vmlinuz
1514.1GB: vmlinuz.old
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader on sdb1

00000000 52 e8 28 01 74 08 56 be 33 81 e8 4c 01 5e bf f4 |R.(.t.V.3..L.^..|
00000010 81 66 8b 2d 83 7d 08 00 0f 84 e9 00 80 7c ff 00 |.f.-.}.......|..|
00000020 74 46 66 8b 1d 66 8b 4d 04 66 31 c0 b0 7f 39 45 |tFf..f.M.f1...9E|
00000030 08 7f 03 8b 45 08 29 45 08 66 01 05 66 83 55 04 |....E.)E.f..f.U.|
00000040 00 c7 04 10 00 89 44 02 66 89 5c 08 66 89 4c 0c |......D.f.\.f.L.|
00000050 c7 44 06 00 70 50 c7 44 04 00 00 b4 42 cd 13 0f |.D..pP.D....B...|
00000060 82 bb 00 bb 00 70 eb 68 66 8b 45 04 66 09 c0 0f |.....p.hf.E.f...|
00000070 85 a3 00 66 8b 05 66 31 d2 66 f7 34 88 54 0a 66 |...f..f1.f.4.T.f|
00000080 31 d2 66 f7 74 04 88 54 0b 89 44 0c 3b 44 08 0f |1.f.t..T..D.;D..|
00000090 8d 83 00 8b 04 2a 44 0a 39 45 08 7f 03 8b 45 08 |.....*D.9E....E.|
000000a0 29 45 08 66 01 05 66 83 55 04 00 8a 54 0d c0 e2 |)E.f..f.U...T...|
000000b0 06 8a 4c 0a fe c1 08 d1 8a 6c 0c 5a 52 8a 74 0b |..L......l.ZR.t.|
000000c0 50 bb 00 70 8e c3 31 db b4 02 cd 13 72 50 8c c3 |P..p..1.....rP..|
000000d0 8e 45 0a 58 c1 e0 05 01 45 0a 60 1e c1 e0 03 89 |.E.X....E.`.....|
000000e0 c1 31 ff 31 f6 8e db fc f3 a5 1f e8 3e 00 74 06 |.1.1........>.t.|
000000f0 be 3b 81 e8 63 00 61 83 7d 08 00 0f 85 1d ff 83 |.;..c.a.}.......|
00000100 ef 0c e9 0f ff e8 24 00 74 06 be 3d 81 e8 49 00 |......$.t..=..I.|
00000110 5a ea 00 82 00 00 be 40 81 e8 3d 00 eb 06 be 45 |Z......@..=....E|
00000120 81 e8 35 00 be 4a 81 e8 2f 00 eb fe bb 17 04 80 |..5..J../.......|
00000130 27 03 c3 6c 6f 61 64 69 6e 67 00 2e 00 0d 0a 00 |'..loading......|
00000140 47 65 6f 6d 00 52 65 61 64 00 20 45 72 72 6f 72 |Geom.Read. Error|
00000150 00 bb 01 00 b4 0e cd 10 46 8a 04 3c 00 75 f2 c3 |........F..<.u..|
00000160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000001f0 00 00 00 00 01 08 00 00 00 00 00 00 2f 00 20 08 |............/. .|
00000200



Thanks.

kansasnoob
March 23rd, 2011, 03:58 PM
This may (or may not) be helpful:

http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:GTP_MS_DOS

FraserG
March 23rd, 2011, 06:28 PM
Thank you. That's solved my problem! :D

These forums are a great resource for a newcomer. I have managed to iron out some other small issues just by searching them.