PDA

View Full Version : [ubuntu] Cant access windows after installing ubuntu



Dpak Sridhar
January 1st, 2011, 05:43 AM
i have a laptop running windows 7 in its perfect condition, i wanted ubuntu on the second partition, everything went ok with installation but when i restarted i didn't get the choice of which system i wanna boot!!! it goes automatically to ubuntu :confused:
WHAT SHOULD I DO NOW ? plz help me, i'm really down

codes which i got for using : sudo fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 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: 0x70000000

Device Boot Start End Blocks Id System
/dev/sda1 * 1 6528 52428801 5 Extended
/dev/sda3 6528 60802 435955736 42 SFS
/dev/sda5 1 3648 29295616 83 Linux
/dev/sda6 3648 3769 975872 82 Linux swap / Solaris
/dev/sda7 3770 6528 22155264 83 Linux







codes which i get while i tried using : sudo bash ~/Desktop/boot_info_script*.sh



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 #5 for (,msdos5)/boot/grub.

sda1: __________________________________________________ _______________________

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

sda5: __________________________________________________ _______________________

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

sda6: __________________________________________________ _______________________

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

sda7: __________________________________________________ _______________________

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

sda3: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Grub 2
Boot sector info: Grub 2 is installed in the boot sector of sda3 and
looks at sector 2043840 of the same hard drive for
core.img, but core.img can not be found at this
location. According to the info in the boot sector,
sda3 has 289406975 sectors, but according to the info
from fdisk, it has 871911471 sectors.
Operating System:
Boot files/dirs:

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

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 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,046 104,859,647 104,857,602 5 Extended
/dev/sda5 2,048 58,593,279 58,591,232 83 Linux
/dev/sda6 58,595,328 60,547,071 1,951,744 82 Linux swap / Solaris
/dev/sda7 60,549,120 104,859,647 44,310,528 83 Linux
/dev/sda3 104,859,648 976,771,119 871,911,472 42 SFS


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/sda1: PTTYPE="dos"
/dev/sda3 6CA6263AA62604E4 ntfs StudIEszzz........
/dev/sda5 9e680a3a-d3fb-4147-8ae0-2129f2c07136 ext4
/dev/sda6 c34d5686-9046-42af-80a7-2371f57e2b6f swap
/dev/sda7 76eca4c7-0ec1-446c-a414-19559985c11f ext4
/dev/sda: PTTYPE="dos"

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

Device Mount_Point Type Options

/dev/sda5 / ext4 (rw,errors=remount-ro,commit=0)
/dev/sda7 /home ext4 (rw,commit=0)


=========================== sda5/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,msdos5)'
search --no-floppy --fs-uuid --set 9e680a3a-d3fb-4147-8ae0-2129f2c07136
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,msdos5)'
search --no-floppy --fs-uuid --set 9e680a3a-d3fb-4147-8ae0-2129f2c07136
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-24-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set 9e680a3a-d3fb-4147-8ae0-2129f2c07136
linux /boot/vmlinuz-2.6.35-24-generic-pae root=UUID=9e680a3a-d3fb-4147-8ae0-2129f2c07136 ro quiet splash
initrd /boot/initrd.img-2.6.35-24-generic-pae
}
menuentry 'Ubuntu, with Linux 2.6.35-24-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set 9e680a3a-d3fb-4147-8ae0-2129f2c07136
echo 'Loading Linux 2.6.35-24-generic-pae ...'
linux /boot/vmlinuz-2.6.35-24-generic-pae root=UUID=9e680a3a-d3fb-4147-8ae0-2129f2c07136 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-24-generic-pae
}
### 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,msdos5)'
search --no-floppy --fs-uuid --set 9e680a3a-d3fb-4147-8ae0-2129f2c07136
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set 9e680a3a-d3fb-4147-8ae0-2129f2c07136
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 ###

=============================== sda5/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/sda5 during installation
UUID=9e680a3a-d3fb-4147-8ae0-2129f2c07136 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda7 during installation
UUID=76eca4c7-0ec1-446c-a414-19559985c11f /home ext4 defaults 0 2
# swap was on /dev/sda6 during installation
UUID=c34d5686-9046-42af-80a7-2371f57e2b6f none swap sw 0 0

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


10.8GB: boot/grub/core.img
28.1GB: boot/grub/grub.cfg
.7GB: boot/initrd.img-2.6.35-24-generic-pae
10.8GB: boot/vmlinuz-2.6.35-24-generic-pae
.7GB: initrd.img
10.8GB: vmlinuz

wojox
January 1st, 2011, 05:59 AM
Open a terminal and run:


sudo update-grub

flashinthedark
January 1st, 2011, 06:04 AM
Open a terminal and run:


sudo update-grub

What he said. Check to see that Grub is actually recognizing your Windows partition. I didn't see it in the .cfg file, but maybe I didn't look close enough.

oboedad55
January 1st, 2011, 06:11 AM
Yeah, I don't see Windows there either. Hopefully the OP has his important data backed up. One thing that puzzles me is the sda1 is listed as an extended partition. I recently installed Windows 7 to a new drive and it wants by default to make two partitions, the first about 100 megs and the rest taking up the remainder of the drive. I am not aware that it creates the first partition as an extended one. Now I am curious and will go take a look.

joetheplumber67
January 1st, 2011, 06:11 AM
There are no NTFS or FAT files, and those indicate Windows, so I would use


sudo update-grub


or



blkid


Look for any NTFS or FAT labels to see if you have Windows.

Quackers
January 1st, 2011, 06:14 AM
According to the boot script output your sda3 partition (Windows) is a SFS partition. In other words it is a Windows Dynamic Disk.

This suggests that at some time you have had more than 4 primary partitions on that hard drive. In such circumstances Win 7 decides that basic partitions should be changed to dynamic disks. This is not good news for Linux, as it doesn't know what SFS is and will not recognise it.

To confirm this, could you install gparted to your Ubuntu desktop (via synaptic package manager) and then run it from System > Admin > gparted.
Thanks.

Dpak Sridhar
January 1st, 2011, 08:51 AM
so if i install gparted and run wer u all sure tat my all the other partitions will be retreved?? So how can i get back the windows again ?

PatchesTheCaveman
January 1st, 2011, 10:41 AM
I think the easiest way for you is to reinstall the Windows bootloader and then configure that boot Ubuntu, because GRUB will not be able to boot Windows from the SFS partition.

To restore the Windows bootloader, you'll need to boot your computer from a Windows 7 install disc. When you get to the screen that says Install Windows, choose the Repair option. You will then get a screen that should hopefully display your Windows installation(s). Select it, and hit Next. Then choose Windows Startup Recovery. That should restore the Windows bootloader and successfully start Windows on reboot. If it does not, let me know and I can instruct you on how to restore the Windows bootloader manually from the recovery console.

Once you're back in Windows, you can download EasyBCD to configure the Windows bootloader to start Ubuntu. This software is available at http://neosmart.net/dl.php?id=1

Dpak Sridhar
January 1st, 2011, 11:55 AM
I tried all the possible options with Win 7 disc. All ended in fail. Is tat anyways i can get ma files back??
i thought of deleting the separte partitions of ubuntu which i created and loaded it with windows. But once disc is on, it states tat " No Drivers found". wt should i do now.?? Actually at first i had 4 partitions in windows namely C,D,E,F (total of 435 GB). I installed the ubuntu to the free space of 54GB. Now only D : is alone accesible through is ubuntu. Rest all its not mounted at al. It shows the whole D: partion as 435 GB. But the content of D : alone is there. Plz help me out.

Quackers
January 1st, 2011, 12:33 PM
In the Win 7 disc choose repair my computer, as PatchesTheCaveman suggests.


EDIT Actually scrap that information! Your Windows system is not there any more. It appears that you have over-written Windows with Ubuntu.
From the live cd desktop try using testdisk to recover your data

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

PatchesTheCaveman
January 1st, 2011, 12:53 PM
I wouldn't give up on your Windows installation left. You've got two Windows partitions visible, one that Linux can't read and could hold several volumes (C:/D:/E: ) in Windows. Also, if you can get into Startup Repair in the first place that means it must have found a working Windows partition somewhere.

Rerun your Windows 7 install disc and hit Recovery Console/Command Prompt instead of Windows Startup Repair. Then run these commands:

bootrec /rebuildbcd
bootrec /fixboot
bootrec /fixmbr

Make sure you have a working Ubuntu livecd before you do that though because that will clobber the Linux bootloader (GRUB) with the Windows no matter what. There's a chance the bootloader might not be able to start Windows.

You can't install Windows because you probably need a driver for your hard drive/SATA. But that's outside our jurisdiction. :evil:

Dpak Sridhar
January 1st, 2011, 06:27 PM
hahha.. thanx everyone.. luv u al. i got all my files back. Wish u a wonderful new yr ahead. @ patches the caveman : tanq u very much.