Sign in with
Sign up | Sign in
Your question

[Q] Installed Ubuntu - Now Windows 7 won't Boot

Last response: in Linux/Free BSD
Share
Anonymous
a b $ Windows 7
August 18, 2010 7:48:17 PM

Hey everyone,

I'm a super linux newb and apparently after installing Ubuntu via the special Windows Installer package, my Windows 7 will no longer boot.

I went to this website: h**p://w**.ubuntu.com/desktop/get-ubuntu/windows-installer and downloaded the installer. When the program asked me to restart, I did so, and thus I was presented with two boot options: Windows 7 and Ubuntu.

Naturally I selected ubuntu and it proceeded to finish installing it on my PC. I couldn't figure out how to do what I wanted to do on Ubuntu (Trying to use my ps3 sixaxis controller on my N900 phone) so I restarted and no matter what I do, I cannot get into Windows 7. The pc goes to the screen that says windows failed to start. It won't work in safe mode, it won't work in "Last known good configuration", I can't boot it to repair/recovery mode.

The worst part about this is that I have no optical drive (M11x) so I cant run MBR Fix off my windows CD (If thats what I even should be doing??)

I did some research via this forum, and apparently you can use MS-sys to do a mbr fix type of thing within ubuntu, however, I do not have a Ubuntu Live CD (Nor an optical drive!). The next best thing I did was download Ms-sys from sourceforge, and even with the read me, I can't figure out how to install the thing on Ubuntu.

Does anyone know how to fix this problem??? It would be great if someone could tell me how to install Ms-sys onto ubuntu without the usage of the Live CD. Then I can follow the tutorial I found to perhaps fix the MBR to get my windows 7 working again.

Thanks for reading, and I appreciate any help!
a b $ Windows 7
August 18, 2010 8:09:43 PM

It sounds, from what you are saying, as if you can get to the Windows F8 menu. I don't really know what to suggest without an optical drive, but I'm pretty sure that your problem isn't the MBR, or anything like that; else you wouldn't get to the Windows boot menu. It looks like something slightly later in the boot process has got messed. Can you reproduce the "failed to start" screen exactly.

BTW, I presume that to install Ubuntu you had to resize the Windows partition and create a Ubuntu one. Did you create this before or after the Windows partition?
m
0
l
August 18, 2010 8:44:01 PM

Something I would try is to use Fdisk to re-write the MBR.

Unfortunately for you, this REQUIRES in one way or another, the Windows 7 installation disc. (possibly from a friend/coworker?)

You could boot from a USB drive.

This would still require you to create a bootable image with the windows 7 dvd.
*make sure that doing this is not copyright infringement! Some dvds it's legal, some it's not.

You can read about how to make a bootable usb/flash drive Here.

Once that is done, make sure your bios are set to allow booting from a usb port. This is different for every manufacturer, so refer to their website and see if you can achieve this.

For using the Fdisk Utility, see the article from microsoft Here

another unfortunate series of events, this COULD mess with your GRUB loader for ubuntu.

Please do not install custom splash screens/themes for GRUB if you are a linux newbie. (not saying that this is what you did, but it can mess with your windows install when dual booting off a single hdd with 2 partitions. it always had for me and my opensuse loader is currently broken thanks to windows 7's install.)

Good Luck!
m
0
l
Related resources
August 19, 2010 2:52:19 AM

Ijack said:
BTW, I presume that to install Ubuntu you had to resize the Windows partition and create a Ubuntu one. Did you create this before or after the Windows partition?

Based on the link he provided and the description of his bootloader screen, he must be using Wubi. Now I don't think his MBR is a problem else he wouldn't be seeing this screen at all (since it is generated from the BCD on the C: partition and not the MBR). It is possible that his BCD has become corrupted but I'm not sure what must have gone wrong to cause that.

waznboi03, follow these instructions or some other tutorial to get Windows 7 on a USB flash drive: http://maketecheasier.com/boot-and-install-windows-7-fr...

Rather than downloading an ISO, on another PC you can simply copy the contents of your CD/DVD onto the flash drive. just make sure you have a big enough one. :) 

Once you're booted up from the USB flash drive (you may need to alter your boot order), try running the startup recovery. If it finds a problem and fixes it you should be good to go for booting into Windows (but not Ubuntu as it will be erased from the list most likely). If it doesn't work, find your way to the command prompt option and then run the following commands:

bootrec.exe /fixmbr
del C:\boot\bcd
bootrec.exe /rebuildbcd

This should almost certainly get your bootloader configuration working again.

Now if after all this you still want to try out Ubuntu, do it the way that is least likely to cause problems. First delete the Ubuntu stuff that was installed on your system before as it's only going to waste space now. The Windows installer (Wubi) is great if it works but is too prone to issues. Fortunately, it makes no changes to the partition layout of your system it has a low chance of permanent damage. For the method I'm going to run through next I recommend backing up any important data as you will be making partition changes. The chances of problems are very, very small but if they do happen it can be a bit of a disaster. This is true regardless of the OS you are running. Playing around with partitions containing data has inherent risks and we just need to make sure you're aware of them. Most importantly, don't let the power go out while the partition layout is being altered. ;)  Note that what the following will do is erase your MBR and replace it with a bootloader called GRUB (GRand Unified Bootloader). This will not prevent you booting any installed Windows OSs because GRUB will add an option to chainload the Windows bootloader as well. Windows actually keeps the bootloader (or BCD, rather) on C: because it can't all fit in the MBR. The MBR normally just contains information pointing to the BCD and we are simply replacing that pointer. If, at a later stage, you wish to remove Ubuntu and GRUB, you'll need to run the stuff above to restore the MBR as before. Windows should be able to do it without you dropping to the command prompt though because the BCD is still intact.

Ok, moving on... Download a Live CD from here: http://www.ubuntu.com/desktop/get-ubuntu/download and then grab the Windows version of UNetbootin from here: http://unetbootin.sourceforge.net/

You can format your flash drive again if you wish just through Windows Explorer (right click the drive) as FAT32 rather than NTFS. It's your choice. I think NTFS will work ok but FAT32 will certainly work.

Once you've got both the Live CD ISO and UNetbootin, run UNetbootin and select use the file browser to find the ISO. Make sure that the USB flash drive it plans to install to is the correct one. Once it's done, reboot and you should be able to install straight from the flash drive. You will be presented with the Live CD environment initially and I strongly recommend that you use this for a while before installing to make sure that your system works fine. As you're running it off a flash drive you won't have the horribly slow experience of a real Live CD which is nice. If you're happy, go ahead and run the installer on the desktop. Note that it is completely different to the Wubi installer and presents you with more options. Most are pretty straight-forward.

When it comes to the partitioning stage, select whatever option you feel comfortable with, but don't select erase the whole drive obviously :)  You should get a screen that looks like this:



The first option, install side-by-side, will shrink your C: (I am pretty sure it doesn't touch the other partitions but I haven't picked this option for ages so maybe you can select the partition to change) and install Ubuntu in the free space created. I believe it lets you pick how much space to free up. This is the easiest option, however if the installer does not detect Windows then stop now and let us know first. It usually works fine but I've seen one or two cases in the past where Windows was not being picked up. Avoid option 2 like the plague unless you only want Ubuntu on the drive selected in the dropdown as it will erase all existing partitions. You could also try option 3 but let us know if you want to do this because partitioning and mounting works differently with Linux than Windows.

EDIT: Oh my, this seemed less like a wall of text while I was typing it.
m
0
l
March 1, 2012 8:52:43 AM

Hi there I have a similiar problem.

:bounce:  Edit: Have re-read the post above and I will try that reinstalling 11.10 from a flash drive and see if that cure my ills ... ( I know the old windows is still there and judging by the ubuntu diagnostics the MBR seems to fine) .. I let you know the results !!
:bounce: 

:bounce: 

Edit 2: Okay guys solved and only one wee minor problem which is irritating and nothing more (I can't let it go :D  )

Not sure all of these steps were necessary and a lot of the difficulty was a poor WIN7 install image.

In the end I created a brand new 'bootable usb' with WIN7 Ultimate.
Fresh Install
Reformatted and partitioned the disk

Install went okay ( except for would not boot until 2nd attempt every time)

Tried /fixmbr and then cleaned it out and installed a fresh WIN7 MBR

However despite everything WIN7 will only load cleanly first attempt if F9 is pressed when it boot up .. otherwise it just beeps with a blank screen - you need to power off and select "start windows normally" on their "windows shut down unexpectedly" screen.

Not sure if this is just an option somewhere ?











Ubuntu 11.04 (edit: upgrading to 11.10 in process) I can boot into perfectly.

I am trying to reinstall WIN7 in order to dual boot as I want to use the Bluetooth for backing up my Blackberry and only on this machine (Acer Aspire One D250)

During the initial Ubuntu install (many moons ago) I decided I no longer needed WIN7 so I may have used it's partition when sizing the disk ... 90% sure but memory is lousy and the install is a distant faded and jaded .. (reasons notes should be kept)

However the problem is that the USB flash drive containing the WIN7 installs works to a point then states it cannot find device drivers. Any fixes for this fail because the flash drive mounts to the c:\ (I am assuming this from browsing the file dir from the load drivers dialogue box )

Anyway I have run the drive info script from sudo and this is the result .. (if anyone can help restore the windows boot option)


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.
=> Windows is installed in the MBR of /dev/sdb.

sda1: __________________________________________________________________________

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

sda2: __________________________________________________________________________

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

sda5: __________________________________________________________________________

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

sdb1: __________________________________________________________________________

File system: vfat
Boot sector type: Windows XP: FAT32
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /bootmgr /boot/bcd

============================ 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 Sector End Sector # of Sectors Id System

/dev/sda1 * 2,048 310,503,423 310,501,376 83 Linux
/dev/sda2 310,505,470 312,580,095 2,074,626 5 Extended
/dev/sda5 310,505,472 312,580,095 2,074,624 82 Linux swap / Solaris


Drive: sdb _____________________________________________________________________

Disk /dev/sdb: 8004 MB, 8004304896 bytes
255 heads, 63 sectors/track, 973 cylinders, total 15633408 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/sdb1 * 63 15,633,407 15,633,345 c W95 FAT32 (LBA)


"blkid" output: ________________________________________________________________

Device UUID TYPE LABEL

/dev/sda1 94108733-fa78-47f3-b04d-31fb682e442e ext4
/dev/sda5 4c57bb9e-d799-4c06-a5ad-c1ddbcbb46d3 swap
/dev/sdb1 6B1C-F558 vfat

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

Device Mount_Point Type Options

/dev/sda1 / ext4 (rw,errors=remount-ro,commit=0)
/dev/sdb1 /media/6B1C-F558 vfat (rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush)


=========================== sda1/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,msdos1)'
search --no-floppy --fs-uuid --set=root 94108733-fa78-47f3-b04d-31fb682e442e
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,msdos1)'
search --no-floppy --fs-uuid --set=root 94108733-fa78-47f3-b04d-31fb682e442e
set locale_dir=($root)/boot/grub/locale
set lang=en_IN
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-11-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,msdos1)'
search --no-floppy --fs-uuid --set=root 94108733-fa78-47f3-b04d-31fb682e442e
linux /boot/vmlinuz-2.6.38-11-generic root=UUID=94108733-fa78-47f3-b04d-31fb682e442e ro quiet splash vt.handoff=7
initrd /boot/initrd.img-2.6.38-11-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-11-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,msdos1)'
search --no-floppy --fs-uuid --set=root 94108733-fa78-47f3-b04d-31fb682e442e
echo 'Loading Linux 2.6.38-11-generic ...'
linux /boot/vmlinuz-2.6.38-11-generic root=UUID=94108733-fa78-47f3-b04d-31fb682e442e ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.38-11-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,msdos1)'
search --no-floppy --fs-uuid --set=root 94108733-fa78-47f3-b04d-31fb682e442e
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=94108733-fa78-47f3-b04d-31fb682e442e 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,msdos1)'
search --no-floppy --fs-uuid --set=root 94108733-fa78-47f3-b04d-31fb682e442e
echo 'Loading Linux 2.6.38-8-generic ...'
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=94108733-fa78-47f3-b04d-31fb682e442e 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,msdos1)'
search --no-floppy --fs-uuid --set=root 94108733-fa78-47f3-b04d-31fb682e442e
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos1)'
search --no-floppy --fs-uuid --set=root 94108733-fa78-47f3-b04d-31fb682e442e
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 ###
--------------------------------------------------------------------------------

=============================== sda1/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/sdb1 during installation
UUID=94108733-fa78-47f3-b04d-31fb682e442e / ext4 errors=remount-ro 0 1
# swap was on /dev/sdb5 during installation
UUID=4c57bb9e-d799-4c06-a5ad-c1ddbcbb46d3 none swap sw 0 0
--------------------------------------------------------------------------------

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

GiB - GB File Fragment(s)

100.152034760 = 107.537428480 boot/grub/core.img 1
100.174812317 = 107.561885696 boot/grub/grub.cfg 1
72.268032074 = 77.597208576 boot/initrd.img-2.6.38-11-generic 2
104.255100250 = 111.943061504 boot/initrd.img-2.6.38-8-generic 2
50.177066803 = 53.877215232 boot/vmlinuz-2.6.38-11-generic 1
100.150306702 = 107.535572992 boot/vmlinuz-2.6.38-8-generic 1
72.268032074 = 77.597208576 initrd.img 2
104.255100250 = 111.943061504 initrd.img.old 2
50.177066803 = 53.877215232 vmlinuz 1
100.150306702 = 107.535572992 vmlinuz.old 1

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

unlzma: Decoder error






Can anyone help me reinstall windows using usb flash preferably since I have no cd drive :( 
m
0
l
March 3, 2012 5:07:52 AM

Ok, so clearly it looks as if /dev/sdb1 contains a fat32 formatted partition that presumably contains your Windows install you wish to re-introduce to the boot menu.

You can either try to re-run sudo update-grub2 (and take note of any "OS Prober" output) or, if that fails, you can add a rule file to the /etc/grub.d/ directory that's used to generate the grub2 boot config.

Instructions for manually adding the entry (should still be largely accurate)
General ubuntu guide on grub2
m
0
l
March 3, 2012 6:11:21 AM

@bmouring

Thanks for the reply; however the edit notes are the updates on the situation (possible not clear since it is a large post). I have left in the Ubuntu info (for insight).


I no longer have it installed as I prefer to have a fresh clean WIN7 install prior to loading Ubuntu 11.10 in dual boot mode. Everything is now fine with WIN7 except for this boot problem.

Ideally I would like it resolved before moving to the dual boot install so I no longer have access to Ubuntu to run sudo.

I am not sure if it is a legacy of Ubuntu 11.10 or the original Android that came with Acer. I have tried cleaning the MBR area to no avail. Like I said it boots fine when F9 is selected but that is not the correct procedure. I am leaning to the Ubuntu since I had a Win 7 only install after the original Android/Vista and that worked fine .. I also ran Ubuntu Server 11.04 perfectly and switched back ... it's only since the desktop version was installed and using the whole disk that the problems have manifested ...

My next plan is to use EasyBCD to look at it .. but any thoughts are welcome




















m
0
l
March 4, 2012 1:39:58 AM

Sorry about missing the point of the post, it was long and by the time I got to the bottom I'd forgotten your edits at the top.

It sounds like there is some sort of corruption on your new Windows install, the issue may be with the media. I would suggest removing the ubuntu hdd from the system, installing windows, then re-introducing the ubuntu hdd after the fact (you may need to play with the hdd boot order in BIOS/UEFI order to get things to boot grub first)
m
0
l
!