PDA

View Full Version : [ubuntu] GRUB not showing after dual boot clean install!



Panna-cakkhu
March 21st, 2011, 12:18 PM
I installed Windows 7 and then Ubuntu 10.10 64 bits. The Ubuntu installation went fine but when rebooting a "check disk" appeared and since then my PC keeps booting directly on Windows.

I tried all the GRUB reinstallation methods of the GRUB2 Community Documentation (http://help.ubuntu.com/community/Grub2#Reinstalling GRUB 2) with the live CD but none worked.

Below is the output of the Boot Info script found on several threads. Any help would be greatly appreciated (i already spent hours on this...)


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 (,msdos5)/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: Windows 7
Boot files/dirs: /Windows/System32/winload.exe /boot/grub/core.img

sda2: __________________________________________________ _______________________

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

sda5: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 10.10
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: 256.1 GB, 256060514304 bytes
255 heads, 63 sectors/track, 31130 cylinders, total 500118192 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 391,025,562 391,023,515 7 HPFS/NTFS
/dev/sda2 391,026,686 500,117,503 109,090,818 5 Extended
/dev/sda5 391,026,688 495,568,895 104,542,208 83 Linux
/dev/sda6 495,570,944 500,117,503 4,546,560 82 Linux swap / Solaris


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/sda1 ECE8D619E8D5E23E ntfs
/dev/sda2: PTTYPE="dos"
/dev/sda5 552bb6d9-7687-449f-929b-2bca078b6e6b ext4
/dev/sda6 2a3451dd-45a9-4100-914a-e39885ec3ec2 swap
/dev/sda: PTTYPE="dos"

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

Device Mount_Point Type Options

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


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


??GB: boot/grub/core.img

=========================== 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 part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set 552bb6d9-7687-449f-929b-2bca078b6e6b
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set 552bb6d9-7687-449f-929b-2bca078b6e6b
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.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set 552bb6d9-7687-449f-929b-2bca078b6e6b
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=552bb6d9-7687-449f-929b-2bca078b6e6b ro quiet splash
initrd /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set 552bb6d9-7687-449f-929b-2bca078b6e6b
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=552bb6d9-7687-449f-929b-2bca078b6e6b ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-22-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='(hd0,msdos5)'
search --no-floppy --fs-uuid --set 552bb6d9-7687-449f-929b-2bca078b6e6b
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set 552bb6d9-7687-449f-929b-2bca078b6e6b
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ "x${timeout}" != "x-1" ]; then
if keystatus; then
if keystatus --shift; then
set timeout=-1
else
set timeout=0
fi
else
if sleep --interruptible 3 ; then
set timeout=0
fi
fi
fi
### 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=552bb6d9-7687-449f-929b-2bca078b6e6b / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
UUID=2a3451dd-45a9-4100-914a-e39885ec3ec2 none swap sw 0 0

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


228.2GB: boot/grub/core.img
228.2GB: boot/grub/grub.cfg
201.2GB: boot/initrd.img-2.6.35-22-generic
228.2GB: boot/vmlinuz-2.6.35-22-generic
201.2GB: initrd.img
228.2GB: vmlinuz

Dutch70
March 21st, 2011, 12:42 PM
Please boot up the live cd/usb. Open Gparted & take a screenshot of your partitions. Use the paper clip in the toolbar to attach it to your next post.

Panna-cakkhu
March 21st, 2011, 12:54 PM
Thanks for your help, i edited my post as you suggested
PS: i deleted Ubuntu partitions and reinstalled it and same problems...

Dutch70
March 21st, 2011, 01:29 PM
Your welcome although I'm no expert on boot info script.


Are you sure you reinstalled Grub2 correctly?

Are these exactly the commands you ran from the live cd to reinstall Grub2?
We're there any errors?

sudo mount /dev/sda1 /mnt

and...

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

Panna-cakkhu
March 21st, 2011, 01:40 PM
Yes, these are the exact commands.

I tried first with "/dev/sda1" (default booting partition), and it rebooted again straight into windows. I also tried with "/dev/sda5" (linux partition) and it also rebooted into windows...

Both times no errors were reported.

I just tried deleting all linux partitions then installing Ubuntu with manual partitionning and after restarting, again straight into Windows!!

Panna-cakkhu
March 21st, 2011, 02:35 PM
Ok i reinstalled ubuntu, and now it starts either straight into Windows 7 as before OR, when i press F8 to display a BIOS boot pop-up menu and choose the main harddrive, straight into Ubuntu.

When i boot into Ubuntu that way, update-grub shows that Windows 7 is not found.

~$ sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.35-22-generic
Found initrd image: /boot/initrd.img-2.6.35-22-generic
Found memtest86+ image: /boot/memtest86+.bin
done


Could you please help me resolve this issue?

The new manual partition table is:
sda5: (swap)
sda6: /
sda7: /home
sda8: /tmp
sda9: /var
sda10: /usr
sda11: /usr/local



~$ sudo fdisk -l

Disk /dev/sda: 256.1 GB, 256060514304 bytes
255 heads, 63 sectors/track, 31130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x2eb621fb

Device Boot Start End Blocks Id System
/dev/sda1 * 1 24341 195511757+ 7 HPFS/NTFS
/dev/sda2 24341 31131 54545409 5 Extended
/dev/sda5 30845 31131 2298880 82 Linux swap / Solaris
/dev/sda6 24341 24645 2441216 83 Linux
/dev/sda7 24645 27684 24413184 83 Linux
/dev/sda8 27684 27927 1951744 83 Linux
/dev/sda9 27927 28170 1951744 83 Linux
/dev/sda10 28170 29386 9759744 83 Linux
/dev/sda11 29386 30844 11717632 83 Linux

Below is the output of the Boot Info script:


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 #6 for (,msdos6)/boot/grub.

sda1: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Grub 2
Boot sector info: Grub 2 is installed in the boot sector of sda1 and
looks at sector 391707688 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: Windows 7
Boot files/dirs: /Windows/System32/winload.exe /boot/grub/core.img

sda2: __________________________________________________ _______________________

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

sda5: __________________________________________________ _______________________

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

sda6: __________________________________________________ _______________________

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

sda7: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs:

sda8: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs:

sda9: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs:

sda10: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs:

sda11: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs:

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

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 256.1 GB, 256060514304 bytes
255 heads, 63 sectors/track, 31130 cylinders, total 500118192 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 391,025,562 391,023,515 7 HPFS/NTFS
/dev/sda2 391,026,686 500,117,503 109,090,818 5 Extended
/dev/sda5 495,519,744 500,117,503 4,597,760 82 Linux swap / Solaris
/dev/sda6 391,026,688 395,909,119 4,882,432 83 Linux
/dev/sda7 395,911,168 444,737,535 48,826,368 83 Linux
/dev/sda8 444,739,584 448,643,071 3,903,488 83 Linux
/dev/sda9 448,645,120 452,548,607 3,903,488 83 Linux
/dev/sda10 452,550,656 472,070,143 19,519,488 83 Linux
/dev/sda11 472,072,192 495,507,455 23,435,264 83 Linux


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/sda10 ec035060-a91c-4f39-9527-4c7718862e6a ext4
/dev/sda11 219a6080-b303-4202-b6f1-fa193f147f67 ext4
/dev/sda1 ECE8D619E8D5E23E ntfs
/dev/sda2: PTTYPE="dos"
/dev/sda5 7b4def10-f10b-49f4-a6c0-00f93e38a7ca swap
/dev/sda6 99f8ba6b-183d-40a2-86d5-1ffc07ed8290 ext4
/dev/sda7 74fc3c5f-3c7e-4398-858f-13b84a9b3f99 ext4
/dev/sda8 d544bb6c-6566-4682-b5c0-a2fff6b4faee ext4
/dev/sda9 8b45e38f-111f-459e-bf31-2c2091f4e164 ext4
/dev/sda: PTTYPE="dos"

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

Device Mount_Point Type Options

/dev/sda6 / ext4 (rw,errors=remount-ro,commit=0)
/dev/sda8 /tmp ext4 (rw,commit=0)
/dev/sda7 /home ext4 (rw,commit=0)
/dev/sda9 /var ext4 (rw,commit=0)
/dev/sda10 /usr ext4 (rw,commit=0)
/dev/sda11 /usr/local ext4 (rw,commit=0)


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


??GB: boot/grub/core.img

=========================== sda6/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 part_msdos
insmod ext2
set root='(hd0,msdos10)'
search --no-floppy --fs-uuid --set ec035060-a91c-4f39-9527-4c7718862e6a
if loadfont /share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 99f8ba6b-183d-40a2-86d5-1ffc07ed8290
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.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 99f8ba6b-183d-40a2-86d5-1ffc07ed8290
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=99f8ba6b-183d-40a2-86d5-1ffc07ed8290 ro quiet splash
initrd /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 99f8ba6b-183d-40a2-86d5-1ffc07ed8290
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=99f8ba6b-183d-40a2-86d5-1ffc07ed8290 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-22-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='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 99f8ba6b-183d-40a2-86d5-1ffc07ed8290
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 99f8ba6b-183d-40a2-86d5-1ffc07ed8290
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ "x${timeout}" != "x-1" ]; then
if keystatus; then
if keystatus --shift; then
set timeout=-1
else
set timeout=0
fi
else
if sleep --interruptible 3 ; then
set timeout=0
fi
fi
fi
### 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 ###

=============================== sda6/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/sda6 during installation
UUID=99f8ba6b-183d-40a2-86d5-1ffc07ed8290 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda7 during installation
UUID=74fc3c5f-3c7e-4398-858f-13b84a9b3f99 /home ext4 defaults 0 2
# /tmp was on /dev/sda8 during installation
UUID=d544bb6c-6566-4682-b5c0-a2fff6b4faee /tmp ext4 defaults 0 2
# /usr was on /dev/sda10 during installation
UUID=ec035060-a91c-4f39-9527-4c7718862e6a /usr ext4 defaults 0 2
/dev/sda11 /usr/local ext4 defaults 0 2
# /var was on /dev/sda9 during installation
UUID=8b45e38f-111f-459e-bf31-2c2091f4e164 /var ext4 defaults 0 2
/dev/sda5 none swap sw 0 0

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


200.5GB: boot/grub/core.img
200.5GB: boot/grub/grub.cfg
200.6GB: boot/initrd.img-2.6.35-22-generic
200.5GB: boot/vmlinuz-2.6.35-22-generic
200.6GB: initrd.img
200.5GB: vmlinuz

Quackers
March 21st, 2011, 03:07 PM
Where do I start?
sda1 is now shown as a grub2 boot sector type, whereas it should be Windows Vista/7
sda1 also has /boot/core.img in it whereas it should not be there.
I have no idea how Windows is booting, due to the fact that 2 of its boot files are missing!
The installation was messy enough at first, however, you have now included all these other partitions too.
In fact, the only thing that looks ok is the grub2 installation - which is the reason for your post :-)

What I would recommend is that you boot from the Windows 7 repair/installation disc and select the recovery console.
In the recovery console you should select the Command Prompt option and in that window enter
bootrec.exe /fixmbr
If that reports no errors you can reboot, take the cd/dvd out, and see if Windows boots directly.
If it does, I would recommend scheduling a chkdsk to be run at next boot - for details see here
http://www.w7forums.com/use-chkdsk-check-disk-t448.html
If that runs and reports that it finds/fixes any errors, you should keep running it until no errors are reported.

Once Windows is booting without problem, you should either re-install grub2 or re-install Ubuntu, choosing the manual partitioning option. In that screen I, personally, would scrap all ext4 partitions (delete them, but be careful), then create a new root partition (mount point "/", a new /home partition (mount point /home) and a swap partition. Then install to those new partitions.
I do not advocate a separate boot partition, or /usr or /var etc etc, for normal use.
Grub2 should be installed or re-installed to /dev/sda, not a partition (like /dev/sda5)
Good luck :-)
Sadly I have to go out now for some hours. There are many here who can answer any questions you may have regarding these procedures.

Panna-cakkhu
March 21st, 2011, 03:22 PM
Many thanks Quackers.

I found one of the main issue with this new PC: the BIOS was configured to boot on the second (empty) hard drive. The sytem then booted automatically on the 1st harddrive (not sure how since i don't think it was even in the boot sequence) and so bypassing the normal boot process and going straight into Windows.

Now that i corrected the boot sequence i can focus on the GRUB issue. I may clean the mess before attempting anything else as you suggested...

Thank you!

Hakunka-Matata
March 21st, 2011, 03:25 PM
@Quackers;

Excuse the attempt @ interrupting:



If I may ask one question:
Dual boot Ubuntu10.10/Desktop - Windows7, does /etc/fstab get an entry line for the Windows partition.
If yes, does it get an empty mount point?

Thanks, I can't count.

HK

Panna-cakkhu
March 21st, 2011, 05:22 PM
Ok so basically the hard-drives set up is a mess and the problem is much more complicated than a simple installation. I'll get back to this thread when i got most of this mess sorted.

coffeecat
March 21st, 2011, 06:20 PM
Ok so basically the hard-drives set up is a mess and the problem is much more complicated than a simple installation. I'll get back to this thread when i got most of this mess sorted.


One thing to add.

Like Quackers I don't understand how Windows can boot with grub files contaminating the boot sector of its C: partition. Whatever, you mentioned earlier that update-grub can't find Windows. That's because of the same issue - grub files in the boot sector of the Windows partition.

Here's a useful link for you which you may find helpful:

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

I notice that it mentions "bootrect /fixboot" as one way of solving this problem. I think bootrect is a typo for bootrec. (Perhaps that's why the author of that wiki page says they find testdisk works better! :)) This Microsoft page:

http://support.microsoft.com/kb/927392

... uses 'bootrec /FixBoot' to repair a damaged boot sector.

Panna-cakkhu
March 21st, 2011, 08:16 PM
I spent the whole day on it. Basically i had two hard drives with the following configuration:
- the first one contained Windows 7 and i installed Ubuntu there on a separate partition
- the second one contained Windows 7 boot files (!) and was not detected by Ubuntu (SATA III issues)
After erasing all data on the second harddrive, i tried many different methods to recreate the MBR to boot Windows 7 on the first hard drive but no success even though the 2 repair discs i tried could detect Windows 7...

In the end i had to do the brute force method: wipe out everything, get an hand on a full windows 7 CD (not repair CD or unbootable upgrade CD) and create everything from scratch.

Computing can be such a hassle... Damn!!