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

Re: [Xen-devel] pv-grub and grub.conf locations



On 7/11/2014 10:19 PM, Stefano Stabellini wrote:
> On Fri, 7 Nov 2014, Steven Haigh wrote:
>> Hi Stefano,
>>
>> Sorry to hassle you directly - but I'm trying to figure out a use case
>> of pv-grub to replace most pygrub configurations.
> 
> No worries. I CC'ed xen-devel, because I think that this is an
> interesting question that could be useful to other people too.
> 
> 
>> I have two main locations where the grub config may live:
>>      1) (hd0)/boot/grub/grub.conf or
>>      2) (hd0,0)/boot/grub/grub.conf
>>
>> This depends if the DomU is created by something like the debian
>> installer which refuses to install to a 'whole disk' - or say my EL6
>> kickstart which installs to /dev/xvda as ext4 (which is easier to manage).
>>
>> From what I've been reading, there is no way to pass both of these to
>> pv-grub and let it deal with whichever one exists.
>>
>> Interestingly, pygrub seems to search all paths to make this work - ie
>> you only need to specify:
>>      bootloader = 'pygrub'
>>
>> As I'm trying to generate generic config files, it makes life much
>> harder to implement pv-grub as the loader (even though its preferred).
>>
>> Any thoughts on this?
> 
> Unfortunately it doesn't look like there is a way to do that at the
> moment. But I agree it would be useful and we might be able to make it
> work for the next release (Xen 4.6).
> 

Well, from digging through the grub 0.97 documentation, it *may* be
possible - however documentation on pv-grub seems to be very rare.

Interestingly, from the grub documentation:
13.3.11 find
— Command: find filename

    Search for the file name filename in all mountable partitions and
print the list of the devices which contain the file. The file name
filename should be an absolute file name like /boot/grub/stage1.

Also:
13.3.6 configfile
— Command: configfile file

    Load file as a configuration file.

It wouldn't be too hard to imagine a grub configuration script that
could be loaded (somehow) into the 'extra' section of the DomU config
that basically passes the output of 'find /boot/grub/grub.conf' to
configfile $result and uses that to boot.

This may actually be possible already - but I haven't found any
documentation that points to it or any configurations that have been
published.

Any further feedback from anyone who has seen this may help out...

-- 
Steven Haigh

Email: netwiz@xxxxxxxxx
Web: http://www.crc.id.au
Phone: (03) 9001 6090 - 0412 935 897

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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