Windows 7 bootl entry missing in ubuntu

mohityadavx

Youngling
Hi!

I came home for few days and found that hard-disk of my desktop was corrupt so i plugged it in my friend's desktop installed windows in it via his p and then installed Ubuntu 10.04 from digit DVD but now i missed something and now when i boot in my desktop Linux boot menu doesn't show the option to boot in windows 7!!!

Plz Help!! I am a complete noob at Linux i just know basic stuff like i use it for a free and fast replacement of windows for basic stuff like surfing net , word , music , movies etc.
 
OP
mohityadavx

mohityadavx

Youngling
Thanx nims but it din't worked here's the output:

Code:
garima@garima-desktop:~$ sudo update-grub
[sudo] password for garima: 
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.32-21-generic
Found GRUB 2: /boot/grub/core.img
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done
 

nims11

BIOS Terminator
seems like the boot files for windows are gone.
I think there are better ways but this always work for me :
1. recover your windows through the windows 7 DVD. You won't be able to access Ubuntu for the moment.
2. boot from a ubuntu LiveCD and in terminal type (i assume you havent separately made a partition to mount /boot into):
sudo fdisk -l to identify the device name of your linux partition. usually it is /dev/sdax where x is a number.
sudo mount /dev/sdax /mnt (replace x with the number you identified from fdisk -l)
sudo grub-install --boot-directory=/mnt/boot /dev/sda (note that it is only /dev/sda)
3. reboot and now you will be able to get into your installed ubuntu. in ubuntu, goto terminal and type
sudo update-grub
 

Anish

Spectre
(i assume you havent separately made a partition to mount /boot into):

^This must be the case(90%)

Do a windows startup repair and do as said by nims11
or, boot into windows and use easyBCD to list linux in windows bootloader to boot into linux.
 
OP
mohityadavx

mohityadavx

Youngling
This is output of sudo fdisk-l

Code:
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 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: 0x00000001

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        3916    31455238+   7  HPFS/NTFS
/dev/sda2            3917       30402   212743099+   f  W95 Ext'd (LBA)
/dev/sda5            3917        7832    31455238+   7  HPFS/NTFS
/dev/sda6            7833       16838    72340663+   7  HPFS/NTFS
/dev/sda7           16839       26511    77694989    7  HPFS/NTFS
/dev/sda8           26511       28259    14043062   83  Linux
/dev/sda9           30236       30402     1332224   82  Linux swap / Solaris
/dev/sda10          28259       30147    15160320   83  Linux
/dev/sda11          30147       30236      711680   82  Linux swap / Solaris

now which is linux partition??
 

nims11

BIOS Terminator
/dev/sda8 or /dev/sda10
post the output of
cat /etc/fstab
or
df

in terminal
 
Last edited:
OP
mohityadavx

mohityadavx

Youngling
Code:
garima@garima-desktop:~$ cat /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/sda10 during installation
UUID=53edddfb-75fa-4ba4-8a21-693a7997913f /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda11 during installation
UUID=e69e430c-ecc9-49a1-bea7-048f9195df2b none            swap    sw              0       0

and

Code:
garima@garima-desktop:~$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda10            14922208   3437376  10726816  25% /
none                   1672904       288   1672616   1% /dev
none                   1677120       128   1676992   1% /dev/shm
none                   1677120       312   1676808   1% /var/run
none                   1677120         0   1677120   0% /var/lock
none                   1677120         0   1677120   0% /lib/init/rw
/dev/sda7             77694984  49061368  28633616  64% /media/movies
garima@garima-desktop:~$
 
OP
mohityadavx

mohityadavx

Youngling
did what u said from live CD but in vain

Code:
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.32-21-generic
Found GRUB 2: /boot/grub/core.img
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done

Windows startup repair doesn't help however it detects windows so setup is still there intact for sure.

Ain't there any manual command to add an entry??
 

nims11

BIOS Terminator
be sure you are connected to the internet
from ubuntu LiveCD/installed system
goto terminal,
sudo apt-get install lilo
sudo lilo -M /dev/sda mbr


this will restore the windows MBR and you will be able to boot into windows. Then follow from step 2 in my post #4 or use EasyBCD as anish said
 
OP
mohityadavx

mohityadavx

Youngling
Thanx nims fr constant support but new problem has arisen
Code:
sudo grub-install --boot-directory=/mnt/boot /dev/sda 
Unrecognized option `--boot-directory=/mnt/boot'
 
OP
mohityadavx

mohityadavx

Youngling
Thanx nims !!!

finally problem resolved all credit goes to you.

BTW where can i learn advanced linux right from beginning??
 

nims11

BIOS Terminator
BTW where can i learn advanced linux right from beginning??

Just keep using it and you will learn quite a lot as you progress. Whenever you are stuck, google is your friend as well as the members here at TDF. also try using the terminal more often. all the commands in terminal are very well documented and enough to let anyone learn it by himself.
 
OP
mohityadavx

mohityadavx

Youngling
Nims sorry to bother u again but

I just noticed boot entry made by EasyBCD doesn't do anything its just a blank entry
so i need to ask you which type shall i use in EasyBCD :-
Grub(legacy)
Grub 2
LILO/ELILO
FreeBSD ( I think it can't be)
Wubi ( I think it can't be)

Now for which device shall i use it shows 8 partition
Partition 1 ( F:/ as NTFS - 30GiB)
Partition 2 ( G:/ as NTFS - 30GiB)
Partition 3 ( H:/ as NTFS - 69GiB)
Partition 4 ( I:/ as NTFS - 74GiB)
Partition 5 ( Linux 13GiB)
Partition 6 ( Swap 1GiB)
Partition 7 ( Linux 14GiB)
Partition 8 ( Swap 695MiB)


and shall i tick box saying

"GRUB isn't installed to MBR/bootsector"
 

nims11

BIOS Terminator
it should be grub2
in the partition selection, select partition 7
and tick that box as well.

if easyBCD doesnt work, the liveCD method will surely work
 
Top Bottom