PDA

View Full Version : [ubuntu] Unable to boot Windows



Frank67
January 24th, 2010, 02:54 AM
I was dual booting Windows Vista and 7. I erased Vista and installed Karmic Koala. It seems I erased something necessary for Windows to boot, so I cannot boot into windows 7 anymore. (Though I can mount it in ubuntu).

I ran the the Boot Info Script, and here are the contents of RESULTS.txt:


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

=> Grub 1.97 is installed in the MBR of /dev/sda and looks on the same drive
in partition #1 for /boot/grub.
sda1: __________________________________________________ _______________________

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

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: swap
Boot sector type: -
Boot sector info:

sda4: __________________________________________________ _______________________

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

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

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x000c7797

Partition Boot Start End Size Id System

/dev/sda1 * 63 48,821,534 48,821,472 83 Linux
/dev/sda2 307,212,288 625,139,711 317,927,424 7 HPFS/NTFS
/dev/sda3 48,821,535 56,629,124 7,807,590 82 Linux swap / Solaris
/dev/sda4 56,629,125 307,210,994 250,581,870 83 Linux


blkid -c /dev/null: __________________________________________________ __________

/dev/sda1: UUID="1bd7323b-c91e-4c6a-bef8-9a1538b2e6a3" TYPE="ext4"
/dev/sda2: UUID="E262238D6223660F" TYPE="ntfs"
/dev/sda3: UUID="a84033fe-418b-4836-8cf0-4313ec59f215" TYPE="swap"
/dev/sda4: UUID="d2ece803-3ec0-4266-b7c6-88e41dc5e814" TYPE="ext4"

=============================== "mount" output: ===============================

/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
/dev/sda4 on /home type ext4 (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/dmeierfr/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=dmeierfr)


=========================== sda1/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 /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 1bd7323b-c91e-4c6a-bef8-9a1538b2e6a3
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
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/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-17-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 1bd7323b-c91e-4c6a-bef8-9a1538b2e6a3
linux /boot/vmlinuz-2.6.31-17-generic root=UUID=1bd7323b-c91e-4c6a-bef8-9a1538b2e6a3 ro quiet splash
initrd /boot/initrd.img-2.6.31-17-generic
}
menuentry "Ubuntu, Linux 2.6.31-17-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 1bd7323b-c91e-4c6a-bef8-9a1538b2e6a3
linux /boot/vmlinuz-2.6.31-17-generic root=UUID=1bd7323b-c91e-4c6a-bef8-9a1538b2e6a3 ro single
initrd /boot/initrd.img-2.6.31-17-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 1bd7323b-c91e-4c6a-bef8-9a1538b2e6a3
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=1bd7323b-c91e-4c6a-bef8-9a1538b2e6a3 ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 1bd7323b-c91e-4c6a-bef8-9a1538b2e6a3
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=1bd7323b-c91e-4c6a-bef8-9a1538b2e6a3 ro single
initrd /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -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 ###

=============================== 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 defaults 0 0
# / was on /dev/sda1 during installation
UUID=1bd7323b-c91e-4c6a-bef8-9a1538b2e6a3 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda4 during installation
UUID=d2ece803-3ec0-4266-b7c6-88e41dc5e814 /home ext4 defaults 0 2
# swap was on /dev/sda3 during installation
UUID=a84033fe-418b-4836-8cf0-4313ec59f215 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

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


.0GB: boot/grub/core.img
.0GB: boot/grub/grub.cfg
.0GB: boot/initrd.img-2.6.31-14-generic
.0GB: boot/initrd.img-2.6.31-17-generic
.0GB: boot/vmlinuz-2.6.31-14-generic
.0GB: boot/vmlinuz-2.6.31-17-generic
.0GB: initrd.img
.0GB: initrd.img.old
.0GB: vmlinuz
.0GB: vmlinuz.old

kansasnoob
January 24th, 2010, 03:11 AM
First try something really simple, while booted into Ubuntu run:


sudo update-grub

Wait until it says done.

Then post the output from terminal of that previous command and also the output of:


cat /boot/grub/grub.cfg

Oh, and you can try to boot Windows after posting that output.

rogue_0111
January 24th, 2010, 03:15 AM
May be of some assistance or insight:

http://ubuntuforums.org/showthread.php?t=1035999

--

Frank67
January 24th, 2010, 03:31 AM
sudo update grub:


Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.31-17-generic
Found initrd image: /boot/initrd.img-2.6.31-17-generic
Found linux image: /boot/vmlinuz-2.6.31-14-generic
Found initrd image: /boot/initrd.img-2.6.31-14-generic
Found memtest86+ image: /boot/memtest86+.bin
done


and 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 /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 1bd7323b-c91e-4c6a-bef8-9a1538b2e6a3
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
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/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-17-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 1bd7323b-c91e-4c6a-bef8-9a1538b2e6a3
linux /boot/vmlinuz-2.6.31-17-generic root=UUID=1bd7323b-c91e-4c6a-bef8-9a1538b2e6a3 ro quiet splash
initrd /boot/initrd.img-2.6.31-17-generic
}
menuentry "Ubuntu, Linux 2.6.31-17-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 1bd7323b-c91e-4c6a-bef8-9a1538b2e6a3
linux /boot/vmlinuz-2.6.31-17-generic root=UUID=1bd7323b-c91e-4c6a-bef8-9a1538b2e6a3 ro single
initrd /boot/initrd.img-2.6.31-17-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 1bd7323b-c91e-4c6a-bef8-9a1538b2e6a3
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=1bd7323b-c91e-4c6a-bef8-9a1538b2e6a3 ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 1bd7323b-c91e-4c6a-bef8-9a1538b2e6a3
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=1bd7323b-c91e-4c6a-bef8-9a1538b2e6a3 ro single
initrd /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -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 ###

and Windows doesn't boot

meierfra.
January 24th, 2010, 03:34 AM
Since your are missing "bootmgr", "update-grub" will not be able to detect your Win 7. It is best to run the "Start Up Repair" from the Win 7 CD. Since "Start up repair" might get confused with the boot flag on the Ubuntu partition, you should first move the boot flag to the Win 7 partition.



sudo sfdisk -A2 /dev/sda


Next boot from your Windows 7 CD/DVD. (If you do not have one, you can download a Windows 7 CD from here (http://neosmart.net/blog/2009/windows-7-system-repair-discs/))

At the first screen select your favorite language.
At the second screen choose "Repair your Computer".

If a pop up appears, offering to repair a problem with the "Startup options", click on "Repair and restart".

Otherwise, on the next screen select "Use recovery tools ..." and click on "Next".
Choose "Startup Repair" at the next screen.

"Startup Repair" tends to fix one problem at the time. So you might have to run "Startup Repair" several times.


After running startup repair, boot into Ubuntu and run


sudo update-grub

Hopefully this will be enough to fix your problem. If not come back here and report any error messages you got.

Frank67
January 24th, 2010, 03:44 AM
I have neither a windows 7 CD, nor blank CD's. Is there any way to boot off a virtual CD, or do I need to get blank CD's?

meierfra.
January 24th, 2010, 03:54 AM
Is there any way to boot off a virtual CD,
It might be possible, but I don't know how.


get blank CD's?
That's probably the easier solution.

Frank67
January 26th, 2010, 02:35 AM
Thank you! I ran the Windows 7 start up repair, and then Grub recognized it. It boots fine now.

Mark Phelps
January 26th, 2010, 02:44 AM
Most probably what happened is that you had Vista installed first and then when you installed Win7, it wrote its loader files into the Vista partition. So, when you removed the Vista partition, you removed the Win7 loader files as well.

When you ran Startup Repair, it detected the absence of Win7 loader files and rewrote them.

Glad to see it worked out so easily for you ...

meierfra.
January 26th, 2010, 03:12 AM
It boots fine now.
My usual response would be:

Great. Have fun with Ubuntu and Windows 7.
But in view of this quote from RESULTS.txt


/home/dmeierfr/.gvfs

I'm changing my response to:

Great. Put Ubuntu to good work and don't even dare to boot into Window 7. No playing games for you.