<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Davehill</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Davehill"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Davehill"/>
	<updated>2026-05-01T17:26:28Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Create_Alpine_Linux_PV_DomU&amp;diff=17705</id>
		<title>Create Alpine Linux PV DomU</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Create_Alpine_Linux_PV_DomU&amp;diff=17705"/>
		<updated>2020-06-08T17:32:32Z</updated>

		<summary type="html">&lt;p&gt;Davehill: Update menu.lst to grub.cfg&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Obtain a copy of Alpine Linux ==&lt;br /&gt;
&lt;br /&gt;
To create an Alpine Linux paravirtualized (PV) DomU you will need an Alpine Linux iso.&lt;br /&gt;
&lt;br /&gt;
Download the latest alpine-virt iso from https://alpinelinux.org/downloads/&lt;br /&gt;
&lt;br /&gt;
In this example we will use {{path|/data/}} for our download and for our disk images.&lt;br /&gt;
&lt;br /&gt;
==Mount the ISO image ==&lt;br /&gt;
&lt;br /&gt;
Next, mount the iso so we can read the kernel and initramfs:&lt;br /&gt;
&lt;br /&gt;
{{cmd | mount -t iso9660 -o loop /data/alpine-virt-{{AlpineLatest}}-x86_64.iso  /media/cdrom }}&lt;br /&gt;
&lt;br /&gt;
Now we have the kernel in {{path|/media/cdrom/boot/vmlinuz-virt}} and initramfs in {{path|/media/cdrom/boot/initramfs-virt}}.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can use {{path|uniso}} or {{path|p7zip}} to extract the content to a temp area.&lt;br /&gt;
&lt;br /&gt;
== Create the disk image ==&lt;br /&gt;
Now we should create an empty file, that will be the hard drive of the DomU (in this example we are using a 3GB disk):&lt;br /&gt;
&lt;br /&gt;
{{cmd | &amp;lt;nowiki&amp;gt;dd if=/dev/zero of=/data/a1.img bs=1M count=3000&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Alternatively, if a LVM volume group (vg1 say) with free space is available on dom0, create a logical volume for alpine:&lt;br /&gt;
&lt;br /&gt;
{{cmd | &amp;lt;nowiki&amp;gt;sudo lvcreate -n alpine -L 10g vg1&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Create a DomU config file that boots the ISO image ==&lt;br /&gt;
The next step is to create a basic DomU configuration file, so we can launch the pv guest iso (save it where you like, although the most common place is {{path|/etc/xen/}}).&lt;br /&gt;
&lt;br /&gt;
{{cat | /etc/xen/a1.cfg | &amp;lt;nowiki&amp;gt;# Alpine Linux PV DomU&lt;br /&gt;
&lt;br /&gt;
# Kernel paths for install&lt;br /&gt;
kernel = &amp;quot;/media/cdrom/boot/vmlinuz-virt&amp;quot;&lt;br /&gt;
ramdisk = &amp;quot;/media/cdrom/boot/initramfs-virt&amp;quot;&lt;br /&gt;
extra=&amp;quot;modules=loop,squashfs console=hvc0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Path to HDD and iso file&lt;br /&gt;
disk = [&lt;br /&gt;
        &#039;format=raw, vdev=xvda, access=w, target=/data/a1.img&#039;,&lt;br /&gt;
        &#039;format=raw, vdev=xvdc, access=r, devtype=cdrom, target=/data/alpine-virt-&amp;lt;/nowiki&amp;gt;{{AlpineLatest}}&amp;lt;nowiki&amp;gt;-x86_64.iso&#039;&lt;br /&gt;
       ]&lt;br /&gt;
&lt;br /&gt;
# Network configuration&lt;br /&gt;
vif = [&#039;bridge=br0&#039;]&lt;br /&gt;
&lt;br /&gt;
# DomU settings&lt;br /&gt;
memory = 512&lt;br /&gt;
name = &amp;quot;alpine-a1&amp;quot;&lt;br /&gt;
vcpus = 1&lt;br /&gt;
maxvcpus = 1&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
If using LVM, replace {{path|/data/a1.img}} with {{path|/dev/vg1/alpine}} in the disk specification. &lt;br /&gt;
&lt;br /&gt;
== Install the guest ==&lt;br /&gt;
Now that we have all the necessary files, we can start the DomU to proceed with the install:&lt;br /&gt;
&lt;br /&gt;
{{cmd|xl create -f /etc/xen/a1.cfg  -c}}&lt;br /&gt;
&lt;br /&gt;
Login into the system with user &amp;quot;root&amp;quot; and no password.&lt;br /&gt;
&lt;br /&gt;
After configuring the basic system, you will be asked where would you like to install Alpine, choose xvda and sys.&lt;br /&gt;
&lt;br /&gt;
This will create three partitions on your disk, xvda1 for /boot, xvda2 for swap and xvda3 for /&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Available disks are:&lt;br /&gt;
  xvda	(3.1 GB  )&lt;br /&gt;
Which disk(s) would you like to use? (or &#039;?&#039; for help or &#039;none&#039;) [none] xvda&lt;br /&gt;
The following disk is selected:&lt;br /&gt;
  xvda	(3.1 GB  )&lt;br /&gt;
How would you like to use it? (&#039;sys&#039;, &#039;data&#039; or &#039;?&#039; for help) [?] sys&lt;br /&gt;
WARNING: The following disk(s) will be erased:&lt;br /&gt;
  xvda	(3.1 GB  )&lt;br /&gt;
WARNING: Erase the above disk(s) and continue? [y/N]: y&lt;br /&gt;
Initializing partitions on /dev/xvda...&lt;br /&gt;
Creating file systems...&lt;br /&gt;
Installing system on /dev/xvda3:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Installation is complete. Please reboot.&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you reboot, the pv bootloader, pvgrub, will look to /boot/grub/grub.cfg for its menu, so create that file first. &lt;br /&gt;
&lt;br /&gt;
Mount the boot partition and create a {{path|grub/grub.cfg}} file for pvgrub. (Note that grub.cfg is for pvgrub2 which replaced pvgrub1 and its menu.lst beginning in 2013.)&lt;br /&gt;
&lt;br /&gt;
{{cmd |&amp;lt;nowiki&amp;gt;mount /dev/xvda1 /mnt&lt;br /&gt;
mkdir /mnt/grub&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Install a basic text editor like nano or vim:&amp;lt;br/&amp;gt;&lt;br /&gt;
{{cmd | apk add nano}}&lt;br /&gt;
&lt;br /&gt;
If using nano, enter:&amp;lt;br/&amp;gt;&lt;br /&gt;
{{cmd | nano /mnt/grub/grub.cfg}}&lt;br /&gt;
&lt;br /&gt;
Then add the following to create a basic grub2 configuration file:&lt;br /&gt;
{{cat | /mnt/grub/grub.cfg |&amp;lt;nowiki&amp;gt;menuentry &#039;alpine-xen&#039; {&lt;br /&gt;
    set root=(xen/xvda,msdos1)&lt;br /&gt;
    linux /boot/vmlinuz-virt root=/dev/xvda3 modules=ext4&lt;br /&gt;
    initrd /boot/initramfs &lt;br /&gt;
 }&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Finally, Ctrl-S to save, Ctrl-X to exit nano.&lt;br /&gt;
&lt;br /&gt;
Unmount and power off.&lt;br /&gt;
{{cmd |umount /mnt&lt;br /&gt;
poweroff}}&lt;br /&gt;
&lt;br /&gt;
== Adjust the domU config file to boot from fresh install ==&lt;br /&gt;
&lt;br /&gt;
In your Dom0, edit your DomU config file to boot with pvgrub.&lt;br /&gt;
&lt;br /&gt;
{{cat | /etc/xen/a1.cfg |&amp;lt;nowiki&amp;gt;# Alpine Linux PV DomU&lt;br /&gt;
&lt;br /&gt;
kernel = &amp;quot;/usr/lib/xen/boot/pv-grub-x86_64.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Path to HDD and iso file&lt;br /&gt;
disk = [&lt;br /&gt;
        &#039;format=raw, vdev=xvda, access=w, target=/data/a1.img&#039;&lt;br /&gt;
       ]&lt;br /&gt;
&lt;br /&gt;
# Network configuration&lt;br /&gt;
vif = [&#039;bridge=br0&#039;]&lt;br /&gt;
&lt;br /&gt;
# DomU settings&lt;br /&gt;
memory = 512&lt;br /&gt;
name = &amp;quot;alpine-a1&amp;quot;&lt;br /&gt;
vcpus = 1&lt;br /&gt;
maxvcpus = 1&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
The name and location of pvgrub in Dom0 is distribution-specific, so you may need to change the &amp;quot;kernel=&amp;quot; line, above. &lt;br /&gt;
&lt;br /&gt;
For example, in Debian 10, it&#039;s {{path|&#039;/usr/lib/grub-xen/grub-x86_64-xen.bin&#039;}}&lt;br /&gt;
&lt;br /&gt;
Remember to unmount the loopback iso image.&lt;br /&gt;
{{cmd | umount /media/cdrom}}&lt;br /&gt;
&lt;br /&gt;
When you next boot, you will be presented with the grub boot menu, and your VM will boot.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [https://www.linkedin.com/pulse/setting-up-alpine-linux-370-domu-vm-xenserver-72-ali-poursamadi Setting up Alpine Linux 3.7.0 as a domU VM on XenServer 7.2]&lt;br /&gt;
&lt;br /&gt;
[[Category:Virtualization]]&lt;/div&gt;</summary>
		<author><name>Davehill</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Create_Alpine_Linux_PV_DomU&amp;diff=17696</id>
		<title>Talk:Create Alpine Linux PV DomU</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Create_Alpine_Linux_PV_DomU&amp;diff=17696"/>
		<updated>2020-06-06T16:53:34Z</updated>

		<summary type="html">&lt;p&gt;Davehill: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was recommended by the Xen Beginners Guide as an example of a manual installation of a domU. It no longer works (at least on a Debian host) because it&#039;s based on legacy grub (grub1). I sorted out how to change it to work with grub2. Because I&#039;m not a regular Alpine user, I thought it might be helpful to post proposed changes here in case there were comments before changing the page. &lt;br /&gt;
&lt;br /&gt;
So, I propose changing the content to make it work with pvgrub2. The biggest change would be to swap out the instructions to create menu.lst with instructions to create grub.cfg as follows:&lt;br /&gt;
&lt;br /&gt;
Before you reboot, mount the boot partition and create a {{path|grub/grub.cfg}} file for pvgrub:&amp;lt;br/&amp;gt;&lt;br /&gt;
{{cmd | mount /dev/xvda1 /mnt&lt;br /&gt;
 mkdir /mnt/grub}}&lt;br /&gt;
Install a basic text editor like nano or vim:&amp;lt;br/&amp;gt;&lt;br /&gt;
{{cmd | apk add nano}}&lt;br /&gt;
&lt;br /&gt;
If using nano, enter:&amp;lt;br/&amp;gt;&lt;br /&gt;
{{cmd | nano /mnt/grub/grub.cfg}}&lt;br /&gt;
&lt;br /&gt;
Then add the following to create a basic grub2 configuration file:&lt;br /&gt;
{{cat | /mnt/grub/grub.cfg |&amp;lt;nowiki&amp;gt;menuentry &#039;alpine-xen&#039; {&lt;br /&gt;
    set root=(xen/xvda,msdos1)&lt;br /&gt;
    linux /boot/vmlinuz-virt root=/dev/xvda3 modules=ext4&lt;br /&gt;
    initrd /boot/initramfs &lt;br /&gt;
 }&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Finally, Ctrl-S to save, Ctrl-X to exit nano.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I would add/change a few other small things: a bit more on pvgrub2, instructions to use LVM if that&#039;s set up in the host and a few more details around the initial installation process, etc. &lt;br /&gt;
&lt;br /&gt;
Comments welcome. &lt;br /&gt;
&lt;br /&gt;
-- [[User:Davehill|Davehill]] ([[User talk:Davehill|talk]]) 16:53, 6 June 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I had problems booting a 32bit Alpine domU on a OracleVM 2.2.2 (64bit) host - most probably since the Alpine kernel uses PVops.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The domU kernel failed to load with the following error:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Error: (2, &#039;Invalid kernel&#039;, &#039;elf_xen_note_check: ERROR: Will only load images built for the generic loader or Linux images&#039;)&lt;br /&gt;
&lt;br /&gt;
Solution is to make sure you have a 64bit ISO.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Changes:&lt;br /&gt;
I had to ln -s /media/cdrom to /media/xvdc or setup-alpine would not find some information.&lt;br /&gt;
&lt;br /&gt;
The root fs would end up in readonly mount even when it shouldn&#039;t. Reason is that the barrier test during mount fails, if some of the underlying layers do not pass barriers (i.e. older LVM/DM in dom0). You have to change the /etc/fstab of the VM *and* run tune2fs -o nobarrier on the filesystem do disable barriers (or update the dom0).&lt;br /&gt;
The &amp;quot;mounting root filesystem rw&amp;quot; init script prints out OK during all that, I&#039;ll be opening a bug about it. Right now the bugtracker does not send out confirmation emails.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One more thing: didnt the local Xen god hack pygrub to be able to boot alpine directly?&lt;br /&gt;
This howto still assumes we need to save kernel somewhere, maybe we can instead pass them as arguments at first build. More complex but also more powerful.&lt;/div&gt;</summary>
		<author><name>Davehill</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Create_Alpine_Linux_PV_DomU&amp;diff=17692</id>
		<title>Talk:Create Alpine Linux PV DomU</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Create_Alpine_Linux_PV_DomU&amp;diff=17692"/>
		<updated>2020-06-03T15:47:20Z</updated>

		<summary type="html">&lt;p&gt;Davehill: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page was recommended by the Xen Beginners Guide as an example of a manual installation of a domU. It no longer works (at least on a Debian host) because it&#039;s based on legacy grub (grub1). I sorted out how to change it to work with grub2. Because I&#039;m not a regular Alpine user, I thought it might be helpful to post proposed changes here in case there were comments before changing the page. &lt;br /&gt;
&lt;br /&gt;
So, I propose changing the content to make it work with pvgrub2. The biggest change would be to swap out the instructions to create menu.lst with instructions to create grub.cfg as follows:&lt;br /&gt;
&lt;br /&gt;
Before you reboot, mount the boot partition and create a {{path|grub/grub.cfg}} file for pvgrub:&amp;lt;br/&amp;gt;&lt;br /&gt;
{{cmd | mount /dev/xvda1 /mnt&lt;br /&gt;
 mkdir /mnt/grub}}&lt;br /&gt;
Install a basic text editor like nano or vim:&amp;lt;br/&amp;gt;&lt;br /&gt;
{{cmd | apk add nano}}&lt;br /&gt;
&lt;br /&gt;
If using nano, enter:&amp;lt;br/&amp;gt;&lt;br /&gt;
{{cmd | nano /mnt/grub/grub.cfg}}&lt;br /&gt;
&lt;br /&gt;
Then add the following to create a basic grub2 configuration file:&lt;br /&gt;
{{cat | /mnt/grub/grub.cfg |&amp;lt;nowiki&amp;gt;menuentry &#039;alpine-xen&#039; {&lt;br /&gt;
    set root=(xen/xvda,msdos1)&lt;br /&gt;
    linux /boot/vmlinuz-virt root=/dev/xvda3 modules=ext4&lt;br /&gt;
    initrd /boot/initramfs &lt;br /&gt;
 }&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Finally, Ctrl-S to save, Ctrl-X to exit nano.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I would add/change a few other small things: a bit more on pvgrub2, instructions to use LVM if that&#039;s set up in the host and a few more details around the initial installation process, etc. &lt;br /&gt;
&lt;br /&gt;
Comments welcome. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I had problems booting a 32bit Alpine domU on a OracleVM 2.2.2 (64bit) host - most probably since the Alpine kernel uses PVops.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The domU kernel failed to load with the following error:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Error: (2, &#039;Invalid kernel&#039;, &#039;elf_xen_note_check: ERROR: Will only load images built for the generic loader or Linux images&#039;)&lt;br /&gt;
&lt;br /&gt;
Solution is to make sure you have a 64bit ISO.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Changes:&lt;br /&gt;
I had to ln -s /media/cdrom to /media/xvdc or setup-alpine would not find some information.&lt;br /&gt;
&lt;br /&gt;
The root fs would end up in readonly mount even when it shouldn&#039;t. Reason is that the barrier test during mount fails, if some of the underlying layers do not pass barriers (i.e. older LVM/DM in dom0). You have to change the /etc/fstab of the VM *and* run tune2fs -o nobarrier on the filesystem do disable barriers (or update the dom0).&lt;br /&gt;
The &amp;quot;mounting root filesystem rw&amp;quot; init script prints out OK during all that, I&#039;ll be opening a bug about it. Right now the bugtracker does not send out confirmation emails.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One more thing: didnt the local Xen god hack pygrub to be able to boot alpine directly?&lt;br /&gt;
This howto still assumes we need to save kernel somewhere, maybe we can instead pass them as arguments at first build. More complex but also more powerful.&lt;/div&gt;</summary>
		<author><name>Davehill</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Create_Alpine_Linux_PV_DomU&amp;diff=17691</id>
		<title>Talk:Create Alpine Linux PV DomU</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Create_Alpine_Linux_PV_DomU&amp;diff=17691"/>
		<updated>2020-06-03T15:37:14Z</updated>

		<summary type="html">&lt;p&gt;Davehill: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This was recommended as a manual installation by the Xen Beginners Guide. It didn&#039;t work because it seems to be based on GRUB1. Because I&#039;m not a regular Alpine user, I thought it might be helpful to post proposed changes here first.&lt;br /&gt;
&lt;br /&gt;
So, I propose changing the content to make it work with pvgrub2. The biggest change would be to swap out the instructions to create menu.lst with instructions to create grub.cfg as follows:&lt;br /&gt;
&lt;br /&gt;
Before you reboot, mount the boot partition and create a {{path|grub/grub.cfg}} file for pvgrub:&amp;lt;br/&amp;gt;&lt;br /&gt;
 {{cmd | mount /dev/xvda1 /mnt&lt;br /&gt;
 mkdir /mnt/grub}}&lt;br /&gt;
Install a basic text editor like nano or vim:&amp;lt;br/&amp;gt;&lt;br /&gt;
 {{cmd | apk add nano}}&lt;br /&gt;
&lt;br /&gt;
If using nano, enter:&amp;lt;br/&amp;gt;&lt;br /&gt;
 {{cmd | nano /mnt/grub/grub.cfg}}&lt;br /&gt;
&lt;br /&gt;
Then add the following to create a basic grub2 configuration file:&lt;br /&gt;
{{cat | /mnt/grub/grub.cfg |&amp;lt;nowiki&amp;gt;menuentry &#039;alpine-xen&#039; {&lt;br /&gt;
    set root=(xen/xvda,msdos1)&lt;br /&gt;
    linux /boot/vmlinuz-virt root=/dev/xvda3 modules=ext4&lt;br /&gt;
    initrd /boot/initramfs &lt;br /&gt;
 }&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Finally, Ctrl-S to save, Ctrl-X to exit nano.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I would add/change a few other small things: a bit more on pvgrub2, instructions to use LVM if that&#039;s set up in the host and a few more details around the initial installation process, etc. &lt;br /&gt;
&lt;br /&gt;
Comments welcome. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I had problems booting a 32bit Alpine domU on a OracleVM 2.2.2 (64bit) host - most probably since the Alpine kernel uses PVops.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The domU kernel failed to load with the following error:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Error: (2, &#039;Invalid kernel&#039;, &#039;elf_xen_note_check: ERROR: Will only load images built for the generic loader or Linux images&#039;)&lt;br /&gt;
&lt;br /&gt;
Solution is to make sure you have a 64bit ISO.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Changes:&lt;br /&gt;
I had to ln -s /media/cdrom to /media/xvdc or setup-alpine would not find some information.&lt;br /&gt;
&lt;br /&gt;
The root fs would end up in readonly mount even when it shouldn&#039;t. Reason is that the barrier test during mount fails, if some of the underlying layers do not pass barriers (i.e. older LVM/DM in dom0). You have to change the /etc/fstab of the VM *and* run tune2fs -o nobarrier on the filesystem do disable barriers (or update the dom0).&lt;br /&gt;
The &amp;quot;mounting root filesystem rw&amp;quot; init script prints out OK during all that, I&#039;ll be opening a bug about it. Right now the bugtracker does not send out confirmation emails.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One more thing: didnt the local Xen god hack pygrub to be able to boot alpine directly?&lt;br /&gt;
This howto still assumes we need to save kernel somewhere, maybe we can instead pass them as arguments at first build. More complex but also more powerful.&lt;/div&gt;</summary>
		<author><name>Davehill</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Create_Alpine_Linux_PV_DomU&amp;diff=17690</id>
		<title>Talk:Create Alpine Linux PV DomU</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Create_Alpine_Linux_PV_DomU&amp;diff=17690"/>
		<updated>2020-06-03T15:16:03Z</updated>

		<summary type="html">&lt;p&gt;Davehill: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This was recommended as a manual installation by the Xen Beginners Guide. It didn&#039;t work because it seems to be based on GRUB1. Because I&#039;m not a regular Alpine user, I thought it might be helpful to post proposed changes here first.&lt;br /&gt;
&lt;br /&gt;
So, I propose changing the content to make it work with pvgrub2. The biggest change would be to swap out the instructions to create menu.lst with instructions to create grub.cfg as follows:&lt;br /&gt;
&lt;br /&gt;
Before you reboot, mount the boot partition and create a grub/grub.cfg file for pvgrub:&amp;lt;br/&amp;gt;&lt;br /&gt;
 &amp;lt;code&amp;gt;mount /dev/xvda1 /mnt&amp;lt;/code&amp;gt;&lt;br /&gt;
 &amp;lt;code&amp;gt;mkdir /mnt/grub&amp;lt;/code&amp;gt;&lt;br /&gt;
Install a basic text editor like nano or vim:&amp;lt;br/&amp;gt;&lt;br /&gt;
 &amp;lt;code&amp;gt;apk add nano&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If using nano, enter:&amp;lt;br/&amp;gt;&lt;br /&gt;
 &amp;lt;code&amp;gt;nano /mnt/grub/grub.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then add the following to create a basic grub2 file:&lt;br /&gt;
 menuentry &#039;alpine-xen&#039; {&lt;br /&gt;
    set root=(xen/xvda,msdos1)&lt;br /&gt;
    linux /boot/vmlinuz-virt root=/dev/xvda3 modules=ext4&lt;br /&gt;
    initrd /boot/initramfs &lt;br /&gt;
 }&lt;br /&gt;
Finally, Ctrl-S to save, Ctrl-X to exit nano.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I would add/change a few other small things: a bit more on pvgrub2, instructions to use LVM if that&#039;s set up in the host and a few more details around the initial installation process, etc. &lt;br /&gt;
&lt;br /&gt;
Comments welcome. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I had problems booting a 32bit Alpine domU on a OracleVM 2.2.2 (64bit) host - most probably since the Alpine kernel uses PVops.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The domU kernel failed to load with the following error:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Error: (2, &#039;Invalid kernel&#039;, &#039;elf_xen_note_check: ERROR: Will only load images built for the generic loader or Linux images&#039;)&lt;br /&gt;
&lt;br /&gt;
Solution is to make sure you have a 64bit ISO.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Changes:&lt;br /&gt;
I had to ln -s /media/cdrom to /media/xvdc or setup-alpine would not find some information.&lt;br /&gt;
&lt;br /&gt;
The root fs would end up in readonly mount even when it shouldn&#039;t. Reason is that the barrier test during mount fails, if some of the underlying layers do not pass barriers (i.e. older LVM/DM in dom0). You have to change the /etc/fstab of the VM *and* run tune2fs -o nobarrier on the filesystem do disable barriers (or update the dom0).&lt;br /&gt;
The &amp;quot;mounting root filesystem rw&amp;quot; init script prints out OK during all that, I&#039;ll be opening a bug about it. Right now the bugtracker does not send out confirmation emails.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One more thing: didnt the local Xen god hack pygrub to be able to boot alpine directly?&lt;br /&gt;
This howto still assumes we need to save kernel somewhere, maybe we can instead pass them as arguments at first build. More complex but also more powerful.&lt;/div&gt;</summary>
		<author><name>Davehill</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Create_Alpine_Linux_PV_DomU&amp;diff=17689</id>
		<title>Talk:Create Alpine Linux PV DomU</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Create_Alpine_Linux_PV_DomU&amp;diff=17689"/>
		<updated>2020-06-03T04:24:11Z</updated>

		<summary type="html">&lt;p&gt;Davehill: Replace menu.lst with grub.cfg&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This was recommended as a manual installation by the Xen Beginners Guide. It didn&#039;t work because it seems to be based on GRUB1. Because I&#039;m not a regular Alpine user, I thought it might be helpful to post proposed changes here first.&lt;br /&gt;
&lt;br /&gt;
So, I propose changing the content to make it work with pvgrub2. The biggest change would be to swap out the instructions to create menu.lst with instructions to create grub.cfg as follows:&lt;br /&gt;
&lt;br /&gt;
Before you reboot, mount the boot partition and create a grub/grub.cfg file for pvgrub:&lt;br /&gt;
&lt;br /&gt;
mount /dev/xvda1 /mnt&lt;br /&gt;
&lt;br /&gt;
mkdir /mnt/grub&lt;br /&gt;
&lt;br /&gt;
If vim or emacs are good with you, create the file below as /boot/grub/grub.cfg. If not, first install nano with:&lt;br /&gt;
&lt;br /&gt;
apk add nano &lt;br /&gt;
&lt;br /&gt;
If using vim or apt, you presumably already know what your doing. &lt;br /&gt;
&lt;br /&gt;
If using nano, the grub.cfg file should at least contain a basic grub2 file. Enter:&lt;br /&gt;
&lt;br /&gt;
nano /mnt/grub/grub.cfg&lt;br /&gt;
&lt;br /&gt;
then add the following to the new file:&lt;br /&gt;
&lt;br /&gt;
menuentry &#039;alpine-xen&#039; {&lt;br /&gt;
    set root=(xen/xvda,msdos1)&lt;br /&gt;
    linux /boot/vmlinuz-virt root=/dev/xvda3 modules=ext4&lt;br /&gt;
    initrd /boot/initramfs&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Ctrl-S to save, Ctrl-X to exit. &lt;br /&gt;
&lt;br /&gt;
(and then carry on with the instructions).&lt;br /&gt;
&lt;br /&gt;
I would add/change a few other small things: a bit more on pvgrub2, instructions to use LVM if that&#039;s set up in the host and a few more details around the initial installation process, etc. &lt;br /&gt;
&lt;br /&gt;
Comments welcome. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I had problems booting a 32bit Alpine domU on a OracleVM 2.2.2 (64bit) host - most probably since the Alpine kernel uses PVops.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The domU kernel failed to load with the following error:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Error: (2, &#039;Invalid kernel&#039;, &#039;elf_xen_note_check: ERROR: Will only load images built for the generic loader or Linux images&#039;)&lt;br /&gt;
&lt;br /&gt;
Solution is to make sure you have a 64bit ISO.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Changes:&lt;br /&gt;
I had to ln -s /media/cdrom to /media/xvdc or setup-alpine would not find some information.&lt;br /&gt;
&lt;br /&gt;
The root fs would end up in readonly mount even when it shouldn&#039;t. Reason is that the barrier test during mount fails, if some of the underlying layers do not pass barriers (i.e. older LVM/DM in dom0). You have to change the /etc/fstab of the VM *and* run tune2fs -o nobarrier on the filesystem do disable barriers (or update the dom0).&lt;br /&gt;
The &amp;quot;mounting root filesystem rw&amp;quot; init script prints out OK during all that, I&#039;ll be opening a bug about it. Right now the bugtracker does not send out confirmation emails.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One more thing: didnt the local Xen god hack pygrub to be able to boot alpine directly?&lt;br /&gt;
This howto still assumes we need to save kernel somewhere, maybe we can instead pass them as arguments at first build. More complex but also more powerful.&lt;/div&gt;</summary>
		<author><name>Davehill</name></author>
	</entry>
</feed>