# How to add VISTA's boot entry to GRUB



## eagle_y2j (Feb 17, 2007)

I am running Open Suse 10.2 ,installed after installing MS Vista (ultimate) but i can't see boot entry of Vista in GRUB ? How to add that in my case Vista is on primary partion hda5 .
TIA


----------



## Pathik (Feb 17, 2007)

well open suse detected my vista as a windows os n added its boot entry automatically...


----------



## amitava82 (Feb 17, 2007)

did u try this method posted here: *www.thinkdigit.com/forum/showthread.php?t=49434


----------



## eagle_y2j (Feb 17, 2007)

amitava82 said:
			
		

> did u try this method posted here: *www.thinkdigit.com/forum/showthread.php?t=49434


tried but no sucess


----------



## freebird (Feb 17, 2007)

eagle_y2j said:
			
		

> I am running Open Suse 10.2 ,installed after installing MS Vista (ultimate) but i can't see boot entry of Vista in GRUB ? How to add that in my case Vista is on primary partion hda5 .
> TIA


 as root edit the file /boot/grub/menu.lst and save:
at the end of the file.

```
title           Microsoft Windows Vista Ultimate
root            (hd0,4)
savedefault
chainloader     +1
```
 you can use any editors like gedit as root user to save it.try at "$" prompt

```
~$gksu gedit  /boot/grub/menu.lst
```


----------



## eagle_y2j (Feb 18, 2007)

I tried editing /boot/grub/menu.lst from YAST control panel but each time i am saving 
	
	



```
title           Microsoft Windows Vista Ultimate
root            (hd0,4)
savedefault
chainloader     +1
```
there it automatically changes into 
	
	



```
title Microsoft Windows Vista Ultimate
    rootnoverify (hd0,0)
    savedefault
    chainloader (hd0,4)+1
```
?


----------



## mehulved (Feb 18, 2007)

Just try editing it manually.


----------



## eagle_y2j (Feb 18, 2007)

tried
# edit /boot/grub/menu.lst

but how to insert new data and how to save in root mode


----------



## desertwind (Feb 18, 2007)

Already answered by freebird.

$ gksu gedit  /boot/grub/menu.lst


----------



## amitava82 (Feb 18, 2007)

it should be like this (if you have single HDD and Vista is installed in C drive):

open console, type:

gksu gedit /boot/grub/menu.lst

remove your existing windows entries n replace with this:

title windows Vista
root (hd0,0)
makeactive
savedefault
chainloader +1


----------



## eagle_y2j (Feb 18, 2007)

bash: gksu: command not found


----------



## mehulved (Feb 18, 2007)

gksu is found in gnome. That means you've not install gnome. For KDE there's kdesu


----------



## eagle_y2j (Feb 18, 2007)

tech_your_future said:
			
		

> gksu is found in gnome. That means you've not install gnome. For KDE there's kdesu


thankx for this but now it says kdesu can't connect to X server ?


----------



## freebird (Feb 18, 2007)

do one thing Press ALT+F2 to get a run dialog.then enter those commands in run dialog and press enter-run.

u cant sometimes invoke gksu  from terminal ;that is  a whole another thing.   "xhost  +" to disable acl may help.


----------



## eagle_y2j (Feb 18, 2007)

ok after googling i found this 

```
kdesu kwrite /boot/grub/menu.lst
```


----------



## freebird (Feb 18, 2007)

oh u use kde


----------



## eagle_y2j (Feb 18, 2007)

Added following to menu.lst sucessfully

```
title windows Vista
root (hd0,4)
makeactive
savedefault
chainloader +1
```
 but getting following error

Booting Windows Vista
root (hd0,4)
filesystem type unkown,partition type 0 X 7
makeactive
Error 12 :Invalid device requested .....
Press any key to continue.....


----------



## freebird (Feb 18, 2007)

that error means u have not having win partn as hda5.check again where u have ur windows partn using fdisk:

```
~#fdisk  -l
```
I mean post the output


----------



## desertwind (Feb 18, 2007)

Are you sure that Vista is intalled on hda5?

Can you post the output of the following command

$ sudo fdisk -l


----------



## eagle_y2j (Feb 18, 2007)

system:/media/hda5 is my Vista's hdd partition and can't figure out above commands
sudo: fdisk: command not found


----------



## freebird (Feb 18, 2007)

try 
	
	



```
$ su -
(give ur root passwd)
```
 now at "#" prompt :

```
~#   /sbin/fdisk -l
```
  now post the o/p.


----------



## eagle_y2j (Feb 18, 2007)

k here is the output:-

Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        2434    19551073+  83  Linux
/dev/hda2            2435        4865    19527007+   f  W95 Ext'd (LBA)
/dev/hda5            2435        4788    18908473+   7  HPFS/NTFS
/dev/hda6            4789        4865      618471   82  Linux swap / Solaris

Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               2        9729    78140160    f  W95 Ext'd (LBA)
/dev/hdb5               2        4875    39150373+   b  W95 FAT32
/dev/hdb6            4876        9729    38989723+   b  W95 FAT32
linux-nrn0:/home/loveme #


----------



## freebird (Feb 18, 2007)

you may have ur windows on second hdd?that's a possibility na?

anyways,try once more editing /boot/grub/menu.lst
as :

```
title           Microsoft Windows Vista
root            (hd1,4)
savedefault
chainloader     +1
```
try.....


----------



## mehulved (Feb 18, 2007)

change root to rootnoverify in menu.lst


----------



## drsethi (Feb 18, 2007)

I am having similar problem
I have Windows XP SP2 on hda1
Windows vista beta on hda8
Suse 10.2 on hda 10.
I can boot XP and Suse but not vista by any means.
Menu.lst entries are as follows
default 0
timeout 8
gfxmenu (hd0,9)/boot/message

###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 10.2
    root (hd0,9)
    kernel /boot/vmlinuz-2.6.18.2-34-default root=/dev/sda10 vga=0x317 resume=/dev/sda9 splash=silent showopts elevator=
    initrd /boot/initrd-2.6.18.2-34-default

###Don't change this comment - YaST2 identifier: Original name: windows###
title Windows XP
    rootnoverify (hd0,0)
    chainloader (hd0,0)+1

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 10.2
    root (hd0,9)
    kernel /boot/vmlinuz-2.6.18.2-34-default root=/dev/sda10 vga=normal showopts ide=nodma apm=off acpi=off noresume nosmp noapic maxcpus=0 edd=off 3
    initrd /boot/initrd-2.6.18.2-34-default
Please tell me what should be entered in Menu.lst or elsewhere so I can boot Vista as well.


----------



## mehulved (Feb 18, 2007)

drsethi you should try the same too. Change root to rootnoverify for vista.


----------



## eagle_y2j (Feb 18, 2007)

drsethi %%%bumped ...
tried  
	
	



```
title           Microsoft Windows Vista
root            (hd1,4)
savedefault
chainloader     +1
```

also tried rootnoverify (hd1,4)

getting continous beeps with following error 
root (hd1,4)
filesystem type is fat,partition type 0 X b
safedefault
chainloader +1


----------



## mehulved (Feb 18, 2007)

it's hd0,4 not 1,4


----------



## praka123 (Feb 18, 2007)

@eagle_y2j
does it worked?the soltn 4m  tyf.if not try to add "makeactive" also..

```
title           Microsoft Windows Vista
rootnoverify    (hd0,4)
makeactive
chainloader     +1
```


----------



## freebird (Feb 18, 2007)

try this since u have vista on a *non-primary partn(hda5) afaik*.this make Vista to belive its installed on primary partn.this may be the soltn

```
title Windows Vista
rootnoverify (hd0,5) 
map (hd0,0) (hd0,5)
map (hd0,5) (hd0,0)
makeactive
chainloader +1
```
M$ wants their OS to be the only one installed on ur disk..


----------



## eagle_y2j (Feb 18, 2007)

freebird said:
			
		

> try this since u have vista on a *non-primary partn(hda5) afaik*.this make Vista to belive its installed on primary partn.this may be the soltn
> 
> ```
> title Windows Vista
> ...



all in Vain it says Error 12:Invalid device requested


----------



## mehulved (Feb 18, 2007)

hda5 is hd0,4


----------



## gxsaurav (Feb 18, 2007)

freebird said:
			
		

> M$ wants their OS to be the only one installed on ur disk..


 
  Not quite...you can dual boot with any OS

I don't know how to configure GRUB, but if u need i can provide Vista bootloader files of BCD 

I got First partion as Windows XP , then installed Vista over it so Vista configured the bootloader itself. I M posting the details here from Vistabootpro 3.1, this might help u



> Windows Boot Manager
> --------------------
> identifier {bootmgr}
> device partition=D:
> ...


----------



## drsethi (Feb 18, 2007)

Error 12: Invalid device requested is the message
Menu.lst entries are
default 0
timeout 8
gfxmenu (hd0,9)/boot/message

###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 10.2
    root (hd0,9)
    kernel /boot/vmlinuz-2.6.18.2-34-default root=/dev/sda10 vga=0x317 resume=/dev/sda9 splash=silent showopts elevator=
    initrd /boot/initrd-2.6.18.2-34-default

###Don't change this comment - YaST2 identifier: Original name: windows###
title Windows XP
    rootnoverify (hd0,0)
    chainloader (hd0,0)+1

###Don't change this comment - YaST2 identifier: Original name: windows###
title Windows Vista
    rootnoverify (hd0,7)
map (hd0,0) (hd0,7)
map (hd0,7) (hd0,0)
makeactive
    chainloader (hd0,7)+1

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 10.2
    root (hd0,9)
    kernel /boot/vmlinuz-2.6.18.2-34-default root=/dev/sda10 vga=normal showopts ide=nodma apm=off acpi=off noresume nosmp noapic maxcpus=0 edd=off 3
    initrd /boot/initrd-2.6.18.2-34-default


----------



## freebird (Feb 18, 2007)

tech_your_future said:
			
		

> hda5 is hd0,4


yes.i forgot.try


----------



## desertwind (Feb 18, 2007)

Also give a try for reinstalling grub.

boot into rescue mode and

# grub-install --recheck /dev/hda


----------



## freebird (Feb 18, 2007)

Y?he got grub perfect..
now  boot.ini file may need to be edited if all this fails...only M$ gyaani ppl knows that


----------



## desertwind (Feb 18, 2007)

^^just a try.


----------



## eagle_y2j (Feb 18, 2007)

nothing seems working if anyone of u hav a dual boot Vista and Linux with Grub ...can u post ur menu.lst may be it can help ?


----------



## freebird (Feb 18, 2007)

the answer is clear.it is real tough if u installed vista on non-primary partitions.grub-the bootloader tried to give the vista bootloader for vista boot(chnldr +1 optn)..now in windows partn,Vista's got some bootloader/menu config file,in win xp,that was boot.ini..some editing of the file may help..


----------



## gxsaurav (Feb 19, 2007)

Look above what i posted

Vista doesn't have boot.ini it has BCDEdit, for it, all you have to do is to point to the proper exe to boot it. Do this, try t otell GRUB to boot from the following folder in the partition


path \Windows\system32\winload.exe
description Windows Vista
locale en-US
inherit {bootloadersettings}
osdevice partition=C:
*systemroot \Windows*
resumeobject {64441255-dd8c-1243-9e22-f802b9de94d0}
nx AlwaysOff
quietboot Yes
custom:47000005 301989892


----------



## mehulved (Feb 19, 2007)

drsethi try this for vista

```
title Windows Vista
rootnoverify (hd0,7)
makeactive
chainloader +1
```


----------



## freebird (Feb 19, 2007)

^^ then try it @eagle_y2j wat @gxsaurav told
it is possible to boot.Vista bootloader got new config file.we can solve this.there are some more options to try like hiding/unhiding partn options yet to try on grub.

Multiboot with GRUB Mini-HOWTO
*www.gnu.org/software/grub/manual/html_node/unhide.html
*www.bo.infn.it/alice/alice-doc/mll-doc/linux/advanced/node50.html


----------



## praka123 (Feb 19, 2007)

@tyf:it may not be that simple with vista.as @gxsourav pointed out Vista got a MBR Disk Signature.during Vista boot process  it uses an ID number in the MBR before it will let you boot.
Vista wants all other partitions non-bootable.
so the soltn will be to hide the other partn as pointed by @freebird.
so  @eagle_y2j:
I believe U have grub menu available.

```
~#nano -w /boot/grub/menu.lst
```
 remove any other windows entries in menu.lst
add:

```
title     windows Vista
 unhide (hd0,4)
 hide (hd0,0)
 rootnovery (hd0,4)
 makeactive
savedefault
chainloader +1
 boot
```
 try and post
edit:make sure u have hda5 as bootable partn.u can toggle bootable flag using cfdisk /dev/hda (it is ||lr to windows fdisk utility)

```
~#cfdisk /dev/hda
hda5       [B]Boot[/B]        Primary   NTFS                              5140.80
```
as 4m ur earlier fdisk -l o/p hda1 is bootable while hda5 is not(see the "*" sign)

```
Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        2434    19551073+  83  Linux
/dev/hda2            2435        4865    19527007+   f  W95 Ext'd (LBA)
/dev/hda5            2435        4788    18908473+   7  HPFS/NTFS
/dev/hda6            4789        4865      618471   82  Linux swap / Solaris

Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               2        9729    78140160    f  W95 Ext'd (LBA)
/dev/hdb5               2        4875    39150373+   b  W95 FAT32
/dev/hdb6            4876        9729    38989723+   b  W95 FAT32
```


----------



## drsethi (Feb 22, 2007)

unhide 
hide 
command is very dangerous. Use carefully otherwise all other Operating systems may become unbootable/unrepairable.


----------



## mehulved (Feb 24, 2007)

eagley2j try this 

title            Vista
rootnoverify     (hd0,4) 
savedefault
makeactive
chainloader      +1

I guess this should work, cos here it claims to work


----------

