PDA

View Full Version : [ubuntu] 11.04 / W7 dual boot installatiion failed



swimon
July 20th, 2011, 12:23 AM
Hello everybody,

First I installed windows 7 on a clean new hdd.

Then I ran the 11.04 livecd and choose the option "install alongside windows 7"

But when I rebooted, there was no Grub. It just bootet windows everytime.

Then I followed the instructions I found on this site: http://askubuntu.com/questions/24479/no-grub-after-installing-ubuntu-10-10-beside-windows-7-straight-to-windows

But now I get a different error: "file not found ... entering grub rescue "

So what went wrong? Can I fix this, or would it be easier just to start all over again?

Grtz

Quackers
July 20th, 2011, 06:15 AM
Please boot from the Ubuntu Live cd/usb and select "try ubuntu" then when the desktop is loaded make sure you have an internet connection and go to the site below and download the boot script. This will give you a zip file which should be extracted in the same directory as it was downloaded. This produces a folder which contains the script and a changelog file.
You then need to cd to that directory in the terminal (for example
cd Downloads/boot_info_script060 if you downloaded it to your Downloads folder). You don't need to do that if you downloaded it to your home folder.
Then enter

sudo bash boot_info_script.sh

This will produce a results.txt file in the same directory as the downloaded boot script. Please copy the contents of that file and paste them in your next post between CODE tags. For CODE tags click on New Reply (not quick reply)and then click on the # symbol in the toolbar.
This will give a full overview of your current system.
Thanks.

http://bootinfoscript.sourceforge.net/

swimon
July 20th, 2011, 02:17 PM
Hello and thanks!

I've copy pasted the results as you requested below.

Also got this message when I ran the script: ""gawk" could not be found, using "busybox awk" instead.
This may lead to unreliable results."

Maybe I'll also describe how I partitioned my HDD, if that makes it easier for you.
1. I installed windows 7 first, I created a 13Gb NTFS partition and left the rest of the disk unused. (I think this is sda2)

2. The windows installer said it needed to create a small partition. (Didn't tell me what for, but I assume this is sda1)

3. Ran Ubuntu LiveCD, choose option 'install alongside windows 7', then 'automatic partitioning'.

4. Windows bootet automatically when I rebooted, there was no GRUB

5. Tried the advice I read on this site http://askubuntu.com/questions/24479...ght-to-windows, after reboot got some message like: 'file not found, entering grub rescue'

6. Followed your instructions ;) So that's were we are right now :)

Thanks, Grtz!


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
for (,msdos1)/boot/grub on this drive.

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: /bootmgr /Boot/BCD /boot/grub/core.img

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: /Windows/System32/winload.exe

sda3: __________________________________________________ ________________________

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

sda5: __________________________________________________ ________________________

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

sda6: __________________________________________________ ________________________

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

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

Drive: sda __________________________________________________ ___________________

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 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 206,847 204,800 7 NTFS / exFAT / HPFS
/dev/sda2 206,848 32,974,847 32,768,000 7 NTFS / exFAT / HPFS
/dev/sda3 32,976,894 625,141,759 592,164,866 5 Extended
/dev/sda5 32,976,896 618,868,735 585,891,840 83 Linux
/dev/sda6 618,870,784 625,141,759 6,270,976 82 Linux swap / Solaris


"blkid" output: __________________________________________________ ______________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/mmcblk0p1 3735-6666 vfat
/dev/sda1 A6F88FC5F88F926B ntfs System Reserved
/dev/sda2 2AF8CB2DF8CAF5DB ntfs
/dev/sda5 bfda4789-cc53-413f-b7bc-1e93c5302673 ext4
/dev/sda6 5954d8d3-d087-4dad-9b0a-406dee1f87a6 swap

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

Device Mount_Point Type Options

/dev/loop0 /rofs squashfs (ro,noatime)
/dev/sr0 /cdrom iso9660 (ro,noatime)


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

GiB - GB File Fragment(s)

?? = ?? boot/grub/core.img 1

=========================== sda5/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='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root bfda4789-cc53-413f-b7bc-1e93c5302673
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root bfda4789-cc53-413f-b7bc-1e93c5302673
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-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root bfda4789-cc53-413f-b7bc-1e93c5302673
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=bfda4789-cc53-413f-b7bc-1e93c5302673 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-8-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root bfda4789-cc53-413f-b7bc-1e93c5302673
echo 'Loading Linux 2.6.38-8-generic ...'
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=bfda4789-cc53-413f-b7bc-1e93c5302673 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.38-8-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='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root bfda4789-cc53-413f-b7bc-1e93c5302673
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root bfda4789-cc53-413f-b7bc-1e93c5302673
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)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(/dev/sda,msdos1)'
search --no-floppy --fs-uuid --set=root A6F88FC5F88F926B
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 ###
--------------------------------------------------------------------------------

=============================== sda5/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/sda5 during installation
UUID=bfda4789-cc53-413f-b7bc-1e93c5302673 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
UUID=5954d8d3-d087-4dad-9b0a-406dee1f87a6 none swap sw 0 0
--------------------------------------------------------------------------------

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

GiB - GB File Fragment(s)

91.951526642 = 98.732199936 boot/grub/core.img 1
219.862991333 = 236.076089344 boot/grub/grub.cfg 1
16.888671875 = 18.134073344 boot/initrd.img-2.6.38-8-generic 2
91.949798584 = 98.730344448 boot/vmlinuz-2.6.38-8-generic 1
16.888671875 = 18.134073344 initrd.img 2
91.949798584 = 98.730344448 vmlinuz 1

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

unlzma: Decoder error

Quackers
July 20th, 2011, 04:17 PM
Thanks.
Grub is where it should be but it is looking in the wrong place for its files (sda1 instead of sda5).
We can try to re-install grub the short way first.
Boot from the live cd and select "try Ubuntu".
When the desktop loads please open up a terminal and copy/paste these comands, one at a time pressing enter after each line.
sudo mount /dev/sda5 /mnt
sudo grub-install --root-directory=/mnt /dev/sda
If no errors are reported please reboot taking out the cd before it restarts.
This time Ubuntu should boot directly.
If it does please run this in the terminal
sudo update-grub where you should see the Windows Loader recognised as grub.cfg is run. If that is the case, reboot and you should now see a grub menu giving you the choice of which OS to boot.

swimon
July 20th, 2011, 04:34 PM
thanks man, you're awesome, worked like a charm.

after I entered the first 2 commands and rebooted, I already saw the GRUB boot menu.

I now entered the update command and got this result:


Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.38-8-generic
Found initrd image: /boot/initrd.img-2.6.38-8-generic
Found memtest86+ image: /boot/memtest86+.bin
ls: cannot access /var/lib/os-prober/mount/boot
Boot: No such file or directory
done


There seems to be some errors there, but I'm going to reboot now and see if everything is still fine.

Grtz

Edit: Before I ran 'sudo grub-update' I saw Windows 7 in the GRUB boot list, after that command I can only see 2 ubuntu options, and 2 memtest options in the boot list.

I'll post another boot info script thingy :)

Edit2: New Boot Info Script Output


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
for (,msdos5)/boot/grub on this drive.

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: /bootmgr /Boot/BCD /boot/grub/core.img

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: /Windows/System32/winload.exe

sda3: __________________________________________________ ________________________

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

sda5: __________________________________________________ ________________________

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

sda6: __________________________________________________ ________________________

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

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

Drive: sda __________________________________________________ ___________________

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 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 206,847 204,800 7 NTFS / exFAT / HPFS
/dev/sda2 206,848 32,974,847 32,768,000 7 NTFS / exFAT / HPFS
/dev/sda3 32,976,894 625,141,759 592,164,866 5 Extended
/dev/sda5 32,976,896 618,868,735 585,891,840 83 Linux
/dev/sda6 618,870,784 625,141,759 6,270,976 82 Linux swap / Solaris


"blkid" output: __________________________________________________ ______________

Device UUID TYPE LABEL

/dev/mmcblk0p1 3735-6666 vfat
/dev/sda1 A6F88FC5F88F926B ntfs System Reserved
/dev/sda2 2AF8CB2DF8CAF5DB ntfs
/dev/sda5 bfda4789-cc53-413f-b7bc-1e93c5302673 ext4
/dev/sda6 5954d8d3-d087-4dad-9b0a-406dee1f87a6 swap

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

Device Mount_Point Type Options

/dev/mmcblk0p1 /media/3735-6666 vfat (rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000, shortname=mixed,dmask=0077,utf8=1,showexec,flush)
/dev/sda5 / ext4 (rw,errors=remount-ro,commit=0)


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

GiB - GB File Fragment(s)

?? = ?? boot/grub/core.img 1

=========================== sda5/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='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root bfda4789-cc53-413f-b7bc-1e93c5302673
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root bfda4789-cc53-413f-b7bc-1e93c5302673
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-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root bfda4789-cc53-413f-b7bc-1e93c5302673
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=bfda4789-cc53-413f-b7bc-1e93c5302673 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-8-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root bfda4789-cc53-413f-b7bc-1e93c5302673
echo 'Loading Linux 2.6.38-8-generic ...'
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=bfda4789-cc53-413f-b7bc-1e93c5302673 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.38-8-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='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root bfda4789-cc53-413f-b7bc-1e93c5302673
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root bfda4789-cc53-413f-b7bc-1e93c5302673
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### 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 ###
--------------------------------------------------------------------------------

=============================== sda5/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/sda5 during installation
UUID=bfda4789-cc53-413f-b7bc-1e93c5302673 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
UUID=5954d8d3-d087-4dad-9b0a-406dee1f87a6 none swap sw 0 0
--------------------------------------------------------------------------------

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

GiB - GB File Fragment(s)

91.949977875 = 98.730536960 boot/grub/core.img 1
52.019382477 = 55.855386624 boot/grub/grub.cfg 1
16.888671875 = 18.134073344 boot/initrd.img-2.6.38-8-generic 2
91.949798584 = 98.730344448 boot/vmlinuz-2.6.38-8-generic 1
16.888671875 = 18.134073344 initrd.img 2
91.949798584 = 98.730344448 vmlinuz 1

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

unlzma: Decoder error

Quackers
July 20th, 2011, 04:39 PM
Good luck then :-)
update-grub shouldn't say that.

swimon
July 20th, 2011, 05:00 PM
What do you mean?

Any idea how to fix this? I posted another Boot Info Output in my previous post.

It worked fine before I ran sudo update-grub, but now Windows 7 still isn't showing in the GRUB menu.

Thanks, Grtz

Quackers
July 20th, 2011, 05:02 PM
Not sure.
In the terminal please run
sudo os-prober and post the output.

oldfred
July 20th, 2011, 05:13 PM
You put part of grub into the window boot partition sda1. Now both windows and the os-prober are confused if sda1 is windows or grub.

Boot files: /bootmgr /Boot/BCD /boot/grub/core.img

Windows is not case sensitive like Linux. You need to delete /boot folder but be careful not to delete the /Boot that has the essential BCD file.

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

swimon
July 20th, 2011, 05:18 PM
Not sure.
In the terminal please run
sudo os-prober and post the output.

another error...


simon@Jefferson:~$ sudo os-prober
ls: cannot access /var/lib/os-prober/mount/boot
Boot: No such file or directory



You put part of grub into the window boot partition sda1. Now both windows and the os-prober are confused if sda1 is windows or grub.

Boot files: /bootmgr /Boot/BCD /boot/grub/core.img

Windows is not case sensitive like Linux. You need to delete /boot folder but be careful not to delete the /Boot that has the essential BCD file.

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

should I still try you're solution after that error I just encountered?

Grtz

Quackers
July 20th, 2011, 05:18 PM
Well spotted oldfred :-)
Poor confused grub :-)

Oldfred's instructions should take care of the sudo update-grub problem. Take care to only delete the boot folder referring to grub, NOT Windows

swimon
July 20th, 2011, 05:28 PM
Haha poor GRUB :)

I'll try it now, report back later

Grtz

EDIT

Okay, everything is how it should be now, thanks Quakers en Oldfred!

Grtz

JASONFUSARO
July 20th, 2011, 05:45 PM
What do you mean?

Any idea how to fix this? I posted another Boot Info Output in my previous post.

It worked fine before I ran sudo update-grub, but now Windows 7 still isn't showing in the GRUB menu.

Thanks, Grtz



If you take a look at both scripts you'll notice this difference

script #1


### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(/dev/sda,msdos1)'
search --no-floppy --fs-uuid --set=root A6F88FC5F88F926B
chainloader +1
} ### END /etc/grub.d/30_os-prober ###

script #2

as you can see there is nothing there



### BEGIN /etc/grub.d/30_os-prober ### ###
END /etc/grub.d/30_os-prober ###

this

menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(/dev/sda,msdos1)'
search --no-floppy --fs-uuid --set=root A6F88FC5F88F926B
chainloader +1
}

needs to get into here


### 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 ###




copy it and paste it and make sure 40_custom's executable flag is set

just use file mangers properties on the file and check the permissions.



or if you are never going to add another distro you could just add it to grub.cfg
as a menuentry by just pasting it there.

THIS IS A COPY OF MY grub.cfg JUST TO SHOW AN EXAMPLE



#insmod part_gpt
#insmod part_msdos
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 load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}

set menu_color_normal=black/white
set menu_color_highlight=white/red

insmod part_msdos
insmod ext2
set gfxmode=640x480
set root='(hd0,msdos10)'
search --no-floppy --fs-uuid --set=root ee7be487-f281-4072-9af3-72612c9a684c
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
#set root='(hd0,msdos10)'
search --no-floppy --fs-uuid --set=root /dev/sda2
#search --no-floppy --fs-uuid --set=root /dev/sda10
set locale_dir=($root)/boot/grub/locale
set lang=en_US
insmod gettext
fi
terminal_input console
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set=root 1337-6DBF
load_video
##############insmod jpeg
terminal gfxterm
insmod png
background_image -m /boot/grub/1110.png
set timeout=95
### END /etc/grub.d/00_header ###


***********************************IN RED IS MINE
***********************************IN BLUE IS YOURS

THERE IS NO DIFFERENCE BUT WINDOWS VERSION

YOU NEED TO GET YOURS INTO YOUR grub.cfg

either through custom or just modifying your grub.cfg

custom you wil have to do another update-grub as before cut and paste simply do that and reboot

### BEGIN /etc/grub.d/42_NEW_Chakra_Distros ###
menuentry "Windows Vista (loader) (on /dev/sda1)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root C65A6C105A6C0013
chainloader +1
}

THIS IS YOURS DO YOU SEE THAT THERE IS NOT MUCH DIFFERENCE EXCEPT FOR WINDOWS VERSION

menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os { insmod part_msdos
insmod ntfs
set root='(/dev/sda,msdos1)'
search --no-floppy --fs-uuid --set=root A6F88FC5F88F926B
chainloader +1
}

menuentry "-" {
set
}

menuentry "Chakra Linux, with Linux vmlinuz26 Fallback (on /dev/sda5)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
#search --no-floppy --fs-uuid --set=root ca7b9adc-9887-496c-a1ad-a3a5ec4f3cf6
linux /boot/vmlinuz26 root=/dev/sda5 ro quiet
#/dev/disk/by-uuid/ca7b9adc-9887-496c-a1ad-a3a5ec4f3cf6 ro quiet
initrd /boot/kernel26.img
}
menuentry "-" {
set
}

menuentry 'UbuntuStudio 64 bit on sda6, with Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {

insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
#search --no-floppy --fs-uuid --set=root c7e7c5c2-09fe-4db4-8633-554f90059f45
linux /boot/vmlinuz-2.6.38-8-generic root=/dev/sda6 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-2.6.38-8-generic
}

menuentry "CtkArch Linux (on /dev/sda7)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
#search --no-floppy --fs-uuid --set=root 0920168c-5419-4412-8134-713ed2c3814c
#linux /boot/vmlinuz26 root=/dev/disk/by-uuid/0920168c-5419-4412-8134-713ed2c3814c ro quiet resume=/dev/disk/by-uuid/759ac79d-c3af-49f4-ae9a-19a2e3464a02
linux /boot/vmlinuz26 root=/dev/sda7 ro quiet
#resume=/dev/disk/by-uuid/759ac79d-c3af-49f4-ae9a-19a2e3464a02
initrd /boot/kernel26.img
}

menuentry "ArchBang Linux, with Linux vmlinuz26" --class archlinux --class gnu-linux --class gnu --class os {
#load_video
#set gfxpayload=keep
#insmod gzio
#insmod part_msdos
#insmod ext2
set root='(hd0,msdos8)'
#search --no-floppy --fs-uuid --set=root /dev/sda8 #ee7be487-f281-4072-9af3-72612c9a684c
#echo 'Loading ArchBang Linux kernel vmlinuz26 ...'
linux /boot/vmlinuz26-patched root=/dev/sda8 ro quiet
#echo 'Loading initial ramdisk ...'
initrd /boot/kernel26-patched.img
}
menuentry "Ultimate, with Linux 2.6.35-25-generic (on /dev/sda9)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos9)'
#search --no-floppy --fs-uuid --set=root /dev/sda9 #52777f50-fd1d-42d8-9a17-5ad1ddf0b794
#linux /boot/vmlinuz-2.6.35-25-generic root=UUID=52777f50-fd1d-42d8-9a17-5ad1ddf0b794 ro quiet splash
linux /boot/vmlinuz-2.6.35-30-generic root=/dev/sda9 ro quiet splash
initrd /boot/initrd.img-2.6.35-30-generic
}

menuentry "Toorox Gnome 64 bit (on /dev/sda10)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos10)'
#search --no-floppy --fs-uuid --set=root /dev/sda10 #91033a5b-7407-4a80-b1aa-07ff96202ee3
linux /boot/vmlinuz root=/dev/sda10 nomce noapic lang=us
}
menuentry "Puppy, with Linux (on /dev/sda11)" --class gnu-linux --class gnu --class os {
'insmod part_msdos
'insmod ext2
set root='(hd0,msdos11)'
#search --no-floppy --fs-uuid --set=root /dev/sda11 #856f3983-f4e9-45da-b500-e199fefbbad1
linux /boot/vmlinuz root=/dev/sda11 pmedia=atahd

}
menuentry "Zorin, (Software design Pkgs) with Linux (on /dev/sda12)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos12)'
#search --no-floppy --fs-uuid --set=root /dev/sda12 #06ca0e47-d483-4dbe-bfe8-4656dc6cd0eb
linux /boot/vmlinuz-2.6.38-8-generic root=/dev/sda12 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-2.6.38-8-generic
}

### END /etc/grub.d/42_NEW_Chakra_Distros ###


*****NOTE******

I AM ALSO NEW AT THIS SO IF YOU JUST WAN"T TO ANALYZE WHAT I STATE AND WAIT FOR SOMEONE MORE EXPERIENCED TO CONCUR THATS FINE.

BACK UP grub.cfg before doing anything to it
if you modify /etc/grub.d/40_custom MAKE A BACKUP COPY OF THAT FIRST ALSO, IT IS ALWAYS A VERY GOOD IDEA TO BACKUP ANYTHING BEFORE MAKING A CHANGE



ALSO I HAVE A TENDENCY TO CONFUSE ISSUES AND COMPLICATE THINGS I HAVE BEEN TOLD SO IF YOU ARE CONFUSED ABOUT WHAT I POSTED IGNORE IT COMPLETELY AND DO NOT DO ANYTHING TO ANY OF YOUR FILES< ALWAYS BETTER TO BE SAFE THAN SORRY

Quackers
July 20th, 2011, 05:53 PM
Glad to hear that swimon :-)

JASONFUSARO your analysis is correct. The menu entry is missing because update-grub is confused by the /boot/grub/core.img file's presence in sda1.
Your suggestion regarding 40_custom file would work, but it's better to get things working as they should do, if possible.
However, editing grub.cfg directly is not encouraged as the changes you make to that file are over-written every time grub is updated.

oldfred
July 20th, 2011, 05:58 PM
@swimon
Glad you got it working.:)

@JASONFUSARO
With grub legacy the windows prober often did not work adn we did have to add manual windows boot stanzas.
With grub2's os-prober it seems to work all the time except when there are other errors. Then adding a manual entry often still does not work as the other error still exists.

Quackers beat me to it.:)

JASONFUSARO
July 20th, 2011, 06:02 PM
Glad to hear that swimon :-)

JASONFUSARO your analysis is correct. The menu entry is missing because update-grub is confused by the /boot/grub/core.img file's presence in sda1.
Your suggestion regarding 40_custom file would work, but it's better to get things working as they should do, if possible.
However, editing grub.cfg directly is not encouraged as the changes you make to that file are over-written every time grub is updated.



I understand update-grub in version grub2 simply executes
grub-mkconfig -o /boot/grub/grub.cfg which overwrites the grub.cfg file so any subsequent update-grub calls overwrite the prior changes.

JASONFUSARO
July 20th, 2011, 06:10 PM
Apparently this problem has come up in the past

OS-prober: cannot access /var/lib/os-prober/mount/boot

search that on UbuntuForums and it was apparently solved

JASONFUSARO
July 20th, 2011, 06:17 PM
the only apparent difference I can spot is



- navigate to /mnt in nautilus and delete /boot folder. WARNING: do not delete the
/Boot folder since it contains files needed by Windows to boot properly.


sudo umount /mnt



which in the solved thread is entered before the umount command


in comparisson to page2 #4 this thread

Quackers
July 20th, 2011, 06:19 PM
Just a different way to delete the same file I suspect.

JASONFUSARO
July 20th, 2011, 06:28 PM
][/B]
Re: OS-prober: cannot access /var/lib/os-prober/mount/boot
Quote:
Originally Posted by meierfra. http://ubuntuforums.org/images/buttons/viewpost.gif (http://ubuntuforums.org/showthread.php?p=8708802#post8708802)
You have a "Boot" and "boot" folder on /dev/sda3. This leads to confusion since "ntfs" partitions are case insensitive. See this link for the details:

https://sourceforge.net/apps/mediawi...ore_On_Windows (https://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:Core_On_Windows)

Thanks for this. I love fixing problems in Debian by going to Ubuntu forums :wink:

JASONFUSARO
July 20th, 2011, 06:42 PM
What happened to the OP swimon, any luck yet??

Quackers
July 20th, 2011, 06:43 PM
He edited an earlier post to say everything was now fixed.

swimon
July 20th, 2011, 08:04 PM
Yeps,

Everything works fine now after I deleted the /boot folder (leaving the /Boot folder intact).


I'm a bit hesitant to try any of the other solutions mentioned by you guys, I'm afraid I'll break it again :)

Thanks again, Grtz!

swimon
July 24th, 2011, 09:57 PM
Hi,

I'm back :)

Since I messed around a little bit in Ubuntu, I decided it was best to start with a clean slate and do a full reinstallation.

At first a got an error message and GRUB woulnd't load. I was able to fix that, by installing GRUB on the right partition.

So now I have my grub boot menu back. The only problem is Windows 7 won't boot. Possibly the same error that caused my Ubuntu partition not to boot. But I have no idea how to fix this.

I made another Boot Info Script output:

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
for (,msdos7)/boot/grub on this drive.

sda1: __________________________________________________ ________________________

File system: ntfs
Boot sector type: Grub2 (v1.99)
Boot sector info: Grub2 (v1.99) is installed in the boot sector of sda1
and looks at sector 590779592 of the same hard drive
for core.img, but core.img can not be found at this
location. No errors found in the Boot Parameter Block.
Operating System:
Boot files: /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: /Windows/System32/winload.exe

sda3: __________________________________________________ ________________________

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

sda5: __________________________________________________ ________________________

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

sda6: __________________________________________________ ________________________

File system: ext3
Boot sector type: -
Boot sector info:
Operating System:
Boot files:

sda7: __________________________________________________ ________________________

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

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

Drive: sda __________________________________________________ ___________________

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 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 206,847 204,800 7 NTFS / exFAT / HPFS
/dev/sda2 206,848 32,974,847 32,768,000 7 NTFS / exFAT / HPFS
/dev/sda3 32,978,942 625,141,759 592,162,818 5 Extended
/dev/sda5 618,870,784 625,141,759 6,270,976 82 Linux swap / Solaris
/dev/sda6 32,978,944 586,059,775 553,080,832 83 Linux
/dev/sda7 586,061,824 618,860,543 32,798,720 83 Linux


"blkid" output: __________________________________________________ ______________

Device UUID TYPE LABEL

/dev/sda1 A6F88FC5F88F926B ntfs System Reserved
/dev/sda2 2AF8CB2DF8CAF5DB ntfs
/dev/sda5 5954d8d3-d087-4dad-9b0a-406dee1f87a6 swap
/dev/sda6 3cd9bd66-b8bb-49d7-be7d-3d1bd951117e ext3
/dev/sda7 855171df-6183-4704-9859-92fb5932d328 ext4

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

Device Mount_Point Type Options

/dev/sda6 /home ext3 (rw,commit=0)
/dev/sda7 / ext4 (rw,errors=remount-ro,commit=0)


=========================== sda7/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='(/dev/sda,msdos7)'
search --no-floppy --fs-uuid --set=root 855171df-6183-4704-9859-92fb5932d328
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos7)'
search --no-floppy --fs-uuid --set=root 855171df-6183-4704-9859-92fb5932d328
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' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos7)'
search --no-floppy --fs-uuid --set=root 855171df-6183-4704-9859-92fb5932d328
linux /boot/vmlinuz-2.6.38-10-generic root=UUID=855171df-6183-4704-9859-92fb5932d328 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-2.6.38-10-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-10-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos7)'
search --no-floppy --fs-uuid --set=root 855171df-6183-4704-9859-92fb5932d328
echo 'Loading Linux 2.6.38-10-generic ...'
linux /boot/vmlinuz-2.6.38-10-generic root=UUID=855171df-6183-4704-9859-92fb5932d328 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.38-10-generic
}
submenu "Previous Linux versions" {
menuentry 'Ubuntu, with Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos7)'
search --no-floppy --fs-uuid --set=root 855171df-6183-4704-9859-92fb5932d328
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=855171df-6183-4704-9859-92fb5932d328 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-8-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos7)'
search --no-floppy --fs-uuid --set=root 855171df-6183-4704-9859-92fb5932d328
echo 'Loading Linux 2.6.38-8-generic ...'
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=855171df-6183-4704-9859-92fb5932d328 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.38-8-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='(/dev/sda,msdos7)'
search --no-floppy --fs-uuid --set=root 855171df-6183-4704-9859-92fb5932d328
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos7)'
search --no-floppy --fs-uuid --set=root 855171df-6183-4704-9859-92fb5932d328
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)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(/dev/sda,msdos1)'
search --no-floppy --fs-uuid --set=root A6F88FC5F88F926B
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 ###
--------------------------------------------------------------------------------

=============================== sda7/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/sda7 / ext4 errors=remount-ro 0 1
/dev/sda6 /home ext3 defaults 0 2
/dev/sda5 none swap sw 0 0
--------------------------------------------------------------------------------

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

GiB - GB File Fragment(s)

281.700027466 = 302.473101312 boot/grub/core.img 1
279.677021027 = 300.300914688 boot/grub/grub.cfg 1
281.405525208 = 302.156881920 boot/initrd.img-2.6.38-10-generic 1
280.862304688 = 301.573603328 boot/initrd.img-2.6.38-8-generic 2
280.436832428 = 301.116755968 boot/vmlinuz-2.6.38-10-generic 1
281.704452515 = 302.477852672 boot/vmlinuz-2.6.38-8-generic 1
281.405525208 = 302.156881920 initrd.img 1
280.862304688 = 301.573603328 initrd.img.old 2
280.436832428 = 301.116755968 vmlinuz 1
281.704452515 = 302.477852672 vmlinuz.old 1

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

unlzma: Decoder error

Grtz

Quackers
July 24th, 2011, 10:05 PM
You've installed grub to sda1. That's not a good place for it to be - in an NTFS partition! It's now messing with Windows first two boot files and Windows doesn't know what to do - hence the boot failure.
You will need to repair the Windows bootloader with a Windows repair disc/installation disc which should get Windows booting directly.
Then you will need to re-install grub to the mbr of the drive - NOT a partition!

oldfred
July 24th, 2011, 10:32 PM
There also is a backup bootsector saved by windows. If you only installed once the backup still should be the windows version. If you can boot into Ubuntu can download testdisk there or use liveCD & download it.

Fix for most, a few have other issues, better than windows fix in many cases as it also fixes other parameters:
This has instructions on using testdisk to repair the install of grub to the boot sector for windows from Ubuntu or Linux LiveCD.
http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:Boot_Sector
Also check for /boot/grub in addition to /Boot

swimon
July 24th, 2011, 10:38 PM
Thanks guys,

I'll try the testdisk method first!

Grtz!

swimon
July 24th, 2011, 11:00 PM
That already fixed it! :)

Although that wiki page has a little error in it:



First screen: Select "No Log" and press enter.
Second screen: Select the hard drive containing the Windows system partition and choose "proceed".
Third screen: "intel"
Fourth screen: "advanced",
Fifth screen: Select the Windows system partition and choose "boot"
Sixth screen: "BackupBS"
Seventh screen: type "Y" to confirm


At the fifth step I actually needed to select the small 'system reserved' NTFS partition instead of the partition where windows was installed.

I don't know if you have rights to edit that wiki page or not?

Anyway, thanks again you two ;)

Grtz!

edit: new boot info script (mainly for myself :D)

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
for (,msdos7)/boot/grub on this drive.

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: /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: /Windows/System32/winload.exe

sda3: __________________________________________________ ________________________

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

sda5: __________________________________________________ ________________________

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

sda6: __________________________________________________ ________________________

File system: ext3
Boot sector type: -
Boot sector info:
Operating System:
Boot files:

sda7: __________________________________________________ ________________________

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

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

Drive: sda __________________________________________________ ___________________

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 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 206,847 204,800 7 NTFS / exFAT / HPFS
/dev/sda2 206,848 32,974,847 32,768,000 7 NTFS / exFAT / HPFS
/dev/sda3 32,978,942 625,141,759 592,162,818 5 Extended
/dev/sda5 618,870,784 625,141,759 6,270,976 82 Linux swap / Solaris
/dev/sda6 32,978,944 586,059,775 553,080,832 83 Linux
/dev/sda7 586,061,824 618,860,543 32,798,720 83 Linux


"blkid" output: __________________________________________________ ______________

Device UUID TYPE LABEL

/dev/sda1 A6F88FC5F88F926B ntfs System Reserved
/dev/sda2 2AF8CB2DF8CAF5DB ntfs
/dev/sda5 5954d8d3-d087-4dad-9b0a-406dee1f87a6 swap
/dev/sda6 3cd9bd66-b8bb-49d7-be7d-3d1bd951117e ext3
/dev/sda7 855171df-6183-4704-9859-92fb5932d328 ext4

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

Device Mount_Point Type Options

/dev/sda6 /home ext3 (rw,commit=0)
/dev/sda7 / ext4 (rw,errors=remount-ro,commit=0)


=========================== sda7/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='(/dev/sda,msdos7)'
search --no-floppy --fs-uuid --set=root 855171df-6183-4704-9859-92fb5932d328
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos7)'
search --no-floppy --fs-uuid --set=root 855171df-6183-4704-9859-92fb5932d328
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' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos7)'
search --no-floppy --fs-uuid --set=root 855171df-6183-4704-9859-92fb5932d328
linux /boot/vmlinuz-2.6.38-10-generic root=UUID=855171df-6183-4704-9859-92fb5932d328 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-2.6.38-10-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-10-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos7)'
search --no-floppy --fs-uuid --set=root 855171df-6183-4704-9859-92fb5932d328
echo 'Loading Linux 2.6.38-10-generic ...'
linux /boot/vmlinuz-2.6.38-10-generic root=UUID=855171df-6183-4704-9859-92fb5932d328 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.38-10-generic
}
submenu "Previous Linux versions" {
menuentry 'Ubuntu, with Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos7)'
search --no-floppy --fs-uuid --set=root 855171df-6183-4704-9859-92fb5932d328
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=855171df-6183-4704-9859-92fb5932d328 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-8-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos7)'
search --no-floppy --fs-uuid --set=root 855171df-6183-4704-9859-92fb5932d328
echo 'Loading Linux 2.6.38-8-generic ...'
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=855171df-6183-4704-9859-92fb5932d328 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.38-8-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='(/dev/sda,msdos7)'
search --no-floppy --fs-uuid --set=root 855171df-6183-4704-9859-92fb5932d328
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos7)'
search --no-floppy --fs-uuid --set=root 855171df-6183-4704-9859-92fb5932d328
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)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(/dev/sda,msdos1)'
search --no-floppy --fs-uuid --set=root A6F88FC5F88F926B
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 ###
--------------------------------------------------------------------------------

=============================== sda7/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/sda7 / ext4 errors=remount-ro 0 1
/dev/sda6 /home ext3 defaults 0 2
/dev/sda5 none swap sw 0 0
--------------------------------------------------------------------------------

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

GiB - GB File Fragment(s)

281.700027466 = 302.473101312 boot/grub/core.img 1
279.677021027 = 300.300914688 boot/grub/grub.cfg 1
281.405525208 = 302.156881920 boot/initrd.img-2.6.38-10-generic 1
280.862304688 = 301.573603328 boot/initrd.img-2.6.38-8-generic 2
280.436832428 = 301.116755968 boot/vmlinuz-2.6.38-10-generic 1
281.704452515 = 302.477852672 boot/vmlinuz-2.6.38-8-generic 1
281.405525208 = 302.156881920 initrd.img 1
280.862304688 = 301.573603328 initrd.img.old 2
280.436832428 = 301.116755968 vmlinuz 1
281.704452515 = 302.477852672 vmlinuz.old 1

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

unlzma: Decoder error

oldfred
July 25th, 2011, 12:56 AM
Glad you got it working.:)

Site was created by meierfra. (bootscript author) and is a bit older. Most had Vista or XP so it did not include win7. I will add that note to my instructions when I post it. Thanks.

Quackers
July 25th, 2011, 05:10 AM
Nice one :-)