PDA

View Full Version : [ubuntu] windows 7 does not start after installling ubuntu 9.10 dektop



taran_utd
February 20th, 2010, 10:39 AM
Hi,
I have installed ubuntu 9.10 desktop version and i am unable to boot into windows7 which i had installed before ubuntu.

I am not able to get a dual boot menu for booting into windows.

When i typed fdisk -l i got the following output.

Device Boot Start End Blocks Id System

/dev/sda1 1 6375 51200000 7 HPFS/NTFS

/dev/sda2 * 6376 8923 20466810 83 Linux

/dev/sda3 8924 20899 96187471+ 7 HPFS/NTFS

/dev/sda4 29839 30401 4522297+ 5 Extended

/dev/sda5 29839 30401 4522266 82 Linux swap / Solaris


And i am also missing a menu.lst file in the /boot/grub folder
(and someone told me that there is no menu.lst file in ubuntu 9.10)

when i open the grub.cfg file i get the following output.

#

# 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,2)

search --no-floppy --fs-uuid --set 7c4ea7fe-dbe5-41df-a4bb-f1f4e664a2f0

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-14-generic"
{

recordfail=1

if [ -n ${have_grubenv} ]; then save_env recordfail; fi

set quiet=1

insmod ext2

set root=(hd0,2)

search --no-floppy --fs-uuid --set 7c4ea7fe-dbe5-41df-a4bb-f1f4e664a2f0

linux /boot/vmlinuz-2.6.31-14-generic root=UUID=7c4ea7fe-dbe5-41df-a4bb-f1f4e664a2f0 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,2)

search --no-floppy --fs-uuid --set 7c4ea7fe-dbe5-41df-a4bb-f1f4e664a2f0

linux /boot/vmlinuz-2.6.31-14-generic root=UUID=7c4ea7fe-dbe5-41df-a4bb-f1f4e664a2f0 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 ###

please help!!

darkod
February 20th, 2010, 11:22 AM
Follow these instructions and post the content of your results.txt file here in CODE tags.
http://ubuntuforums.org/showpost.php?p=8844901&postcount=4

You can do this from the live desktop or from your hdd ubuntu.

The main question is whether you win7 boot files are OK and located where they should be. If ubuntu can't detect windows boot files, it doesn't know it even exists.

Also, the boot flag (*) should be on the win7 system partition, probably /dev/sda1, not on /dev/sda2.

taran_utd
February 20th, 2010, 12:46 PM
i have installed 32-bit windows 7 and 32-bit ubuntu 9.10
thank you for the response

taran_utd
February 20th, 2010, 12:58 PM
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 #2 for /boot/grub.
=> No boot loader 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: Windows 7
Boot files/dirs: /Windows/System32/winload.exe

sda2: __________________________________________________ _______________________

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

sda3: __________________________________________________ _______________________

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:

sda4: __________________________________________________ _______________________

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/dirs:

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

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x0defc2af

Partition Boot Start End Size Id System

/dev/sda1 2,048 102,402,047 102,400,000 7 HPFS/NTFS
/dev/sda2 * 102,414,375 143,347,994 40,933,620 83 Linux
/dev/sda3 143,362,048 335,736,990 192,374,943 7 HPFS/NTFS
/dev/sda4 479,347,470 488,392,064 9,044,595 5 Extended
/dev/sda5 479,347,533 488,392,064 9,044,532 82 Linux swap / Solaris


Drive: sdb ___________________ __________________________________________________ ___

Disk /dev/sdb: 4009 MB, 4009754624 bytes
90 heads, 25 sectors/track, 3480 cylinders, total 7831552 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00000000

Partition Boot Start End Size Id System

/dev/sdb1 8,192 7,843,839 7,835,648 b W95 FAT32

/dev/sdb1 ends after the last sector of /dev/sdb

blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/sda1 38EE6A8DEE6A436C ntfs
/dev/sda2 7c4ea7fe-dbe5-41df-a4bb-f1f4e664a2f0 ext4
/dev/sda3 1838EAF338EACF36 ntfs
/dev/sda5 aca9e576-61d1-4952-93db-ea2b9fdb4a90 swap
/dev/sdb1 71E7-9C6A vfat NISHA

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

Device Mount_Point Type Options

aufs / aufs (rw)
/dev/sr0 /cdrom iso9660 (rw)
/dev/loop0 /rofs squashfs (rw)
/dev/sdb1 /media/NISHA vfat (rw,nosuid,nodev,uhelper=devkit,uid=999,gid=999,sh ortname=mixed,dmask=0077,utf8=1,flush)


=========================== sda2/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,2)
search --no-floppy --fs-uuid --set 7c4ea7fe-dbe5-41df-a4bb-f1f4e664a2f0
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-14-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set 7c4ea7fe-dbe5-41df-a4bb-f1f4e664a2f0
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=7c4ea7fe-dbe5-41df-a4bb-f1f4e664a2f0 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,2)
search --no-floppy --fs-uuid --set 7c4ea7fe-dbe5-41df-a4bb-f1f4e664a2f0
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=7c4ea7fe-dbe5-41df-a4bb-f1f4e664a2f0 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 ###

=============================== sda2/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/sda2 during installation
UUID=7c4ea7fe-dbe5-41df-a4bb-f1f4e664a2f0 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=aca9e576-61d1-4952-93db-ea2b9fdb4a90 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

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


54.1GB: boot/grub/core.img
54.1GB: boot/grub/grub.cfg
54.0GB: boot/initrd.img-2.6.31-14-generic
54.0GB: boot/vmlinuz-2.6.31-14-generic
54.0GB: initrd.img
54.0GB: vmlinuz

taran_utd
February 20th, 2010, 01:02 PM
This is the result which i got after running the script.
I hope i did got the proper result for you.
Thanks for the help!

taran_utd
February 20th, 2010, 01:11 PM
And i forgot to mention that i have a lenovo n100 laptop.
And it comes with a one key recovery option so the "sdb" disk partition you are analyzing is the one key recover partition probably if i am not mistaking it.
And probably they embed window xp in the sdb disk itself which is by default the factory settings.
But i dont think that this is causing the problems.
Because i have already installed windows 7.

darkod
February 20th, 2010, 01:25 PM
You are missing the win7 load files.

Boot files/dirs: /Windows/System32/winload.exe

Besides winload.exe you should also have /bootmgr and /Boot/BCD here. Read hee about repairing win7 boot process:

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

If you don't have win7 install dvd you can get a rescue cd here:
http://neosmart.net/blog/2009/windows-7-system-repair-discs/

After restoring win7 boot files it will overwrite grub2 from the MBR of /dev/sda. You will need to boot with the ubuntu 9.10 cd, Try Ubuntu option, and in terminal execute:

sudo mount /dev/sda2 /mnt
sudo grub-install --root-directory=/mnt/ /dev/sda

Restart and all should be fine.