[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-users] Grub2 xen priority order



Hey,

 

Thanks for the advice, im going to test when im in the office and will report back

 

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.