summaryrefslogtreecommitdiff
path: root/pcr/xen/xen.install
diff options
context:
space:
mode:
authorIsaac David <isacdaavid@isacdaavid.info>2017-07-11 20:00:14 -0500
committerIsaac David <isacdaavid@isacdaavid.info>2017-07-11 20:03:17 -0500
commitff4a6a76b2c992ed9471419a2264edefe61f20bf (patch)
tree783db4f67adf07beb8b0c340d22ca2609f2c7d19 /pcr/xen/xen.install
parent50633f2d519fef68201f9d2d8f2fcfff70ff7db1 (diff)
downloadabslibre-ff4a6a76b2c992ed9471419a2264edefe61f20bf.tar.gz
abslibre-ff4a6a76b2c992ed9471419a2264edefe61f20bf.tar.bz2
abslibre-ff4a6a76b2c992ed9471419a2264edefe61f20bf.zip
pcr/xen: update to 4.9.0
Diffstat (limited to 'pcr/xen/xen.install')
-rw-r--r--pcr/xen/xen.install93
1 files changed, 79 insertions, 14 deletions
diff --git a/pcr/xen/xen.install b/pcr/xen/xen.install
index f48de62f8..f629e6643 100644
--- a/pcr/xen/xen.install
+++ b/pcr/xen/xen.install
@@ -1,17 +1,64 @@
+xen_boot() {
+ cat << __EOF__
+You are not running xen unless you boot xen.
+Possible Xen boot paths:
+EFI boot -> grubx64.efi -> multiboot2 -> [xen.gz, vmlinuz, ramdisk]
+BIOS boot -> grub -> multiboot(2) -> [xen.gz, vmlinuz, ramdisk]
+
+EFI boot -> xen.efi
+
+##########
+grub multiboot2 preparation:
+Install grub: https://wiki.parabola.nu/index.php/GRUB
+
+At this time, some modifications are needed to 20_linux_xen.
+These are included in this package as 21_linux_xen
+
+Set the values needed for your configuration in /etc/default/grub
+Detailed here: https://www.gnu.org/software/grub/manual/html_node/Simple-configuration.html
+Needed:
+GRUB_CMDLINE_XEN
+GRUB_CMDLINE_LINUX_XEN_REPLACE
+These values are not required but can be used; they are appended to the previous values, then this is used for the non-recovery (default) entry:
+GRUB_CMDLINE_XEN_DEFAULT
+GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT
+
+run grub-mkconfig
+
+To boot xen as default:
+suggested: inspect and use this config to boot with. Check if the xen entry works as expected
+find the id of the xen entry and set this as DEFAULT in /etc/default/grub.
+This may look something like:
+GRUB_DEFAULT="xen-gnulinux-simple-a-unique-id-from-your-grub-goes-here"
+
+run grub-mkconfig
+
+##########
+
+Direct EFI boot preperation:
+Create a xen.cfg file in the same directory as xen.efi.
+These need to be in ESP, or in a directory accessible from you EFI bootloader.
+Put settings relevant to your system into xen.cfg
+Detailed here: https://xenbits.xen.org/docs/4.9-testing/misc/efi.html
+Needed:
+kernel
+ramdisk
+Add the xen.efi file to your EFI bootloader (such as Refind).
+And / or add the xen.efi file to you EFI boot options (efibootmgr).
+__EOF__
+}
+
install_msg() {
cat << __EOF__
===> IMPORTANT NOTICES:
In order to complete the installation, and enable Xen,
at the very least you must:
-1. If using GRUB2, edit your GRUB2 config files as specified at
- https://wiki.parabola.nu/index.php/Xen#Bootloader_Configuration
-
- Support for the grub-mkconfig command was added, and will auto-discover
- the deployed xen hypervisor and linux kernel
-2. If booting via efi, copy the example /etc/xen/efi-xen.cfg to /boot/xen.cfg
- and edit the contents to match the settings you need.
-3. Issue the following commands to allow you to create and start VMs:
+1. Configure your bootloader to boot Xen:
+__EOF__
+ xen_boot
+ cat << __EOF__
+2. Issue the following commands to allow you to create and start VMs:
systemctl enable xen-qemu-dom0-disk-backend.service
systemctl enable xen-init-dom0.service
@@ -20,34 +67,52 @@ at the very least you must:
Other optional services are:
systemctl enable xen-watchdog.service
-4. If you want some domains to automatically start up/shutdown, run the following:
+3. If you want some domains to automatically start up/shutdown, run the following:
systemctl enable xendomains.service
For more information refer to the Wiki:
https://wiki.parabola.nu/index.php/Xen
__EOF__
-
}
upgrade_msg() {
cat << __EOF__
-Xen 4.7
+Xen 4.9
Release notes
-http://wiki.xen.org/wiki/Xen_Project_4.7_Release_Notes
+http://wiki.xen.org/wiki/Xen_Project_4.9_Release_Notes
Feature list
-http://wiki.xen.org/wiki/Xen_Project_4.7_Feature_List
+http://wiki.xen.org/wiki/Xen_Project_4.9_Feature_List
__EOF__
+}
+upgrade_msg_grub_multiboot2() {
+ cat << __EOF__
+##########
+Xen 4.9 can now use grub>=2.02 multiboot2.
+If you previously booted using xen.efi, you have an alternative.
+If you previously relied on the packaged 09_xen for grub-mkconfig:
+It is now removed.
+You will need to do the following under grub multiboot2 preparation:
+##########
+__EOF__
+ xen_boot
}
post_install() {
install_msg
upgrade_msg
+ systemd-tmpfiles --create
}
post_upgrade() {
- upgrade_msg
+ if [[ "$2" < 4.9.0 || "$2" == *'4.9.0rc'* ]]; then
+ upgrade_msg
+ fi
+ if [[ "$2" < 4.9.0 || "$2" == *'4.9.0rc'* ]]; then
+ upgrade_msg_grub_multiboot2
+ fi
+ systemd-tmpfiles --create
}
pre_remove() {