PDA

View Full Version : [SOLVED] Grub cannot detect Windows 7



sikander3786
November 5th, 2010, 05:56 PM
Just installed Ubuntu Lucid on a client's Acer Aspire 4720z. Everything went extremely well except the dual boot problem.

Output from bootinfoscript


Boot Info Script 0.55 dated February 15th, 2010

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

=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
partition #5 for /boot/grub.

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

sda3: __________________________________________________ _______________________

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

sda5: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 10.04 LTS
Boot files/dirs: /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: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 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 63 20,466,809 20,466,747 27 Hidden HPFS/NTFS
/dev/sda2 * 20,467,712 166,793,215 146,325,504 7 HPFS/NTFS
/dev/sda3 166,795,262 199,995,391 33,200,130 5 Extended
/dev/sda5 166,795,264 196,089,855 29,294,592 83 Linux
/dev/sda6 196,091,904 199,995,391 3,903,488 82 Linux swap / Solaris


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/sda1 9C241B2FE49BED2A ntfs PQSERVICE
/dev/sda2 861EF8FB1EF8E559 ntfs
/dev/sda3: PTTYPE="dos"
/dev/sda5 79a7b8da-2695-4277-bb4c-053300128452 ext4
/dev/sda6 7e651a0a-f887-49de-8bc3-cfa57092cfe3 swap
/dev/sda: PTTYPE="dos"

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

Device Mount_Point Type Options

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


=========================== sda5/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='(hd0,5)'
search --no-floppy --fs-uuid --set 79a7b8da-2695-4277-bb4c-053300128452
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
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='(hd0,5)'
search --no-floppy --fs-uuid --set 79a7b8da-2695-4277-bb4c-053300128452
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-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 79a7b8da-2695-4277-bb4c-053300128452
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=79a7b8da-2695-4277-bb4c-053300128452 ro quiet splash
initrd /boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 79a7b8da-2695-4277-bb4c-053300128452
echo 'Loading Linux 2.6.32-21-generic ...'
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=79a7b8da-2695-4277-bb4c-053300128452 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-21-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 79a7b8da-2695-4277-bb4c-053300128452
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 79a7b8da-2695-4277-bb4c-053300128452
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows Vista (loader) (on /dev/sda1)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 9c241b2fe49bed2a
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 ###

=============================== 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=79a7b8da-2695-4277-bb4c-053300128452 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
UUID=7e651a0a-f887-49de-8bc3-cfa57092cfe3 none swap sw 0 0

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


96.2GB: boot/grub/core.img
94.4GB: boot/grub/grub.cfg
96.2GB: boot/initrd.img-2.6.32-21-generic
96.2GB: boot/vmlinuz-2.6.32-21-generic
96.2GB: initrd.img
96.2GB: vmlinuz

Why is it not seeing Windows 7?

Quackers
November 5th, 2010, 06:31 PM
30 0s_prober is picking up Windows Vista loader on sda1, but the boot flag is set on sda2, not sure about that. It seems to be set up like a Windows 7 install, ie with 2 boot files on sda1 and winload.exe in sda2.
Has the boot flag been changed at all?

sikander3786
November 5th, 2010, 06:40 PM
30 0s_prober is picking up Windows Vista loader on sda1, but the boot flag is set on sda2, not sure about that. It seems to be set up like a Windows 7 install, ie with 2 boot files on sda1 and winload.exe in sda2.
Has the boot flag been changed at all?
30 os_prober is pointing to the vista recovery partition.

What do you mean by boot flag on sda2?

I tried placing a custom entry in /etc/grub.d/40_custom


menuentry "Windows 7 (loader) (on /dev/sda2)" {
insmod ntfs
set root=(hd0,2)
search --no-floppy --fs-uuid --set 861EF8FB1EF8E559
chainloader +1
}

When I select that entry from Grub menu, I get bootmgr is missing error.

wilee-nilee
November 5th, 2010, 06:51 PM
The bootflag should be on sda1 that is the W7 booting partition.

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

The asterisk next to sda2 is the bootflag indicator in the script. Open gparted in Ubuntu a live cd is probably the safest way and right click on the unmounted sda1 and manage flags tick boot.
/dev/sda2 * 20,467,712 166,793,215 146,325,504 7 HPFS/NTFS

174664

I will say though that with having grub as the bootloader even though sda1 is the booting partition, at least in the script that it may just run the recovery. So you can put the /bootmgr /Boot/bcd in sda2 by running the repair three times or using the autorepair. You have to have sda 2 active=bootflag to do this. If the autorepair doesn't work personally I just use the cli; here are the commands.
1) Boot with your Vista/Windows 7 installation disk. Hit <Enter> at the language selection prompt then hit <R> for Repair to get to the Repair section.
2) Select the command prompt (console) and type in the following commands:
BootRec.exe /fixmbr (#updates MBR master boot record...do not run if you still want grub)
chkdsk /r
BootRec.exe /FixBoot (#updates PBR partition boot)
BootRec.exe /ScanOs
BootRec.exe /RebuildBcd
http://www.sevenforums.com/tutorials/20864-mbr-restore-windows-7-master-boot-record.html

Quackers
November 5th, 2010, 06:58 PM
The boot flag is shown by the * next to sda2 here


Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 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 63 20,466,809 20,466,747 27 Hidden HPFS/NTFS
/dev/sda2 * 20,467,712 166,793,215 146,325,504 7 HPFS/NTFS
/dev/sda3 166,795,262 199,995,391 33,200,130 5 Extended
/dev/sda5 166,795,264 196,089,855 29,294,592 83 Linux
/dev/sda6 196,091,904 199,995,391 3,903,488 82 Linux swap / Solaris


As a consequence of this the 2 boot files in sda1 are not being picked up.

sikander3786
November 5th, 2010, 07:32 PM
The bootflag should be on sda1 that is the W7 booting partition.

Are the Windows 7 files on sda1 also? Shouldn't they be on sda2 where Windows 7 is actually installed?

I have tried putting boot flag on sda1 but that didn't help.

Is it possible to add a custom entry in 40_custom and boot Windows 7 from it? How should this line look like?


set root=(hd0,2)

2 is the partition I assume. Should it be pointing to sda1 or sda2?


As a consequence of this the 2 boot files in sda1 are not being picked up.

But Grub is picking up the Vista restore option and I am able to boot the recovery actually.

Quackers
November 5th, 2010, 07:35 PM
Did you run sudo update-grub after you moved the boot flag?

sikander3786
November 5th, 2010, 07:38 PM
Did you run sudo update-grub after you moved the boot flag?
Yes I did.

Quackers
November 5th, 2010, 07:43 PM
I don't know what happened to the TYPE & LABEL entry for sda1 here???


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/sda1 9C241B2FE49BED2A sudo bash ~/Desktop/boot_info_script*.sh ntfs PQSERVICE
/dev/sda2 861EF8FB1EF8E559 ntfs
/dev/sda3: PTTYPE="dos"
/dev/sda5 79a7b8da-2695-4277-bb4c-053300128452 ext4
/dev/sda6 7e651a0a-f887-49de-8bc3-cfa57092cfe3 swap
/dev/sda: PTTYPE="dos"

sikander3786
November 5th, 2010, 07:47 PM
I don't know what happened to the TYPE & LABEL entry for sda1 here???


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/sda1 9C241B2FE49BED2A sudo bash ~/Desktop/boot_info_script*.sh ntfs PQSERVICE
/dev/sda2 861EF8FB1EF8E559 ntfs
/dev/sda3: PTTYPE="dos"
/dev/sda5 79a7b8da-2695-4277-bb4c-053300128452 ext4
/dev/sda6 7e651a0a-f887-49de-8bc3-cfa57092cfe3 swap
/dev/sda: PTTYPE="dos"


Sorry, pasted there by mistake.

Means you have read the whole code thoroghly :-)

Quackers
November 5th, 2010, 07:48 PM
Lol, I feel better now! Sadly I haven't come up with an answer yet. I'm still looking.
Wilee-nilee's suggestion is a definite possibility. But I'm not yet sure why it's not working as is.

Quackers
November 5th, 2010, 08:03 PM
I am thinking that it shouldn't be booting the recovery system if the 2 boot files in sda1 are working properly. I think setting the boot flag to sda2 and following wilee-nilee's suggestions is the way to go. That way all the boot files will then be on sda2 and sda1 can be left as a recovery partition (as things used to be before W7 appeared).

wilee-nilee
November 5th, 2010, 08:07 PM
Lol, I feel better now! Sadly I haven't come up with an answer yet. I'm still looking.
Wilee-nilee's suggestion is a definite possibility. But I'm not yet sure why it's not working as is.

It is always a challenge when we don't know the pathways with the lovely MS installs by manufacturers, it may be as many as three partitions involved to get to the main OS partition booted. The firmware partition the recovery and the OS.

I think the rebuild adding the /bootmgr /Boot/BCD files to the main OS sda2 is the answer here. I stay away from custom grub entries when it is a situation that should run if setup correctly.

Carry on guys Quackers knows this stuff and I know the OP does as well. Its a bummer to have problems on a install on anthers computer.

sikander3786
November 5th, 2010, 08:08 PM
I am thinking that it shouldn't be booting the recovery system if the 2 boot files in sda1 are working properly. I think setting the boot flag to sda2 and following wilee-nilee's suggestions is the way to go. That way all the boot files will then be on sda2 and sda1 can be left as a recovery partition (as things used to be before W7 appeared).
I am still confused about what to do.

sda1 is boot + recovery partition. grub is installed to mbr of sda 1. Windows boot loader is in sda1. Recovery bootloader is in sda1. Grub sees the recovery bootloader but not Windows 7 bootloader.

If I reinstall Windows 7 bootloader, where will it get installed? On sda2 I assume? Where should be the boot flag then? All these things are confusing me.

Quackers
November 5th, 2010, 08:17 PM
sikander, I would have expected the boot flag to have been on sda1 originally. As it was not I was wondering if you had moved it yourself. If you had it may explain why W7 was not booting. If you didn't move it, I can't explain why W7 was not being picked up properly by grub, unless the 2 boot files on sda1 were not working properly.
I would now suggest that you move the boot flag to sda2 and then run the startup repair on the Windows repair cd THREE times. On the third try it should pick up the W7 system and offer you the chance to add it to the boot record. Answer y for yes and then Windows should boot.
Obviously it may then be necessary to re-install grub, but we can cross that bridge later.

wilee-nilee
November 5th, 2010, 08:18 PM
I am still confused about what to do.

sda1 is boot + recovery partition. grub is installed to mbr of sda 1. Windows boot loader is in sda1. Recovery bootloader is in sda1. Grub sees the recover bootloader but not Windows 7 bootloader.

If I reinstall Windows 7 bootloader, where will it get installed? On sda2 I assume? Where should be the boot flag then? All these things are confusing me.

The problem here is that we don't know exactly what was removed as part of this install, was there a partition that you removed?

I ask this as it may have been the true original booting partition. The recovery has the correct files to run recovery probably, but was not the original booting partition possibly.

Put the bootflag on sda2 from gparted, boot the W7 recovery disc or install disc and run the auto repair three times.

To be honest trying to get any future use from that recovery is unlikely as a recovery. I would have made sure that the person owning the computer had a HD image or a install dvd and wiped that recovery and installed the correct /bootmgr /Boot/BCD to the sda2 partition that would read like this in the bootscript and boots correctly.

Boot files/dirs: /bootmgr /Boot/BCD /Windows/System32/winload.exe

I would have then confirmed W7 was booting okay and was stable then installed Ubuntu.

sikander3786
November 5th, 2010, 08:21 PM
Its a bummer to have problems on a install on anthers computer.

It really is. Actually I have no experience with recovery partitions and all that stuff as I have been installing Ubuntu to custom built PCs only. My first experience and it went bad :-(

@Quacker: Thanks for all your support. I am going to reinstall the Windows bootloader as suggested by wilee-nilee and also recommended by you. I will keep you updated.

But I need to fix this laptop tonight or to the most, in next 10 hours.

Quackers
November 5th, 2010, 08:25 PM
I appreciate your predicament. Hopefully it will be fixed in an hour or less.

sikander3786
November 5th, 2010, 08:26 PM
The problem here is that we don't know exactly what was removed as part of this install, was there a partition that you removed?

I removed a partition, D; drive in windows and sda3 in Ubuntu. Split it into 3 partitions and installed Ubuntu. I still have unallocated space that is intended to be an NTFS data drive sharing stuff between Windows and Ubuntu.

I didn't move the bootflags at all. It was already on sda2.

Deleting that recovery partition is an option but only the last one.

Quackers
November 5th, 2010, 08:34 PM
I think somehow the link between the boot files on sda1 and winload.exe on sda2 got borked. If we now put all the boot files in one place (like they used to be) on sda2 Windows should boot ok. If we then purge and re-install grub it should then pick up Windows recovery and Windows 7 loader. We'll see.

sikander3786
November 5th, 2010, 09:59 PM
I have tried it from Windows recovery disc the way wilee-nilee suggested but bootrec is unable to find any Windows installations.


X:\Sources: BootRec.exe /ScanOs
Scanning all disks for Windows installations.

Please wait, since this may take a while...

Successfully scanned Windows installations.
Total identified Windows installations: 0
The operation completed successfully.

Bootmgr is still missing however Grub is no longer there in the MBR.

Quackers
November 5th, 2010, 10:01 PM
Hi, did you run the startup repair 3 times and if so, what was reported, please.

sikander3786
November 5th, 2010, 10:05 PM
LOL. I tried those commands 3 times but I was still unable to boot into Windows 7. I tried once again and this time selected Repair Startup and now it is able to boot Windows 7. Relieved a bit.

Should I do the startup repair using the provided tool in Windows 7 recovery disc 3 tiimes or it is enough that I am now booting Windows?

Quackers
November 5th, 2010, 10:11 PM
No, if Windows is now booting that's fine :-)
Are you getting a grub menu or not? If not you will need to re-install grub to the mbr, which will break Windows again, but as the Windows boot files are now ok and the boot flag is good that should be no problem.
To re-install grub I would boot the Ubuntu Live cd and "Try Ubuntu" then in a terminal run

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

drs305
November 5th, 2010, 10:14 PM
And for the record, once everything is restored (including Grub2), would you please post a final copy of RESULTS.txt for posterity? Thanks.

sikander3786
November 5th, 2010, 10:14 PM
No, if Windows is now booting that's fine :-)
Are you getting a grub menu or not? If not you will need to re-install grub to the mbr, which will break Windows again, but as the Windows boot files are now ok and the boot flag is good that should be no problem.
To re-install grub I would boot the Ubuntu Live cd and "Try Ubuntu" then in a terminal run

sudo mount /dev/sda5 /mnt
sudo grub-install --root-directory=/mnt /dev/sda
Ok now I am going to reinstall Grub.

What I couldn't yet understand is that if Windows 7 was booting fine prior to the installation of Ubuntu, it means the boot files were in proper place?? Why did Grub installation mess them up then? And wouldn't it get messed up on reinstallation of Grub now?

wilee-nilee
November 5th, 2010, 10:15 PM
LOL. I tried those commands 3 times but I was still unable to boot into Windows 7. I tried once again and this time selected Repair Startup and now it is able to boot Windows 7. Relieved a bit.

Should I do the startup repair using the provided tool in Windows 7 recovery disc 3 tiimes or it is enough that I am now booting Windows?

Glad you got it working. The commands are for one time it is the auto-repair that is run three times.

You should in the future first run that bootscript on any system before installing, it would have told you everything you need to know to get it done in one task.

Without this information on the computer you have been working on your just speculating on the problem here. It was not grub it was the person installing not know some information that they should.;)

Quackers
November 5th, 2010, 10:20 PM
The short answer is I don't know. It may be that the deletion of the partition had a hand in it, but I really don't know. For some reason the boot files in sda1 stopped working ( I think) in that they stopped finding winload.exe in sda2, so Windows could not boot.
I don't think grub did the damage. It didn't damage my Windows boot files, but they were already in only one partition, not the two that W7 now uses. Personally I think it's a bad idea to put 2 of the boot files in a (hidden) recovery partition. It doesn't make sense to me.
It may also be that re-installing grub won't damage your Windows boot now, as it didn't on my system.

sikander3786
November 5th, 2010, 10:38 PM
It is all working!!!

Thank you all. Thank you Quackers, wilee-nilee, drs305 and also Rubi1200 who has been working behind the curtains to help me on that.

Actually the install was not a bad experience at all. All the hardware was detected and wireless drivers were available under Hardware Drivers so I am pleased with all that.

Your support and assistance means a lot to me. Thanks again. Really appreciated.

sikander3786
November 5th, 2010, 10:41 PM
And for the record, once everything is restored (including Grub2), would you please post a final copy of RESULTS.txt for posterity? Thanks.
Here you go.


Boot Info Script 0.55 dated February 15th, 2010

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

=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
partition #5 for /boot/grub.
=> Syslinux is installed in the MBR of /dev/sdb

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: /bootmgr /Boot/BCD /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 10.04 LTS
Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda6: __________________________________________________ _______________________

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

sdb1: __________________________________________________ _______________________

File system: vfat
Boot sector type: Fat32
Boot sector info: According to the info in the boot sector, sdb1 starts
at sector 0. But according to the info from fdisk,
sdb1 starts at sector 40480.
Operating System:
Boot files/dirs:

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

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 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 63 20,466,809 20,466,747 27 Hidden HPFS/NTFS
/dev/sda2 * 20,467,712 166,793,215 146,325,504 7 HPFS/NTFS
/dev/sda3 166,795,262 199,995,391 33,200,130 5 Extended
/dev/sda5 166,795,264 196,089,855 29,294,592 83 Linux
/dev/sda6 196,091,904 199,995,391 3,903,488 82 Linux swap / Solaris


Drive: sdb ___________________ __________________________________________________ ___

Disk /dev/sdb: 2034 MB, 2034237440 bytes
26 heads, 26 sectors/track, 5877 cylinders, total 3973120 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 * 40,480 3,973,119 3,932,640 b W95 FAT32


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/sda1 9C241B2FE49BED2A ntfs PQSERVICE
/dev/sda2 861EF8FB1EF8E559 ntfs
/dev/sda3: PTTYPE="dos"
/dev/sda5 79a7b8da-2695-4277-bb4c-053300128452 ext4
/dev/sda6 7e651a0a-f887-49de-8bc3-cfa57092cfe3 swap
/dev/sda: PTTYPE="dos"
/dev/sdb1 6035-4796 vfat New Volume
/dev/sdb: PTTYPE="dos"

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

Device Mount_Point Type Options

/dev/sda5 / ext4 (rw,errors=remount-ro)
/dev/sdb1 /media/New Volume vfat (rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000, shortname=mixed,dmask=0077,utf8=1,flush)


=========================== sda5/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='(hd0,5)'
search --no-floppy --fs-uuid --set 79a7b8da-2695-4277-bb4c-053300128452
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
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='(hd0,5)'
search --no-floppy --fs-uuid --set 79a7b8da-2695-4277-bb4c-053300128452
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-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 79a7b8da-2695-4277-bb4c-053300128452
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=79a7b8da-2695-4277-bb4c-053300128452 ro quiet splash
initrd /boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 79a7b8da-2695-4277-bb4c-053300128452
echo 'Loading Linux 2.6.32-21-generic ...'
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=79a7b8da-2695-4277-bb4c-053300128452 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-21-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 79a7b8da-2695-4277-bb4c-053300128452
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 79a7b8da-2695-4277-bb4c-053300128452
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows Vista (loader) (on /dev/sda1)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 9c241b2fe49bed2a
chainloader +1
}
menuentry "Windows 7 (loader) (on /dev/sda2)" {
insmod ntfs
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 861ef8fb1ef8e559
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 ###

=============================== 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=79a7b8da-2695-4277-bb4c-053300128452 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
UUID=7e651a0a-f887-49de-8bc3-cfa57092cfe3 none swap sw 0 0

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


96.2GB: boot/grub/core.img
95.8GB: boot/grub/grub.cfg
96.2GB: boot/initrd.img-2.6.32-21-generic
96.2GB: boot/vmlinuz-2.6.32-21-generic
96.2GB: initrd.img
96.2GB: vmlinuz

Quackers
November 5th, 2010, 10:41 PM
You're very welcome:-)
Two things
Does grub now list the W7 partition AND the recovery partition, and if so, do they both boot?
Also will you please post a new boot script with the new details. Thanks.

Lol, nevermind the boot script then :-)

sikander3786
November 5th, 2010, 10:45 PM
Does grub now list the W7 partition AND the recovery partition, and if so, do they both boot?

Thats why I said everything is working :-)

Yes it lists both Windows 7 and Vista Recovery and I am able to boot both of them.

Quackers
November 5th, 2010, 10:48 PM
Ah that's good, thanks. I thought (and hoped) the recovery option should still be ok.

Rubi1200
November 6th, 2010, 08:01 AM
@sikander: Excellent! I am so glad you got things working again :)

@Quackers, wilee-nilee, and drs305: you guys are the greatest! Thanks for the help and input (also from behind the scenes).