PDA

View Full Version : [ubuntu] windows 7, then ubuntu, win 7 won't boot



abhi488
October 3rd, 2010, 01:16 AM
sudo fdisk -l

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 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: 0xfd5d114b

Device Boot Start End Blocks Id System
/dev/sda1 1 1 992+ 42 SFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 * 1 26 203776 42 SFS
Partition 2 does not end on cylinder boundary.
/dev/sda3 26 34400 276108288 42 SFS
/dev/sda4 34400 38914 36257112 83 Linux

Hello.
My laptop came pre installed with Windows 7. I installed Ubuntu and now when I select the start Windows 7 option via GRUB , the initial page 'starting windows/microsoft corporation' comes, then I get a blue screen and the system reboots.
Ubuntu works fine, how do I get windows 7 to boot.
Is it the case that I have not properly made the partitions and installing ubuntu has overwritten etc ??

Also attached are Results from running sudo bash boot_info_script055.sh
Please help me out..

wilee-nilee
October 3rd, 2010, 01:57 AM
For the masses.

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 #4 for /boot/grub.

sda1: __________________________________________________ _______________________

File system:
Boot sector type: -
Boot sector info:
Mounting failed:
mount: unknown filesystem type ''

sda2: __________________________________________________ _______________________

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

sda3: __________________________________________________ _______________________

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

sda4: __________________________________________________ _______________________

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

=========================== 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
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sda1 63 2,047 1,985 42 SFS
/dev/sda2 * 2,048 409,599 407,552 42 SFS
/dev/sda3 409,600 552,626,175 552,216,576 42 SFS
/dev/sda4 552,626,176 625,140,399 72,514,224 83 Linux


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/sda2 5222235822233FF9 ntfs SYSTEM
/dev/sda3 1890860A9085EF16 ntfs
/dev/sda4 24b3bbcf-af02-45d0-bf7c-226710775753 ext2
/dev/sda: PTTYPE="dos"
error: /dev/sdb: No medium found

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

Device Mount_Point Type Options

/dev/sda4 / ext2 (rw,errors=remount-ro)


=========================== sda4/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 $prefix/grubenv ]; then
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
}
insmod ext2
set root='(hd0,4)'
search --no-floppy --fs-uuid --set 24b3bbcf-af02-45d0-bf7c-226710775753
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
insmod ext2
set root='(hd0,4)'
search --no-floppy --fs-uuid --set 24b3bbcf-af02-45d0-bf7c-226710775753
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.32-24-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,4)'
search --no-floppy --fs-uuid --set 24b3bbcf-af02-45d0-bf7c-226710775753
linux /boot/vmlinuz-2.6.32-24-generic root=/dev/sda4 ro quiet splash
initrd /boot/initrd.img-2.6.32-24-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,4)'
search --no-floppy --fs-uuid --set 24b3bbcf-af02-45d0-bf7c-226710775753
echo 'Loading Linux 2.6.32-24-generic ...'
linux /boot/vmlinuz-2.6.32-24-generic root=/dev/sda4 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-24-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,4)'
search --no-floppy --fs-uuid --set 24b3bbcf-af02-45d0-bf7c-226710775753
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,4)'
search --no-floppy --fs-uuid --set 24b3bbcf-af02-45d0-bf7c-226710775753
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/sda2)" {
insmod ntfs
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 5222235822233ff9
chainloader +1
}
menuentry "Windows Vista (loader) (on /dev/sda3)" {
insmod ntfs
set root='(hd0,3)'
search --no-floppy --fs-uuid --set 1890860a9085ef16
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 ###

=============================== sda4/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
/dev/sda4 / ext2 errors=remount-ro 0 1

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


308.0GB: boot/grub/core.img
307.9GB: boot/grub/grub.cfg
307.8GB: boot/initrd.img-2.6.32-24-generic
307.9GB: boot/vmlinuz-2.6.32-24-generic
307.8GB: initrd.img
307.9GB: vmlinuz
=======Devices which don't seem to have a corresponding hard drive==============

sdb

wilee-nilee
October 3rd, 2010, 02:00 AM
END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda2)" {
insmod ntfs
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 5222235822233ff9
chainloader +1
}
menuentry "Windows Vista (loader) (on /dev/sda3)" {
insmod ntfs
set root='(hd0,3)'
search --no-floppy --fs-uuid --set 1890860a9085ef16
chainloader +1

Are you seeing two windows choices in the grub menus?

Have you also run sudo update-grub in Ubuntu?

Have you run a chkdsk /f on the W7 partitions?

You appear to have encrypted the W7 part or at least it can be done with the the SFS partition notation.

abhi488
October 3rd, 2010, 02:36 AM
Thanks for the reply wilee-nilee

sudo update-grub

Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-24-generic
Found initrd image: /boot/initrd.img-2.6.32-24-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda2
Found Windows Vista (loader) on /dev/sda3
done

When i run
fsck /dev/sda2 or fsck /dev/sda3
I get fsck.ntfs: not found

At the time of startup, I see..

Ubuntu with Linux --- generic
Ubuntu with Linux --- generic (recovery mode)
Memory Test
Windows 7 (loader) (on /dev/sda2)
Windows Vista (loader) (on /dev/sda3)

What do you mean by encrypted file system ?

wilee-nilee
October 3rd, 2010, 02:46 AM
Have you run a chkdsk /f on the W7 partitions?

abhi488
October 3rd, 2010, 03:03 AM
I can't start windows 7 as such, and the terminal(ubuntu) doesn't run 'chkdsk'

sudo ntfsfix /dev/sda2

Mounting volume... OK
Processing of $MFT and $MFTMirr completed successfully.
NTFS volume version is 3.1.
NTFS partition /dev/sda2 was processed successfully.


sudo ntfsfix /dev/sda3

Mounting volume... OK
Processing of $MFT and $MFTMirr completed successfully.
NTFS volume version is 3.1.
NTFS partition /dev/sda3 was processed successfully.

sudo ntfsfix /dev/sda1
Mounting volume... Failed to startup volume: Invalid argument.
FAILED
Attempting to correct errors... FAILED
Failed to startup volume: Invalid argument.
Volume is corrupt. You should run chkdsk.


Maybe this should give a picture ??

confused57
October 3rd, 2010, 03:23 AM
You might be able to run a chkdsk, using the Windows 7 recovery disc:
http://neosmart.net/blog/2009/windows-7-system-repair-discs/

wilee-nilee
October 3rd, 2010, 03:28 AM
So there is missing important information missing here. For example did you resize the W7 setup first then make sure it was booting before you installed Ubuntu, that is the standard procedure.

If you didn't then a manual chdsk /r run from the command terminal by hitting the f8 key repeatedly immediately upon choosing W7, is probably in order. Any MS OS resized will do a auto-chkdsk anyway, this has not happened correct.

You can also run a chkdsk with a recovery cd here is a link and the instructions on getting to the command line.
http://neosmart.net/blog/2009/windows-7-system-repair-discs/

1) Boot with your Vista/Windows 7 installation disk. Hit <Enter> at the language selection prompt then hit <R> for Repair to get to the Repair section.
2) Select the command prompt (console) and type in the following commands:


chkdsk /r
http://www.sevenforums.com/tutorials/20864-mbr-restore-windows-7-master-boot-record.html

If you want to reload the MS bootloader at this command prompt run. This will remove grub from the mbr making Ubuntu unavailable, except through reloading grub, and or a 3rd part bootloader. I have no real knowledge of the third party bootloaders per sey though.

BootRec.exe /fixmbr