Enable the user choice of kernel for running installer (#581)

Unfortunately single "install" command installs only one version of
package, even if multiple matches, so must list all versions explicitly.
Include all major releases from 3.2 to 3.11 to not require change it too
often.
Also exclude kernel from fedora repos to force use of qubes kernel.
This commit is contained in:
Marek Marczykowski-Górecki 2013-08-27 00:51:13 +02:00
parent ed5f474477
commit 05c26844ca
3 changed files with 23 additions and 7 deletions

View File

@ -4,8 +4,8 @@
# (@base is added by default unless you add --nobase to %packages) # (@base is added by default unless you add --nobase to %packages)
# (default groups for the configured repos are added by --default) # (default groups for the configured repos are added by --default)
repo --name=fedora --gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch --ignoregroups=true --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-18&arch=$basearch repo --name=fedora --gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch --ignoregroups=true --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-18&arch=$basearch --excludepkgs=kernel,kernel-*
repo --name=fedora-updates --gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch --ignoregroups=true --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f18&arch=$basearch repo --name=fedora-updates --gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch --ignoregroups=true --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f18&arch=$basearch --excludepkgs=kernel,kernel-*
repo --name=installer --baseurl=file:///tmp/qubes-installer/yum/installer/ repo --name=installer --baseurl=file:///tmp/qubes-installer/yum/installer/
repo --name=qubes-dom0 --baseurl=file:///tmp/qubes-installer/yum/qubes-dom0/ repo --name=qubes-dom0 --baseurl=file:///tmp/qubes-installer/yum/qubes-dom0/
repo --name=dom0-updates --baseurl=file:///tmp/qubes-installer/yum/dom0-updates/ repo --name=dom0-updates --baseurl=file:///tmp/qubes-installer/yum/dom0-updates/

View File

@ -17,6 +17,8 @@ installpkg firstaidkit-plugin-{passwd,key-recovery,mdadm-conf}
## kernel and firmware ## kernel and firmware
installpkg kernel installpkg kernel
installpkg kernel-3.2* kernel-3.3* kernel-3.4* kernel-3.5* kernel-3.6*
installpkg kernel-3.7* kernel-3.8* kernel-3.9* kernel-3.10* kernel-3.11*
%if basearch != "s390x": %if basearch != "s390x":
installpkg *-firmware installpkg *-firmware
installpkg b43-openfwwf installpkg b43-openfwwf

View File

@ -24,14 +24,13 @@ install ${configdir}/grub.conf ${BOOTDIR}
install usr/share/anaconda/boot/syslinux-splash.png ${BOOTDIR}/splash.png install usr/share/anaconda/boot/syslinux-splash.png ${BOOTDIR}/splash.png
install boot/memtest* ${BOOTDIR}/memtest install boot/memtest* ${BOOTDIR}/memtest
## configure bootloader
replace @VERSION@ ${product.version} ${BOOTDIR}/grub.conf ${BOOTDIR}/isolinux.cfg ${BOOTDIR}/*.msg
replace @PRODUCT@ '${product.name}' ${BOOTDIR}/grub.conf ${BOOTDIR}/isolinux.cfg ${BOOTDIR}/*.msg
replace @ROOT@ 'inst.stage2=hd:LABEL=${isolabel|udev}' ${BOOTDIR}/isolinux.cfg
## install kernels ## install kernels
mkdir ${KERNELDIR} mkdir ${KERNELDIR}
%for kernel in kernels: %for kernel in kernels:
# Use short kernel version because of ISO9660 filename length limitation
<%
shortkver = kernel.version.replace('.pvops.qubes','')
%>
%if kernel.flavor: %if kernel.flavor:
## i386 PAE ## i386 PAE
installkernel images-xen ${kernel.path} ${KERNELDIR}/vmlinuz-${kernel.flavor} installkernel images-xen ${kernel.path} ${KERNELDIR}/vmlinuz-${kernel.flavor}
@ -47,8 +46,23 @@ mkdir ${KERNELDIR}
installupgradeinitrd images-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img installupgradeinitrd images-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
%endif %endif
%endif %endif
installkernel images-alt-${shortkver} ${kernel.path} ${BOOTDIR}/vmlinuz-${shortkver}
installinitrd images-alt-${shortkver} ${kernel.initrd.path} ${BOOTDIR}/initrd-${shortkver}.img
replace '@EXTRAKERNELS@' 'label kernel-${kernel.version}\n\
menu indent count 5\n\
menu label ^Install @PRODUCT@ using ${kernel.version} kernel\n\
kernel mboot.c32\n\
append xen.gz --- vmlinuz-${shortkver} @ROOT@ quiet --- initrd-${shortkver}.img\n\
@EXTRAKERNELS@' ${BOOTDIR}/isolinux.cfg
%endfor %endfor
## configure bootloader
replace @VERSION@ ${product.version} ${BOOTDIR}/grub.conf ${BOOTDIR}/isolinux.cfg ${BOOTDIR}/*.msg
replace @PRODUCT@ '${product.name}' ${BOOTDIR}/grub.conf ${BOOTDIR}/isolinux.cfg ${BOOTDIR}/*.msg
replace @ROOT@ 'inst.stage2=hd:LABEL=${isolabel|udev}' ${BOOTDIR}/isolinux.cfg
replace @EXTRAKERNELS@ '' ${BOOTDIR}/isolinux.cfg
hardlink ${KERNELDIR}/vmlinuz ${BOOTDIR} hardlink ${KERNELDIR}/vmlinuz ${BOOTDIR}
hardlink ${KERNELDIR}/initrd.img ${BOOTDIR} hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
%if doupgrade: %if doupgrade: