PDA

View Full Version : [ubuntu] Windows doesnt appear (no boot screen)



Chirath
November 19th, 2010, 06:12 PM
I had windows in my D: drive and I formatted C: (primary) drive and installed Ubuntu 10.10.
Now I cannot find windows login option when boots. Actually, there's no boot screen visible. Computer just wait some seconds and directs to the Ubuntu system.

Boot Info Script yields followings:



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.

sda1: __________________________________________________ _______________________

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

sda2: __________________________________________________ _______________________

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

sda5: __________________________________________________ _______________________

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

sda6: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: According to the info in the boot sector, sda6 starts
at sector 63.
Operating System:
Boot files/dirs:

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

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

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 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 2,000,895 1,998,848 82 Linux swap / Solaris
/dev/sda2 2,002,942 234,420,479 232,417,538 f W95 Ext d (LBA)
/dev/sda5 40,965,813 81,931,499 40,965,687 7 HPFS/NTFS
/dev/sda6 81,931,563 234,420,479 152,488,917 7 HPFS/NTFS
/dev/sda7 2,002,944 40,964,095 38,961,152 83 Linux


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/sda1 c26cc2c8-3ec1-47be-a7b9-6bfeb1a52166 swap
/dev/sda2: PTTYPE="dos"
/dev/sda5 E62C5E442C5E1043 ntfs
/dev/sda6 0EECA0F8ECA0DAEB ntfs
/dev/sda7 654b7996-a2ab-47e6-a478-5d2cfa9d0e27 ext4
/dev/sda: PTTYPE="dos"

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

Device Mount_Point Type Options

/dev/sda7 / ext4 (rw,errors=remount-ro,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 654b7996-a2ab-47e6-a478-5d2cfa9d0e27
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 654b7996-a2ab-47e6-a478-5d2cfa9d0e27
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-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 654b7996-a2ab-47e6-a478-5d2cfa9d0e27
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=654b7996-a2ab-47e6-a478-5d2cfa9d0e27 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 654b7996-a2ab-47e6-a478-5d2cfa9d0e27
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=654b7996-a2ab-47e6-a478-5d2cfa9d0e27 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 654b7996-a2ab-47e6-a478-5d2cfa9d0e27
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 654b7996-a2ab-47e6-a478-5d2cfa9d0e27
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 ###

=============================== 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=654b7996-a2ab-47e6-a478-5d2cfa9d0e27 / ext4 errors=remount-ro 0 1
/dev/sda1 none swap sw 0 0

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


10.1GB: boot/grub/core.img
16.2GB: boot/grub/grub.cfg
16.6GB: boot/initrd.img-2.6.35-22-generic
10.0GB: boot/vmlinuz-2.6.35-22-generic
16.6GB: initrd.img
10.0GB: vmlinuz
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader on sda2

00000000 98 5d d2 06 00 98 20 05 f2 48 f7 02 50 80 d1 06 |.].... ..H..P...|
00000010 cc 49 f7 02 00 00 00 00 c5 13 00 20 01 00 00 00 |.I......... ....|
00000020 f8 5d d2 06 00 98 20 05 f2 48 f7 02 50 80 d1 06 |.].... ..H..P...|
00000030 cc 49 f7 02 00 00 00 00 c5 13 00 20 01 00 00 00 |.I......... ....|
00000040 58 5e d2 06 00 98 20 05 f2 48 f7 02 50 80 d1 06 |X^.... ..H..P...|
00000050 cc 49 f7 02 00 00 00 00 c5 13 00 20 01 00 00 00 |.I......... ....|
00000060 b8 5e d2 06 00 98 20 05 f2 48 f7 02 50 80 d1 06 |.^.... ..H..P...|
00000070 cc 49 f7 02 00 00 00 00 c5 13 00 20 01 00 00 00 |.I......... ....|
00000080 18 5f d2 06 00 98 20 05 f2 48 f7 02 50 80 d1 06 |._.... ..H..P...|
00000090 cc 49 f7 02 00 00 00 00 c5 13 00 20 01 00 00 00 |.I......... ....|
000000a0 78 5f d2 06 00 98 20 05 f2 48 f7 02 50 80 d1 06 |x_.... ..H..P...|
000000b0 cc 49 f7 02 00 00 00 00 c5 13 00 20 01 00 00 00 |.I......... ....|
000000c0 d8 5f d2 06 00 98 20 05 f2 48 f7 02 50 80 d1 06 |._.... ..H..P...|
000000d0 cc 49 f7 02 00 00 00 00 c5 13 00 20 01 00 00 00 |.I......... ....|
000000e0 38 60 d2 06 00 98 20 05 f2 48 f7 02 50 80 d1 06 |8`.... ..H..P...|
000000f0 cc 49 f7 02 00 00 00 00 c5 13 00 20 01 00 00 00 |.I......... ....|
00000100 98 60 d2 06 00 98 20 05 f2 48 f7 02 50 80 d1 06 |.`.... ..H..P...|
00000110 cc 49 f7 02 00 00 00 00 c5 13 00 20 01 00 00 00 |.I......... ....|
00000120 f8 60 d2 06 00 98 20 05 f2 48 f7 02 50 80 d1 06 |.`.... ..H..P...|
00000130 cc 49 f7 02 00 00 00 00 c5 13 00 20 01 00 00 00 |.I......... ....|
00000140 58 61 d2 06 00 98 20 05 f2 48 f7 02 50 80 d1 06 |Xa.... ..H..P...|
00000150 cc 49 f7 02 00 00 00 00 c5 13 00 20 01 00 00 00 |.I......... ....|
00000160 b8 61 d2 06 00 98 20 05 f2 48 f7 02 50 80 d1 06 |.a.... ..H..P...|
00000170 cc 49 f7 02 00 00 00 00 c5 13 00 20 01 00 00 00 |.I......... ....|
00000180 18 62 d2 06 00 98 20 05 f2 48 f7 02 50 80 d1 06 |.b.... ..H..P...|
00000190 cc 49 f7 02 00 00 00 00 c5 13 00 20 01 00 00 00 |.I......... ....|
000001a0 78 62 d2 06 00 98 20 05 f2 48 f7 02 50 80 d1 06 |xb.... ..H..P...|
000001b0 cc 49 f7 02 00 00 00 00 c5 13 00 20 01 00 00 fe |.I......... ....|
000001c0 ff ff 07 fe ff ff b7 86 52 02 37 16 71 02 00 fe |........R.7.q...|
000001d0 ff ff 05 fe ff ff ee 9c c3 04 14 cc 16 09 00 00 |................|
000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000200




How can I recover my windows?
Please help me.

Quackers
November 19th, 2010, 06:37 PM
Can I ask how Windows came to be on sda5? It appears that Windows is installed in a partition (sda5) which is part of an extended partition (sda2). I don't think Windows will boot from an extended partition - it needs to be a primary partition iirc.

Rubi1200
November 19th, 2010, 06:42 PM
The other problem is that the boot files for Windows are missing on both sda5 and sda6.

You can try oldfred's suggestions for recovering the install, but Quackers may be right which would mean having to reinstall Windows on a primary partition.

(I also don't understand why you have swap on a primary partition)


Boot files/dirs: /boot.ini /ntldr /NTDETECT.COM

Have you run chkdsk? That may correct something as you seem to have some errors.

Do you have good backups of your windows data? After the chkdsk you should be able to mount the NTFS partition and copy data.

There are several ways to get the boot files back and repair your XP partiton. One is totally from Ubuntu, most use the windows XP CD. You need all 3 files and possibly repair the windows boot sector to get it to boot. This assumes all the other files for windows are intact in the /windows & /windows/system & /windows/system32.


XP CD fixboot
http://www.ehow.com/how_4891476_rein...ootloader.html (http://www.ehow.com/how_4891476_reinstall-xp-bootloader.html)
Can you boot into Ubuntu? If so you can mount your Windows drive and navigate to C:\windows\ServicePackFiles\i386 folder and copy
ntdetect.com and ntldr to root of C:\.

Description of the Windows XP Recovery Console for advanced users
http://support.microsoft.com/kb/314058/
To run the Recovery Console from the Windows XP startup disks or the Windows XP CD-ROM, follow these steps:
1. Insert the Windows XP startup disk into the floppy disk drive, or insert the Windows XP CD-ROM into the CD-ROM drive, and then restart the computer.

Click to select any options that are required to start the computer from the CD-ROM drive if you are prompted.
2. When the "Welcome to Setup" screen appears, press R to start the Recovery Console.
3. If you have a dual-boot or multiple-boot computer, select the installation that you must access from the Recovery Console.
4. When you are prompted, type the Administrator password. If the administrator password is blank, just press ENTER.
5. At the command prompt, type this commands one at a time.

FIXMBR C: #do not run if you still want grub in the MBR
FIXBOOT C:
COPY [CDDRIVE]:\I386\NTLDR C:\
COPY [CDDRIVE]:\I386\NTDETECT.COM C:\
or:

BOOTCFG /rebuild #to rebuild boot.ini
http://support.microsoft.com/kb/291980
http://pcsupport.about.com/od/fixthe...airbootini.htm (http://pcsupport.about.com/od/fixtheproblem/ht/repairbootini.htm)

How to fix XP when the boot files are missing & info on windows in logical partitions
http://ubuntuforums.org/showthread.php?t=813628
missing boot files meieifra - post 10
http://ubuntuforums.org/showthread.php?t=1241394courtesy of oldfred; includes information about Windows on logical partitions.

Chirath
November 19th, 2010, 11:07 PM
can we change the swap area?
or can i make sda5 a primary partition?

Chirath
November 19th, 2010, 11:09 PM
I have tried all the suggestions by oldfred but couldn't restore my windows
:(

Quackers
November 19th, 2010, 11:59 PM
If Windows is in an extended partition (as it appears to be) I don't think it will boot. If this is the case it would be necessary to re-install Windows in a primary partition.
If you would like to wait a while, there will be more knowledgable members here later. They may be able to offer a different course of action.
Good luck.

oldfred
November 20th, 2010, 12:06 AM
None of the Microsoft tools will repair an XP partition in a logical partition. The last two links should work.

All of these suggestions can cause total corruption and require reformatting and reinstalling. Make sure you have good backups. They are for more advanced users. I have never used them.

It might be easier to just copy your XP partition to a primary partition and then it may be repairable.

There are ways to totally rewrite your partition table if partitions can still fall within the rules of 3 primary one extended and the rest logical with all the logical within the one extended.

Backup partition table to text file
sudo sfdisk -d /dev/sda > PT.txt

Use sfdisk to edit partitions
Using sfdisk to fix partition table problems - not without risk
http://ubuntuforums.org/showthread.php?t=1192598

Caljohnsmith using sfdisk to edit partition table from text file
http://ubuntuforums.org/showthread.php?t=1036600



(http://ubuntuforums.org/showthread.php?t=1192598)

wilee-nilee
November 20th, 2010, 12:06 AM
Was this a cloned XP? actually OP you have some great help here so I will just watch and learn.;)

coffeecat
November 20th, 2010, 12:10 AM
The Windows boot files need to be on partition 1 because...



sda5: __________________________________________________ _______________________

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

sda6: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: According to the info in the boot sector, sda6 starts
at sector 63.
Operating System:
Boot files/dirs:


Sector 63 is where the first partition usually starts. When you took out C: and replaced it with a Linux swap partition, you took out the boot files. You'll need to recreate a Windows boot partition as sda1, but how I don't know. Quackers is right - Windows can't boot from a logical partition, but it can run in a logical partition if it boots from a primary. More info here:

http://www.zyxware.com/articles/2008/07/20/how-to-install-and-boot-windows-on-a-logical-parition

Sorry I can't be more coherent. Too late here and also need to leave this to the Windows experts.

Chirath
November 20th, 2010, 12:49 PM
seems like i cannot recover windows. :( Thank you very much all for your valuable knowledge. At least now I knw hw to save a windows installation when installing a linux one. :)

coffeecat
November 20th, 2010, 12:58 PM
You didn't answer Quackers' question how came Windows to be on a logical partition. Out of interest, was this a pre-installed Windows with an OEM machine or did you install it yourself? It's most unusual to have a setup like this. If it was a pre-install, what is the make and model of computer?

EDIT @Chirath, apologies, I should have added: I believe it is possible to recover Windows. I should imagine that reformatting sda1 to NTFS, setting the boot flag on it, copying the Windows boot files onto it and running fixboot on your newly-created C: partition is the answer. However, there are one or two little wrinkles. As I pointed out earlier, sda5 is expecting to start at sector 63 which is where, I guess, sda1 used to start. Except that now sda1 starts at sector 2048, probably as a result of using a recent version of Gparted. Whether that matters, I don't know. Also - you'll probably need a Microsoft XP install disc for some of this; an OEM restore disc won't do. Do you have any Windows restore/install discs?

Don't give up just yet - someone with enough expertise may be able to take you through this.

Chirath
November 20th, 2010, 06:45 PM
@CoffeCat: Yeah. for that question.....
I was having troubles with windows sp2 installed on C: due to virus attacks. Then I installed windows sp3 on D:. Meanwhile, I got to knw ppl in my university who are enjoying ubuntu life. :)
Therefore, I installed Ubuntu by deleting C:. First I created a swap area of 1024MB and then ext4 partition of the rest available at that moment.

Thank you for your advice I'll never give up till I accomplish my mission. :D

Chirath
November 20th, 2010, 06:53 PM
The recent development of the problem
I installed start up manager in Ubuntu Software Center and changed settings to get windows into the bootloader. Now, a new problem has risen.
i.e. :

a disk read error occured. Press Ctrl+Alt+Del to restart

I think I have reduced the severity of the issue. :) Hope somebody could help me.

Thank you.

coffeecat
November 20th, 2010, 09:24 PM
I installed start up manager in Ubuntu Software Center and changed settings to get windows into the bootloader.

@Chirath, you cannot boot Windows until you recreate a primary C: partition with the Windows boot files. There is simply no way around that. To repeat: Windows cannot boot from a logical partition. You have to have the Windows boot files in a primary partition.