PDA

View Full Version : [ubuntu] Cant boot windows 7 after Ubuntu installation



Elio81
March 22nd, 2011, 12:58 AM
Hi guys, thank you for the welcome message.

i have just installed Ubuntu 10.10 on a pre installed windows 7 system. Ubuntu is working really well but the only problem is that when I try to boot into windows,

I get the windows sign and then I get a black screen and windows does not load. It seems to be an easy problem to solve because I can actually boot windows 7 in

safe mode with no problems at all! The problem is there when I try to boot windows 7 normally. To be honest I only need windows for a project that uses MSQL server and

after that switching to Ubuntu forever!

wilee-nilee
March 22nd, 2011, 01:04 AM
Could be you need to do a chkdsk you can initiate it from the safe admin command line, or just the command line choice with a f8 prompt
chkdsk /r

At some point in this process in the Ubuntu terminal run
sudo update-grub
this rewrites grub each time it is run to align the boot, you might just try this first.

There is a script in my signature we use as well for analysis of the setup, run it and post the text in code tags if needed. code tags are generated by clicking on the (#) in the reply panel paste the text between.

Elio81
March 22nd, 2011, 01:13 AM
Could be you need to do a chkdsk you can initiate it from the safe admin command line, or just the command line choice with a f8 prompt
chkdsk /r

At some point in this process in the Ubuntu terminal run
sudo update-grub
this rewrites grub each time it is run to align the boot, you might just try this first.

There is a script in my signature we use as well for analysis of the setup, run it and post the text in code tags if needed. code tags are generated by clicking on the (#) in the reply panel paste the text between.

ok i did that and the result is below. Still I could not boot windows unless in safe mode. Sorry just saw the rest of your post, I will do what you asked and reply back.

Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.35-28-generic
Found initrd image: /boot/initrd.img-2.6.35-28-generic
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
Found Windows 7 (loader) on /dev/sda1
done

kailkitsune
March 22nd, 2011, 01:18 AM
if i where you i would backup my files. when i installed Ubuntu on my laptop with win7 in dual boot, win7 crashed hard i lost a good bit of stuff. so if you can access your files back 'em up just encase.

Elio81
March 22nd, 2011, 01:19 AM
below is the content of result.txt


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 #7 for (,msdos7)/boot/grub.
=> Windows 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: /Windows/System32/winload.exe

sda4: __________________________________________________ _______________________

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

sda5: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: According to the info in the boot sector, sda5 starts
at sector 2048.
Operating System:
Boot files/dirs:

sda6: __________________________________________________ _______________________

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

sda7: __________________________________________________ _______________________

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

sda8: __________________________________________________ _______________________

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

sdb1: __________________________________________________ _______________________

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

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

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sda1 * 2,048 206,847 204,800 7 HPFS/NTFS
/dev/sda2 206,848 490,690,559 490,483,712 7 HPFS/NTFS
/dev/sda4 490,692,606 976,771,071 486,078,466 f W95 Ext d (LBA)
/dev/sda5 695,492,608 976,771,071 281,278,464 7 HPFS/NTFS
/dev/sda6 490,692,608 518,033,407 27,340,800 82 Linux swap / Solaris
/dev/sda7 518,035,456 566,861,823 48,826,368 83 Linux
/dev/sda8 566,863,872 695,484,415 128,620,544 83 Linux


Drive: sdb ___________________ __________________________________________________ ___

Disk /dev/sdb: 500.1 GB, 500107860992 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773166 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 2,048 976,773,119 976,771,072 8e Linux LVM


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/sda1 0A742758742745B3 ntfs System Reserved
/dev/sda2 AAF02AC2F02A951B ntfs
/dev/sda4: PTTYPE="dos"
/dev/sda5 38860ED8860E9692 ntfs data
/dev/sda6 201d3c98-e109-4af4-adcb-2d7a6ee88c55 swap
/dev/sda7 bcca1e34-843a-4d20-a899-09b4cf15faae ext4
/dev/sda8 90beaeee-0693-4c76-9be0-2b37fe839c73 ext4
/dev/sda: PTTYPE="dos"
/dev/sdb1 tTFMqG-pRmo-xz9u-SoyL-TAhM-7jRU-nhp80z LVM2_member
/dev/sdb: PTTYPE="dos"

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

Device Mount_Point Type Options

/dev/sda7 / ext4 (rw,errors=remount-ro,commit=0)
/dev/sda8 /home ext4 (rw,user_xattr,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 part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set bcca1e34-843a-4d20-a899-09b4cf15faae
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,msdos7)'
search --no-floppy --fs-uuid --set bcca1e34-843a-4d20-a899-09b4cf15faae
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-28-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set bcca1e34-843a-4d20-a899-09b4cf15faae
linux /boot/vmlinuz-2.6.35-28-generic root=UUID=bcca1e34-843a-4d20-a899-09b4cf15faae ro quiet splash
initrd /boot/initrd.img-2.6.35-28-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-28-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set bcca1e34-843a-4d20-a899-09b4cf15faae
echo 'Loading Linux 2.6.35-28-generic ...'
linux /boot/vmlinuz-2.6.35-28-generic root=UUID=bcca1e34-843a-4d20-a899-09b4cf15faae ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-28-generic
}
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,msdos7)'
search --no-floppy --fs-uuid --set bcca1e34-843a-4d20-a899-09b4cf15faae
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=bcca1e34-843a-4d20-a899-09b4cf15faae 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,msdos7)'
search --no-floppy --fs-uuid --set bcca1e34-843a-4d20-a899-09b4cf15faae
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=bcca1e34-843a-4d20-a899-09b4cf15faae 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,msdos7)'
search --no-floppy --fs-uuid --set bcca1e34-843a-4d20-a899-09b4cf15faae
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set bcca1e34-843a-4d20-a899-09b4cf15faae
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 0a742758742745b3
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
# / was on /dev/sda7 during installation
UUID=bcca1e34-843a-4d20-a899-09b4cf15faae / ext4 errors=remount-ro 0 1
# /home was on /dev/sda8 during installation
# Commented out by Dropbox
# UUID=90beaeee-0693-4c76-9be0-2b37fe839c73 /home ext4 defaults 0 2
# swap was on /dev/sda6 during installation
UUID=201d3c98-e109-4af4-adcb-2d7a6ee88c55 none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
UUID=90beaeee-0693-4c76-9be0-2b37fe839c73 /home ext4 defaults,user_xattr 0 2

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


287.0GB: boot/grub/core.img
287.0GB: boot/grub/grub.cfg
266.6GB: boot/initrd.img-2.6.35-22-generic
268.2GB: boot/initrd.img-2.6.35-28-generic
286.9GB: boot/vmlinuz-2.6.35-22-generic
266.3GB: boot/vmlinuz-2.6.35-28-generic
268.2GB: initrd.img
266.6GB: initrd.img.old
266.3GB: vmlinuz
286.9GB: vmlinuz.old

wilee-nilee
March 22nd, 2011, 01:19 AM
ok i did that and the result is below. Still I could not boot windows unless in safe mode

Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.35-28-generic
Found initrd image: /boot/initrd.img-2.6.35-28-generic
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
Found Windows 7 (loader) on /dev/sda1
done


So if you run the chkdsk you want it pointed at the correct partition it looks as though sda1 is probably a boot partition.

Vista/7 CHKDSK
chkdsk [drive] /f /r
chkdsk C: /r
/f : Fixes errors on the disk.
/r : Locates bad sectors and recovers readable information.
Note If you specify the /r option, the /p option is implied. When you specify the chkdsk command without arguments, the command checks the current drive with no options in effect.
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/bootcons_chkdsk.mspx?mfr=true

Elio81
March 22nd, 2011, 01:22 AM
if i where you i would backup my files. when i installed Ubuntu on my laptop with win7 in dual boot, win7 crashed hard i lost a good bit of stuff. so if you can access your files back 'em up just encase.

thank you for the advice, I've already backed up all data to an external drive

wilee-nilee
March 22nd, 2011, 01:33 AM
So the script looks basically okay for it likely being a chkdsk needed, since your backed up that is what I would do if it was me.

There is this though
sda5: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: According to the info in the boot sector, sda5 starts
at sector 2048.
Operating System:
Boot files/dirs:

I don't see any overlapping partitions this is a large partition and I'm not sure what the answer is here.

Elio81
March 22nd, 2011, 01:42 AM
im running chkdsk at the moment, its taking a bit long so i will be back with the result asap.many thanks. by the way is this the right place to say how much i hate myself for never using ubuntu until now. what a waste of money on windows all these years.

wilee-nilee
March 22nd, 2011, 01:55 AM
im running chkdsk at the moment, its taking a bit long so i will be back with the result asap.many thanks. by the way is this the right place to say how much i hate myself for never using ubuntu until now. what a waste of money on windows all these years.

The /r takes a long time, I think Both OS probably have their uses, I didn't really need my W7 setup and the MS word 2007 I have until I turned in a paper on line that just wouldn't work and render the .docx correctly otherwise.

Elio81
March 22nd, 2011, 02:10 AM
The /r takes a long time, I think Both OS probably have their uses, I didn't really need my W7 setup and the MS word 2007 I have until I turned in a paper on line that just wouldn't work and render the .docx correctly otherwise.

no luck. still wont boot windows. anyways ill just have to this job from another pc. many thanks for your help.

Hedgehog1
March 22nd, 2011, 08:05 AM
- deleted -