Re: [GLLUG] Multiple grub installs in xen guest

2019-10-11 Thread Andy Smith via GLLUG
Hello,

On Fri, Oct 11, 2019 at 06:21:43PM +0100, Tim Woodall via GLLUG wrote:
> On Fri, 11 Oct 2019, Tim Woodall via GLLUG wrote:
> The debian bootloader does the standard look for pvgrub in /boot/xen,
> then /xen, and then fall back to /boot/grub/grub.cfg and then
> /grub/grub.cfg using the search command.

Yeah I have mine set to look for pvgrub and then grub.cfg and then
menu.lst and then grub.conf, in /boot and / of every block device,
but it would start at the first block device and stop as soon as it
found a match, so I think it would do the same.

There is probably a way to find all matches and present a menu,
instead of stopping at the first one. All the memdisk is doing is
building a grub config that chains to another grub binary or loads
another valid grub config.

Could maybe ask on the grub mailing list?

I think it still would involve building a new grub binary though.

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting

-- 
GLLUG mailing list
GLLUG@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/gllug

Re: [GLLUG] Multiple grub installs in xen guest

2019-10-11 Thread Tim Woodall via GLLUG

On Fri, 11 Oct 2019, Tim Woodall via GLLUG wrote:


Does anyone know whether the default debian grub-xen stuff allows you to
select the grub root?

I have a bootable xen image that uses grub from /dev/xvda2. I also have
one that uses grub from /dev/vg-mirror/boot. (the vg is inside the disk
I export to the guest, not the vg of dom0)

I want to be able to boot the former, but have the latter available to
mount. But it is insistent that it will use the vg boot in favour of the
raw ext3 one.

I've tried extra="(xen/xvda2)" and extra="root=(xen/xvda2)" but neither
seem to make a difference and it persists in using lvm/vg--mirror-boot.

This weekend I'll have a look at the source for the grub-x86_64-xen.bin
bootloader and tweak it if necessary but perhaps someone already knows
how to do this?


Looks like the extra parameter is completely ignored :-(  There appears
to be nothing in grub that is passed from xen.

The debian bootloader does the standard look for pvgrub in /boot/xen,
then /xen, and then fall back to /boot/grub/grub.cfg and then
/grub/grub.cfg using the search command.

I've built a trivial replacement for grub-x86_64-xen.bin that does the
right thing for my particular case. Just a tiny tad annoying that there
doesn't seem to be any other way to do this than build a specific file
for each guest if there's more than one possible grub to boot.

Tim.


--
GLLUG mailing list
GLLUG@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/gllug

Re: [GLLUG] Multiple grub installs in xen guest

2019-10-11 Thread James Courtier-Dutton via GLLUG
On Fri, 11 Oct 2019 at 14:28, Tim Woodall via GLLUG
 wrote:
>
> Does anyone know whether the default debian grub-xen stuff allows you to
> select the grub root?
>
> I have a bootable xen image that uses grub from /dev/xvda2. I also have
> one that uses grub from /dev/vg-mirror/boot. (the vg is inside the disk
> I export to the guest, not the vg of dom0)
>
> I want to be able to boot the former, but have the latter available to
> mount. But it is insistent that it will use the vg boot in favour of the
> raw ext3 one.
>

I have not used xen in a long time so cannot help there.
From my experience with grub, sometimes you have to manually configure
what the possible boot devices are.
But, have you considered Linux's own VM tech, using KVM and QEMU ?
It has a nice option of loading the kernel before starting the VM,
thus bypassing the need for grub entirely.
virt-manager is an OK GUI to get going with it. There are also various
web based tools to manage the VMs also.

I have been playing with an AMD Vega GPU passthru on it recently, and
fixed a QEMU bug on the way.
AMD developers are very easy to get hold of when needed.
Works very nicely, and stably now.

Kind Regards

James

-- 
GLLUG mailing list
GLLUG@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/gllug

[GLLUG] Multiple grub installs in xen guest

2019-10-11 Thread Tim Woodall via GLLUG

Does anyone know whether the default debian grub-xen stuff allows you to
select the grub root?

I have a bootable xen image that uses grub from /dev/xvda2. I also have
one that uses grub from /dev/vg-mirror/boot. (the vg is inside the disk
I export to the guest, not the vg of dom0)

I want to be able to boot the former, but have the latter available to
mount. But it is insistent that it will use the vg boot in favour of the
raw ext3 one.

I've tried extra="(xen/xvda2)" and extra="root=(xen/xvda2)" but neither
seem to make a difference and it persists in using lvm/vg--mirror-boot.

This weekend I'll have a look at the source for the grub-x86_64-xen.bin
bootloader and tweak it if necessary but perhaps someone already knows
how to do this?

Tim.


--
GLLUG mailing list
GLLUG@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/gllug