WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

RE: [Xen-users] Grub2 xen priority order

To: <erwan.renier@xxxxxxxxxxx>
Subject: RE: [Xen-users] Grub2 xen priority order
From: "Ian Tobin" <itobin@xxxxxxxxxxxxx>
Date: Thu, 31 Mar 2011 13:21:07 +0100
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 31 Mar 2011 05:23:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <6DEA1A94-4E9A-4499-ABE2-FF4FE197F76E@xxxxxxxxxxxxx> <4D937061.5090907@xxxxxxxxxxx> <039E0B4AA9103344A80DA55DDDC76A933B2DD3@xxxxxxxxxxxxxxxxxxxxxx> <4D93BF9C.4000406@xxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcvvM/qFnLRSf0YHTQCszLYPX/kLpwAad9ag
Thread-topic: [Xen-users] Grub2 xen priority order

Brilliant, it worked!

 

I used the 3rd option so everthing else it left as standard.  Im not sure how you managed to figure that out but thanks very much.

 

BTW what does

 

syms-*:syms-*) cmp=gt;;
    *:syms-*) cmp=lt;;
    syms-*:*) cmp=lt;;

 

actually do?

 

Thanks

 

Ian

 

 

From: Erwan RENIER [mailto:erwan.renier@xxxxxxxxxxx]
Sent: 31 March 2011 00:41
To: Ian Tobin
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Grub2 xen priority order

 

Le 31/03/2011 00:04, Ian Tobin a écrit :

 
Id love to say it worked but sadly it didn't :(
 

Indeed,
I searched deeper and found that grub use dpkg --compare-version to find the latest version , if you're not on debian i suppose it's another method

So it clean up the names with :
echo <your-version> |sed -e "s/[^-]*-//;s/[._-]\(pre\|rc\|test\|git\|old\|trunk\)/~/g"
and then compare it with :
dpkg --compare-version <version1> gt <version2>

exemple :
dpkg --compare-versions 2.6.32 gt syms-2.6.32

wich gives syms winner, never mind the numbers

3 possible workaround :

The simplest is to rename your xen hypervisors, by prepending 'xen-' to them :  mv xen-4.0.2-rc3-pre.gz xen-xen-4.0.2-rc3-pre.gz
i tested and it works.

The second is to modify the regexp : i didn't even tried ^^

The third is to patch  : /usr/lib/grub/grub-mkconfig_lib

add the bold lines to this function  :

version_test_gt ()
{
  local sedexp="s/[^-]*-//;s/[._-]\(pre\|rc\|test\|git\|old\|trunk\)/~\1/g"
  local a=`echo $1 | sed -e "$sedexp"`
  local b=`echo $2 | sed -e "$sedexp"`
  local cmp=gt
  if [ "x$b" = "x" ] ; then
    return 0
  fi
  case $a:$b in
    *.old:*.old) ;;
    *.old:*) a=`echo -n $a | sed -e s/\.old$//` ; cmp=gt ;;
    *:*.old) b=`echo -n $b | sed -e s/\.old$//` ; cmp=ge ;;
    syms-*:syms-*) cmp=gt;;
    *:syms-*) cmp=lt;;
    syms-*:*) cmp=lt;;
  esac
  dpkg --compare-versions "$a" $cmp "$b"
  return $?
}

I tested too, it works fine and it's my prefered.



 
-----Original Message-----
From: Erwan RENIER [mailto:erwan.renier@xxxxxxxxxxx] 
Sent: 30 March 2011 19:03
To: Ian Tobin
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Grub2 xen priority order
 
Edit
the 20_xen_linux script :
change :
 
xen_list=`for i in /boot/xen*; do
 
by :
 
xen_list=`for i in \`ls /boot/xen*\`; do
 
 
it should work( maybe( perhaps) )
 
Le 30/03/2011 17:28, Ian Tobin a écrit :
Hey all,
 
I have moved 10_Linux to 50_Linux and ran update-grub which is fine.
 
The problem I have is that there is xen-syms in /boot And that is being put first in the boot list which is incorrect.
 
How do you make /xen.gz at the top so it is booted first?
 
Thanks
 
Ian

What is your OS ?

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users