Salta al contenuto principale

Create Alpine Linux PV DomU

Adjust the domU config file to boot from fresh install: fix pvgrub2 loader path and install grub-xenhost

← Older revision Revision as of 15:03, 18 August 2023
(2 intermediate revisions by the same user not shown)
Line 101: Line 101:
{{cat | /mnt/grub/grub.cfg |<nowiki>menuentry 'alpine-xen' {
{{cat | /mnt/grub/grub.cfg |<nowiki>menuentry 'alpine-xen' {
     set root=(xen/xvda,msdos1)
     set root=(xen/xvda,msdos1)
     linux /boot/vmlinuz-virt root=/dev/xvda3 modules=ext4
     linux /boot/vmlinuz-virt root=/dev/xvda3 modules=ext4 console=hvc0
     initrd /boot/initramfs  
     initrd /boot/initramfs  
  }</nowiki>}}
  }</nowiki>}}
Line 117: Line 117:
{{cat | /etc/xen/a1.cfg |<nowiki># Alpine Linux PV DomU
{{cat | /etc/xen/a1.cfg |<nowiki># Alpine Linux PV DomU


kernel = "/usr/lib/xen/boot/pv-grub-x86_64.gz"
kernel = "/usr/lib/grub-xen/grub-x86_64-xen.bin"


# Path to HDD and iso file
# Path to HDD and iso file
Line 134: Line 134:
</nowiki>}}
</nowiki>}}


The name and location of pvgrub in Dom0 is distribution-specific, so you may need to change the "kernel=" line, above.  
Make sure that grub-xenhost is installed.
 
{{cmd | apk add grub-xenhost}}
For example, in Debian 10, it's {{path|'/usr/lib/grub-xen/grub-x86_64-xen.bin'}}


Remember to unmount the loopback iso image.
Remember to unmount the loopback iso image.
Line 142: Line 141:


The next time you boot, you'll be presented with the grub boot menu, and your VM will boot.
The next time you boot, you'll be presented with the grub boot menu, and your VM will boot.
== Using Legacy pvgrub ==
To use Legacy pvgrub you need to use a {{path|/boot/grub/menu.lst}} instead of {{path|/boot/grub/grub.cfg}}.
{{cat | /etc/xen/a1.cfg |<nowiki>default 0
timeout 2
title alpine-xen-pv
root (hd0,0)
kernel /boot/vmlinuz-virt root=/dev/xvda3 modules=ext4 console=hvc0
initrd /boot/initramfs-virt
</nowiki>}}
And in {{path|/etc/xen/a1.cfg}} you need to change the 'kernel' loader to
{{cat | /etc/xen/a1.cfg |<nowiki>...
kernel = "/usr/lib/xen/boot/pv-grub-x86_64.gz"
...
</nowiki>}}


== See also ==
== See also ==
Distro