7

I had windows 7 installed on my pc, then I installed Ubuntu 10.10/

During the installation process I have chosen to manually set my partitions:

  • I set a 10GB drive for ubuntu root
  • 1GB drive for swap
  • and for boot drive I've chosen the one used by windows 7

Now I can boot ubuntu, I have the windows 7 option in the boot list, but when I choose Windows 7, it shows me a black screen for a second and returns back to boot screen.

                 Boot Info Script 0.55    dated February 15th, 2010                    

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

 => Windows is installed in the MBR of /dev/sda

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 304908237 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:   /bootmgr /Boot/BCD /Windows/System32/winload.exe

sda2: _________________________________________________________________________

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

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

sda4: _________________________________________________________________________

    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    62,894,474    62,894,412   7 HPFS/NTFS
/dev/sda2          62,894,478   291,579,749   228,685,272   7 HPFS/NTFS
/dev/sda3         291,579,811   309,157,937    17,578,127   5 Extended
/dev/sda5         291,579,813   309,157,937    17,578,125  83 Linux
/dev/sda4         309,159,936   312,580,095     3,420,160  82 Linux swap / Solaris


blkid -c /dev/null: ____________________________________________________________

Device           UUID                                   TYPE       LABEL                         

/dev/sda1        1266BB2766BB0A8D                       ntfs                                     
/dev/sda2        BEDBF1147C76F703                       ntfs       DATA                          
/dev/sda3: PTTYPE="dos" 
/dev/sda4        dd38226d-c7c9-4ae5-a726-6d18d34a22e4   swap                                     
/dev/sda5        e1dafd1c-f855-406b-8f9a-f9d527c70255   ext4                                     
/dev/sda: PTTYPE="dos" 

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

Device           Mount_Point              Type       Options

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


=========================== 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 e1dafd1c-f855-406b-8f9a-f9d527c70255
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 e1dafd1c-f855-406b-8f9a-f9d527c70255
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 e1dafd1c-f855-406b-8f9a-f9d527c70255
    linux   /boot/vmlinuz-2.6.35-22-generic root=UUID=e1dafd1c-f855-406b-8f9a-f9d527c70255 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 e1dafd1c-f855-406b-8f9a-f9d527c70255
    echo    'Loading Linux 2.6.35-22-generic ...'
    linux   /boot/vmlinuz-2.6.35-22-generic root=UUID=e1dafd1c-f855-406b-8f9a-f9d527c70255 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 e1dafd1c-f855-406b-8f9a-f9d527c70255
    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 e1dafd1c-f855-406b-8f9a-f9d527c70255
    linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set 1266bb2766bb0a8d
    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).
#
#                
proc            /proc           proc    nodev,noexec,nosuid 0       0
/dev/sda5       /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda4 during installation
UUID=dd38226d-c7c9-4ae5-a726-6d18d34a22e4 none            swap    sw              0       0

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


 156.1GB: boot/grub/core.img
 156.3GB: boot/grub/grub.cfg
 149.9GB: boot/initrd.img-2.6.35-22-generic
 156.3GB: boot/vmlinuz-2.6.35-22-generic
 149.9GB: initrd.img
 156.3GB: vmlinuz
6
  • 2
    Follow the instructions here to obtain the necessary boot info so folks can help you. ubuntuforums.org/showpost.php?p=8104352&postcount=1 Oct 30, 2010 at 9:12
  • ow, sounds like your windows 7 may have some system volume info issues. You should partition vista and windows 7 drives within their computer manager. do you have your windows 7 install dvd? You might be able to do a repair.
    – RolandiXor
    Oct 30, 2010 at 9:17
  • @Roland Taylor windows 7 cd says that everything is ok with my boot
    – Omu
    Oct 30, 2010 at 9:21
  • Grub2 needs to be installed to the MBR of the boot disk. If installed to Windows boot partitions it will obviously destroy the Windows boot manager. As to Roland's comment you need to repair this first if you want to see Windows again.
    – Takkat
    Oct 30, 2010 at 9:28
  • @user3940 how to repair this first ?
    – Omu
    Oct 30, 2010 at 9:34

3 Answers 3

8

From your BootInfo Script, I can see that GRUB2 resides erroneously on /sda1, your Windows boot partition. I'm not much into Windows anymore, but from what I know there are tools on the Windows CD that allow restoration of bootsectors. You need to boot from the Windows CD and start the repair mode. On the command line, you can try

bootrec.exe /fixboot

to restore your Windows partition boot sector.

Then, however, you won't be able to boot Ubuntu, because there will be no more GRUB2. GRUB2 should have been installed in the MBR of /sda which is not so in your case. This means you will either have to reinstall GRUB (using a Ubuntu live CD) there, or you may find it less time consuming to reinstall Ubuntu as a whole. The latter should not be a great thing if you only installed it recently for testing. In any case, take note that you should not install Grub2 on your Windows boot sector again.

1

In order to have windows 7 back just run the windows 7 CD in repair mode.

follow this in order to have the console : http://pcsupport.about.com/od/toolsofthetrade/ss/windows-7-startup-repair.htm

Under the console you'll type :

fixboot

and

fixmbr

Those two commands will restore normaly the whole windows 7 boot process. if not follow the procedure of the link I gave you.

So now you are in single boot with windows 7 and Ubuntu is "disabled"

In order to restore Ubuntu and activate the dual boot correctly you may want ubuntu back.

For that follow this link at the easybcd part : http://www.linuxbsdos.com/2011/05/22/how-to-dual-boot-windows-7-and-ubuntu-11-04/2/

1

you could also use GParted Live CD to fix MBR

or hold down Shift until the grub menu showed up and choose Windows to try booting

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .