PDA

View Full Version : [ubuntu] Not able to booot into windows after ubuntu reinstallation



Phagocyte
May 19th, 2011, 07:09 AM
I deleted my ubuntu and used a windows live CD to get back the MBR etc using the repair tools. I was able to use windows without any startup problems.

I installed ubuntu again and I dont get that menu where I can choose between Windows and ubuntu.. Im a complete noob. Please help me out..

Quackers
May 19th, 2011, 07:11 AM
Welcome to UF :-)
From your Ubuntu desktop please open a terminal and run
sudo update-grub and enter your password.
You should see the Windows Loader picked up as grub.cfg is run.
If you see that you can reboot and you should then get the grub menu giving you a choice of OS to boot.

Phagocyte
May 19th, 2011, 07:47 AM
No use.. the same thing is happening again.. :(

Quackers
May 19th, 2011, 07:53 AM
Ok that's no good!
Please go to the site below and download the boot script to your DESKTOP and then open up a terminal (Applications > Accessories > terminal) and run


sudo bash ~/Desktop/boot_info_script*.sh

This will produce a results.txt file on your desktop. Please copy the contents of that file and paste them in your next post between CODE tags. For CODE tags click on New Reply (not quick reply)and then click on the # symbol in the toolbar.
This will give a full overview of your current system.
Thanks.

http://bootinfoscript.sourceforge.net/

manishraj2011
May 19th, 2011, 07:58 AM
No use.. the same thing is happening again.. :(
The second time when you installed ubuntu, where diid you choosed to install the grub boot-loader or you went with default options ???

Phagocyte
May 19th, 2011, 08:13 AM
The second time when you installed ubuntu, where diid you choosed to install the grub boot-loader or you went with default options ???
I didnt use the advanced way of choosing partitions.. I selected the first option that comes over..

Phagocyte
May 19th, 2011, 08:14 AM
Quackers.. here it is..


Boot Info Script 0.60 from 17 May 2011


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

=> Grub2 (v1.97-1.98) 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 in partition 1 for (,msdos1)/boot/grub.

sda1: __________________________________________________ ________________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 10.10
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:

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

/dev/sda1 * 2,048 606,713,855 606,711,808 83 Linux
/dev/sda2 606,715,902 625,141,759 18,425,858 5 Extended
/dev/sda5 606,715,904 625,141,759 18,425,856 82 Linux swap / Solaris


"blkid" output: __________________________________________________ ______________

Device UUID TYPE LABEL

/dev/sda1 1fee3a27-395e-4e64-9df8-1c230bf793d2 ext4
/dev/sda5 77d4714a-1633-4a82-a9dd-3d540a81d374 swap

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

Device Mount_Point Type Options

/dev/sda1 / ext4 (rw,errors=remount-ro,commit=600)
/dev/sr0 /media/CD_ROM iso9660 (ro,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000, iocharset=utf8,mode=0400,dmode=0500)


=========================== 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 part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set 1fee3a27-395e-4e64-9df8-1c230bf793d2
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,msdos1)'
search --no-floppy --fs-uuid --set 1fee3a27-395e-4e64-9df8-1c230bf793d2
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,msdos1)'
search --no-floppy --fs-uuid --set 1fee3a27-395e-4e64-9df8-1c230bf793d2
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=1fee3a27-395e-4e64-9df8-1c230bf793d2 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,msdos1)'
search --no-floppy --fs-uuid --set 1fee3a27-395e-4e64-9df8-1c230bf793d2
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=1fee3a27-395e-4e64-9df8-1c230bf793d2 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,msdos1)'
search --no-floppy --fs-uuid --set 1fee3a27-395e-4e64-9df8-1c230bf793d2
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set 1fee3a27-395e-4e64-9df8-1c230bf793d2
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
/dev/sda1 / ext4 errors=remount-ro 0 1
/dev/sda5 none swap sw 0 0
--------------------------------------------------------------------------------

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

GiB - GB File Fragment(s)

54.134307861 = 58.126270464 boot/grub/core.img 1
258.206371307 = 277.246980096 boot/grub/grub.cfg 1
0.311126709 = 0.334069760 boot/initrd.img-2.6.35-22-generic 2
54.132854462 = 58.124709888 boot/vmlinuz-2.6.35-22-generic 1
0.311126709 = 0.334069760 initrd.img 2
54.132854462 = 58.124709888 vmlinuz 1

Phagocyte
May 19th, 2011, 08:15 AM
Im not able to mount my ntfs partitions by going to "Places" also..

Quackers
May 19th, 2011, 08:21 AM
Oh dear. I didn't realise that you had installed 10.10.
The fact is that the 10.10 installer has a big problem with the "install alongside" option and it often over-writes a pre-existing Windows installation.
This major problem has been fixed in 11.04.
This is what has happened in your case I'm afraid.
If you stop using Ubuntu immediately and only use the live cd/usb desktop, it is possible that you can recover the Windows partition(s) using testdisk.
Here are 2 guides for recovering partitions. The second one, by forum member Herman, is the most straightforward, in my opinion.
Good luck.

http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step

http://members.iinet.net.au/~herman546/p21.html

Phagocyte
May 19th, 2011, 08:25 AM
WTF.. :( i have so much of important data!!! :( I will be gonee!!

Quackers
May 19th, 2011, 08:28 AM
I suggest you stop using your installed version of Ubuntu immediately.
Then you can try to use testdisk to try and recover your Windows partition. It may come back intact, it often depends on how much you have used your Ubuntu installation (amongst other things).

Phagocyte
May 19th, 2011, 08:30 AM
There are 3 other partitions actually.. will I get back only the partition where windows in installed?

Quackers
May 19th, 2011, 08:34 AM
It may be possible to get them all back - with some good luck.

Phagocyte
May 19th, 2011, 08:36 AM
i can hardly understand all that that has been given in the method to recover.. :(

Quackers
May 19th, 2011, 08:40 AM
It looks a bit daunting, I agree, but it's not too bad.
Are you using the Herman page (2nd link)?

Phagocyte
May 19th, 2011, 08:42 AM
Yes. The second link.. Im getting the following when i use the fdisk command. Which is the partition im trying to recover?

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: 0x0004584b

Device Boot Start End Blocks Id System
/dev/sda1 * 1 37767 303355904 83 Linux
/dev/sda2 37767 38914 9212929 5 Extended
/dev/sda5 37767 38914 9212928 82 Linux swap / Solaris

Phagocyte
May 19th, 2011, 08:48 AM
Quackers!! :( Reply soon.. really important data.. I should have backed it up

Quackers
May 19th, 2011, 08:54 AM
It's not there yet.
Are you booted into the live cd desktop now?
If not, please do so and make sure you are connected to the internet.
Then please enable the universe repository. Go to System > Admin > synaptic package manager and in that click on Settings > Repositories and add a check in the box labelled “Community-maintained Open Source software (universe)”.
Then close that small window and click on the "reload" tab in the toolbar of synaptic. When it's finished reloading you can close synaptic and open up a terminal and enter
sudo apt-get install testdisk
It may ask for confirmation. If asked enter "y" and hit enter.
When it has finished installing enter in the terminal
sudo testdisk and the program should open up.

Quackers
May 19th, 2011, 09:07 AM
Phagocyte, please note!
If your partitions are recoverable (probably one at a time) they will over-write your Ubuntu installation, so if you have anything there that you wish to keep you should back that up now, from the live cd desktop.

Phagocyte
May 19th, 2011, 09:41 AM
Im getting the following error/message while trying to install testdisk..


E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

Quackers
May 19th, 2011, 09:42 AM
Have you closed the synaptic package manager screen? You can't have that open at the same time.

Phagocyte
May 19th, 2011, 09:43 AM
I have nothing on my ubuntu quackers.. installing it a couple of hours back..

Quackers
May 19th, 2011, 09:43 AM
Ok. We cross-posted. Have a look one post above your last :-)

Phagocyte
May 19th, 2011, 09:44 AM
Oh yes! I have'nt.. thanks! Do keep visiting this thread if your free enough quackers.. I need your help to get out of this mess

Quackers
May 19th, 2011, 09:45 AM
I'll be here for a while yet :-)

Phagocyte
May 19th, 2011, 09:58 AM
Quackerssss!!!! Yo yo.. Got everything back \m/ Thanks I lotttt!!!. I owe you a treat :D

Quackers
May 19th, 2011, 10:06 AM
Wow, nice result! Just check everything still works ok and that all your data is good. Try rebooting once or twice too.
If you want to install Ubuntu, try 10.04 or 11.04, but take care to know how many primary partitions are already in use on your hard drive! The maximum is 4. If you are unsure post a screenshot of gparted screen (from the live desktop).

And don't use the Ubuntu installer to make space for itself. If necessary shrink the Windows partition to make free space from within Windows.

Excellent result! Well done :-)

Phagocyte
May 19th, 2011, 10:29 AM
Quackers.. happy that my data is back.. but im not able to boot into both windows and ubuntu..

I get an error message saying that it is a "unknown filesystem"

Quackers
May 19th, 2011, 10:32 AM
Ubuntu is probably not there any more.
Are you getting a grub menu with a choice of what to boot?

Phagocyte
May 19th, 2011, 10:33 AM
No. I get an error like.. "unknown filesystem".. and then i get something like a command prompt.. with "grub >" and my cursor beside the > symbol.

Quackers
May 19th, 2011, 10:36 AM
Sorry, I'm not clear here. How are you booting Windows?

Phagocyte
May 19th, 2011, 10:39 AM
Right now I'm using an ubuntu bootable pendrive.. I have done nothing but restarted my machine.. and I get that error..

Should I use an windows live cd to boot my windows?

Quackers
May 19th, 2011, 10:41 AM
Yes, depending on what version of Windows you have you will need to repair the MBR of the hard drive. With Vista or Windows 7 you should boot from the repair/installation disc and enter the repair console and in the command prompt window enter
bootrec.exe /fixmbr note the space between exe and /fixmbr.
Then reboot and hope that Windows boots directly.

Phagocyte
May 19th, 2011, 10:43 AM
ok.. :) will do..

Phagocyte
May 19th, 2011, 10:55 AM
I inserted my bootable disk. Started the machine. Enter the system password.. And a screen with the following contents comes up.


error: unkown filesystem
grub rescue>_

The _ is my cursor.

What should I do?

Quackers
May 19th, 2011, 10:56 AM
It's not booting from the disc. Did you change your bios to boot from cd drive first?

Phagocyte
May 19th, 2011, 10:59 AM
yes I changed. CD/DVD is my first priority
I used the same DVD in recengt past also.. I dont think the DVD has some problem..

Quackers
May 19th, 2011, 11:00 AM
Try shutting down the pc then start from cold, rather than rebooting.

Phagocyte
May 19th, 2011, 11:05 AM
It is booting.. finally! :)

Quackers
May 19th, 2011, 11:07 AM
Good, do your stuff!

Phagocyte
May 19th, 2011, 11:09 AM
And.. The reason for me to let Ubuntu take its own space while installing is that I get an error like.. "Please specify the root file system" while I was trying to do it manually.. how to get over this??

Quackers
May 19th, 2011, 11:11 AM
I thought we were trying to boot Windows now! Is it booting?

Phagocyte
May 19th, 2011, 11:16 AM
Sorry.. Clicked the "repair" option.. It searched for windows installations..

An error comes up.. "The file or dir. C:\gcc is corrupt and unreadable. Please run chkdsk utility"

I clicked "ok".. similar errors keep coming for evry folder in my C drive.


FIxed the mbr using command prompt. Now rebooting it..

Phagocyte
May 19th, 2011, 11:18 AM
After rebooting I get a screen.. which says


Windows failed to start. A recent hardware/software change might be the cause.

It asked me to insert the live disk and use the "repair" again.. Shall I do so?

Quackers
May 19th, 2011, 11:22 AM
Yes. It may need to be run up to 3 times.
You should also face the possibility that although the partitions have been recovered the data in them may be damaged or over-written.
See how the repair option goes.

Phagocyte
May 19th, 2011, 11:24 AM
Ok will do..

After detecting the OS's on my lappy. It listed this way

WIndows 7 ultimate [recovered] .. Size - 0, Location - unkown

It is bnormal to show it this way? The Size - 0..

Quackers
May 19th, 2011, 11:27 AM
No it isn't normal :-(
See what happens choosing to run the repair.

Phagocyte
May 19th, 2011, 11:27 AM
I checked the "STart up repair" option.. After a while I got a message that the repair cannot be done automatically.. :(.. What should I do?

Quackers
May 19th, 2011, 11:37 AM
I suspect that it may be too damaged.
I would also suggest that you boot into the Ubuntu live desktop again then try to search the recovered partitions for any data that you want to recover and copy it to external madia. See how much you can save.

There is a system file repair function in Windows called sfc. It may be worth a shot from the command line - possibly.
Here's a link on how to use it
http://www.sevenforums.com/tutorials/139810-sfc-scannow-run-command-prompt-boot.html

Phagocyte
May 19th, 2011, 11:45 AM
ok.. i'll copy the data.. will try the tool you've given.

Quackers
May 19th, 2011, 11:50 AM
Ok, good luck! I suspect you may need some.

solidblogger
May 19th, 2011, 12:18 PM
I have found this link (http://serverproblems.blogspot.com/2011/05/unable-to-boot-into-windows-after.html) i think it should help booot into windows after ubuntu reinstallation

Phagocyte
May 20th, 2011, 01:50 PM
No use.. :( Installing my windows again..

Quackers
May 20th, 2011, 01:55 PM
I'm sorry to hear that, though I suspected it might be necessary :-(
Did you manage to get things backed up first?
Obviously some system files were damaged or over-written.