Page 1 of 1

How to use UUID in grub?

Posted: 05 Nov 2009, 18:03
by darkod
Hello.

Since I don't have too much experience with grub (not grub2) I need some help.

The standard windows entry in grub is something like:
title Windows
rootnoverify (sd0,0)
chainloader +1

If I want to use UUID in the rootnoverify command to point to the correct partition, how would that look?

rootnoverify=UUID=####
rootnoverify UUID=####

or something else?

Also, does the id numer need to be in quotes or not? I've seen examples without quotes, just the value.

Thanks in advance if someone can clarify this for me, it is important for "experiment" I am making. :geek:

Re: How to use UUID in grub?

Posted: 06 Nov 2009, 15:25
by darkod
If anyone else is interested, the answer was very simple. :)

You just use:
uuid BLABLA (no quotes needed around the value)

NOTE: You must use the exact case for the letters in the uuid value! It makes a difference between small and capital letters (as Linux anyway).

So if pointing to a windows partition I found the following working:
uuid BLABLA
chainloader /bootmgr

NOTE: bootmgr is used for Vista and 7, previous to Vista it was ntldr (if I am not mistaken). Haven't tested with /ntldr because I needed the value for windows 7 anyway.