Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: Users

Grub2 xen priority order

 

 

Xen users RSS feed   Index | Next | Previous | View Threaded


itobin at tidyhosts

Mar 30, 2011, 8:28 AM

Post #1 of 14 (2112 views)
Permalink
Grub2 xen priority order

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










_______________________________________________
Xen-users mailing list
Xen-users [at] lists
http://lists.xensource.com/xen-users


erwan.renier at laposte

Mar 30, 2011, 11:03 AM

Post #2 of 14 (2074 views)
Permalink
Re: Grub2 xen priority order [In reply to]

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


_______________________________________________
Xen-users mailing list
Xen-users [at] lists
http://lists.xensource.com/xen-users


itobin at tidyhosts

Mar 30, 2011, 3:04 PM

Post #3 of 14 (2065 views)
Permalink
RE: Grub2 xen priority order [In reply to]

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


-----Original Message-----
From: Erwan RENIER [mailto:erwan.renier [at] laposte]
Sent: 30 March 2011 19:03
To: Ian Tobin
Cc: xen-users [at] lists
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




_______________________________________________
Xen-users mailing list
Xen-users [at] lists
http://lists.xensource.com/xen-users


erwan.renier at laposte

Mar 30, 2011, 4:41 PM

Post #4 of 14 (2059 views)
Permalink
Re: Grub2 xen priority order [In reply to]

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 [at] laposte]
> Sent: 30 March 2011 19:03
> To: Ian Tobin
> Cc: xen-users [at] lists
> 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 ?


itobin at tidyhosts

Mar 31, 2011, 12:06 AM

Post #5 of 14 (2063 views)
Permalink
RE: Grub2 xen priority order [In reply to]

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 [at] laposte]
Sent: 31 March 2011 00:41
To: Ian Tobin
Cc: xen-users [at] lists
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 [at] laposte]
Sent: 30 March 2011 19:03
To: Ian Tobin
Cc: xen-users [at] lists
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 ?


itobin at tidyhosts

Mar 31, 2011, 5:21 AM

Post #6 of 14 (2052 views)
Permalink
RE: Grub2 xen priority order [In reply to]

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 [at] laposte]
Sent: 31 March 2011 00:41
To: Ian Tobin
Cc: xen-users [at] lists
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 [at] laposte]
Sent: 30 March 2011 19:03
To: Ian Tobin
Cc: xen-users [at] lists
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 ?


darkbasic4 at gmail

Mar 31, 2011, 2:59 PM

Post #7 of 14 (2048 views)
Permalink
Re: Grub2 xen priority order [In reply to]

I use a simple symlink: 09_linux_xen -> 20_linux_xen
ln -s /etc/grub.d/20_linux_xen /etc/grub.d/09_linux_xen

;)
Darkbasic

_______________________________________________
Xen-users mailing list
Xen-users [at] lists
http://lists.xensource.com/xen-users


itobin at tidyhosts

Mar 31, 2011, 11:13 PM

Post #8 of 14 (2047 views)
Permalink
Re: Grub2 xen priority order [In reply to]

What does that do?


Tidyhosts UK - Server & Web Specialists

W: www.tidyhosts.com
E: enquiries [at] tidyhosts
T: 0871 910 6732

This email and its attachments are scanned by TidyHosts UK. All emails and attachments should also be scanned by the recipient. TidyHosts UK accept no responsibility for any damage caused by any virus attached to this email. This email is confidential and is intended only for the addressee(s).






On 1 Apr 2011, at 00:02, Niccolò Belli <darkbasic4 [at] gmail> wrote:

> I use a simple symlink: 09_linux_xen -> 20_linux_xen
> ln -s /etc/grub.d/20_linux_xen /etc/grub.d/09_linux_xen
>
> ;)
> Darkbasic
>
> _______________________________________________
> Xen-users mailing list
> Xen-users [at] lists
> http://lists.xensource.com/xen-users
>


itobin at tidyhosts

Apr 1, 2011, 1:02 AM

Post #9 of 14 (2055 views)
Permalink
RE: Grub2 xen priority order [In reply to]

BTW I tried this out of curiosity but it didn't work so not sure what you are trying to achieve?


-----Original Message-----
From: xen-users-bounces [at] lists [mailto:xen-users-bounces [at] lists] On Behalf Of Niccolò Belli
Sent: 31 March 2011 23:00
To: xen-users [at] lists
Subject: Re: [Xen-users] Grub2 xen priority order

I use a simple symlink: 09_linux_xen -> 20_linux_xen ln -s /etc/grub.d/20_linux_xen /etc/grub.d/09_linux_xen

;)
Darkbasic

_______________________________________________
Xen-users mailing list
Xen-users [at] lists
http://lists.xensource.com/xen-users



_______________________________________________
Xen-users mailing list
Xen-users [at] lists
http://lists.xensource.com/xen-users


darkbasic4 at gmail

Apr 1, 2011, 6:04 AM

Post #10 of 14 (2048 views)
Permalink
Re: Grub2 xen priority order [In reply to]

Il 01/04/2011 10:02, Ian Tobin ha scritto:
> BTW I tried this out of curiosity but it didn't work so not sure what you are trying to achieve?

Didn't you want the xen hypervisor having the highest priority when
generating grub.cfg? Did you run update-grub?

Cheers,
Darkbasic

_______________________________________________
Xen-users mailing list
Xen-users [at] lists
http://lists.xensource.com/xen-users


itobin at tidyhosts

Apr 1, 2011, 12:30 PM

Post #11 of 14 (2051 views)
Permalink
RE: Grub2 xen priority order [In reply to]

The issue is when compiling from source it creates another file in /boot called xen-syms-4.1.0

When running update-grub its puts the xen-syms-4.0.1 higher in the list but its not correct, it should be /xen.gz or similar. When the server boots it fails therefore you have to manually select the correct boot entry, obviously not practical.

You can either manually edit /boot/grub/grub.cfg which isn't the right way or edit the file that that the previous person mentioned, and this worked.

Hope that makes sense.

Ian



-----Original Message-----
From: xen-users-bounces [at] lists [mailto:xen-users-bounces [at] lists] On Behalf Of Niccolò Belli
Sent: 01 April 2011 14:05
To: xen-users [at] lists
Subject: Re: [Xen-users] Grub2 xen priority order

Il 01/04/2011 10:02, Ian Tobin ha scritto:
> BTW I tried this out of curiosity but it didn't work so not sure what you are trying to achieve?

Didn't you want the xen hypervisor having the highest priority when
generating grub.cfg? Did you run update-grub?

Cheers,
Darkbasic

_______________________________________________
Xen-users mailing list
Xen-users [at] lists
http://lists.xensource.com/xen-users



_______________________________________________
Xen-users mailing list
Xen-users [at] lists
http://lists.xensource.com/xen-users


viaum at sheridanc

Apr 1, 2011, 1:17 PM

Post #12 of 14 (2047 views)
Permalink
RE: Grub2 xen priority order [In reply to]

> On Fri, 1 Apr 2011 20:30:32 +0100 <itobin [at] tidyhosts> wrote:
>
> The issue is when compiling from source it creates another file in /boot called xen-syms-4.1.0

Are you talking about 4.1.0 or 4.0.x?

>
> When running update-grub its puts the xen-syms-4.0.1 higher in the list but its not correct, it should be /xen.gz or similar. When the server boots it fails therefore you have to manually select the correct boot entry, obviously not practical.
>
> You can either manually edit /boot/grub/grub.cfg which isn't the right way or edit the file that that the previous person mentioned, and this worked.
>
> Hope that makes sense.
>
> Ian
>

Hi there,

I am just tuning into this thread now, and I do recall that the Xen Hypervisor symbols file was being picked up as a Xen Hypervisor and added as a grub boot loader item. Has anyone tried to write a patch to fix this? If someone was so inclined to submit such a patch to the Debian BTS, that would be awesome :)

I know the Debian Xen packages (at least the 4.0.1 stuff) do not put this xen-syms file and if you delete it, from my experience everything still works. If you are not as daring to delete it, you may also place this file in another folder such as /boot/xen/ and the non-working grub entry is no longer created as well.


-M


itobin at tidyhosts

Apr 1, 2011, 3:07 PM

Post #13 of 14 (2039 views)
Permalink
RE: Grub2 xen priority order [In reply to]

Hi,



If I recall most versions I have installed put a syms file in /boot



I know the deb packages don't but I rarely use debs for xen, mainly
because I can only upgrade when someone writes a new deb which is rare
and upgrading from source over debs has always caused more problems than
its worth.



If the syms file can be deleted then that's fine but what is its
purpose?



Thanks



Ian





From: xen-users-bounces [at] lists
[mailto:xen-users-bounces [at] lists] On Behalf Of Mike Viau
Sent: 01 April 2011 21:18
To: xen-users [at] lists
Subject: RE: [Xen-users] Grub2 xen priority order



> On Fri, 1 Apr 2011 20:30:32 +0100 <itobin [at] tidyhosts> wrote:
>
> The issue is when compiling from source it creates another file in
/boot called xen-syms-4.1.0

Are you talking about 4.1.0 or 4.0.x?

>
> When running update-grub its puts the xen-syms-4.0.1 higher in the
list but its not correct, it should be /xen.gz or similar. When the
server boots it fails therefore you have to manually select the correct
boot entry, obviously not practical.
>
> You can either manually edit /boot/grub/grub.cfg which isn't the right
way or edit the file that that the previous person mentioned, and this
worked.
>
> Hope that makes sense.
>
> Ian
>

Hi there,

I am just tuning into this thread now, and I do recall that the Xen
Hypervisor symbols file was being picked up as a Xen Hypervisor and
added as a grub boot loader item. Has anyone tried to write a patch to
fix this? If someone was so inclined to submit such a patch to the
Debian BTS, that would be awesome :)

I know the Debian Xen packages (at least the 4.0.1 stuff) do not put
this xen-syms file and if you delete it, from my experience everything
still works. If you are not as daring to delete it, you may also place
this file in another folder such as /boot/xen/ and the non-working grub
entry is no longer created as well.


-M


viaum at sheridanc

Apr 1, 2011, 4:55 PM

Post #14 of 14 (2036 views)
Permalink
RE: Grub2 xen priority order [In reply to]

Hey Ian,

I believe the symbols are used for debugging, and helping trace crashes.

I could be wrong, but I believe it is fair to say its like the system.map[1]
file equivalent for the Xen Hypervisor.

[1] - http://en.wikipedia.org/wiki/System.map

-M

>On Fri, 1 Apr 2011 23:07:32 +0100 <itobin [at] tidyhosts> wrote:
>
> Hi, If I recall most versions I have installed put a syms file in /boot I know
> the deb packages don’t but I rarely use debs for xen, mainly because I can
> only upgrade when someone writes a new deb which is rare and upgrading
> from source over debs has always caused more problems than its worth. If
> the syms file can be deleted then that’s fine but what is its purpose?
>
>Thanks
>
>Ian
_______________________________________________
Xen-users mailing list
Xen-users [at] lists
http://lists.xensource.com/xen-users

Xen users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.