Skip to contentSkip to conversation

pv-grub and grub.conf locations

DISCUSSION Stefano Stabellini 2 participants 3 messages Nov 7, 2014 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 4 lines · Steven Haigh

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.

Quoted 11 lines

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.

Quoted 8 lines

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).

#2 lore raw
Quoted 25 lines · Stefano Stabellini
Quoted 4 lines · Steven Haigh

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.

Quoted 15 lines

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'

Quoted 9 lines
Quoted 4 lines

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...

Signature · 5 lines
Steven Haigh

Email: [email protected]
Web: http://www.crc.id.au
Phone: (03) 9001 6090 - 0412 935 897

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#3 lore raw
Quoted 58 lines · Steven Haigh
Quoted 25 lines · Stefano Stabellini
Quoted 4 lines · Steven Haigh

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.

Quoted 15 lines

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'

Quoted 9 lines
Quoted 4 lines

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.

Quoted 5 lines

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...

Interestingly, if this is a bug or not:

grubdom> debug
Debug mode is turned on

grubdom> find /boot/grub/grub.conf

Error 15: File not found

grubdom>

Signature · 5 lines
Steven Haigh

Email: [email protected]
Web: http://www.crc.id.au
Phone: (03) 9001 6090 - 0412 935 897

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel