lorax: remove network support from UEFI initrd

Reduce its size to have efiboot.img under 32MB.
This needs rebuilding initrd and we need kernel version for that - so pass it
down from x86.tmpl.
This commit is contained in:
Marek Marczykowski-Górecki 2015-09-17 13:32:49 +02:00
parent c4b965ed88
commit b024e93e40
5 changed files with 11 additions and 5 deletions

View File

@ -7,7 +7,7 @@ check() {
}
depends() {
echo livenet nfs img-lib convertfs ifcfg
echo img-lib
case "$(uname -m)" in
s390*) echo cms ;;
esac

View File

@ -1,4 +1,4 @@
<%page args="configdir, KERNELDIR, efiarch, isolabel"/>
<%page args="configdir, KERNELDIR, efiarch, isolabel, kver"/>
<%
from string import lower
EFIBOOTDIR="EFI/BOOT"
@ -33,7 +33,8 @@ ${make_efiboot("images/efiboot.img", include_kernel=True)}
%>
%if include_kernel:
copy ${KERNELDIR}/vmlinuz ${EFIBOOTDIR}
copy ${KERNELDIR}/initrd.img ${EFIBOOTDIR}
runcmd chroot ${inroot} dracut --nomdadmconf --nolvmconf --xz --install '/.buildstamp' --add 'anaconda pollcdrom' --omit "network multipath modsign systemd crypt shutdown plymouth fcoe fcoe-uefi nfs iscsi ifcfg" /boot/efi/EFI/qubes/initrd-small.img ${kver}
install boot/efi/EFI/qubes/initrd-small.img ${EFIBOOTDIR}/initrd.img
%endif
install ${configdir}/grub2-efi.cfg ${eficonf}
install ${configdir}/xen-efi.cfg ${xenconf}

View File

@ -92,6 +92,9 @@ arch/x86/kvm
remove lib/modules/*/{build,source,*.map}
## NOTE: depmod gets re-run after cleanup finishes
## this prevents network support from being included in initrd
remove etc/sysconfig/network-scripts
## remove unused themes, theme engines, icons, etc.
removefrom gtk2 /usr/${libdir}/gtk-2.0/*/{engines,printbackends}/*
removefrom gtk2 /usr/share/themes/*

View File

@ -115,7 +115,7 @@ append etc/depmod.d/dd.conf "search updates built-in"
## include additional modules in initramfs
append etc/dracut.conf.d/extra-install-modules.conf "add_drivers+=' ehci-pci '"
append etc/dracut.conf.d/extra-install-modules.conf "omit_dracutmodules+=' multipath '"
append etc/dracut.conf.d/extra-install-modules.conf "omit_dracutmodules+=' multipath fcoe fcoe-uefi iscsi nfs ifcfg network '"
## make lvm auto-activate
remove etc/lvm/*

View File

@ -69,6 +69,8 @@ sortedkernels = sorted(kernels, key=lambda k: LooseVersion(k['version']))
append xen.gz --- vmlinuz-${shortkver} @ROOT@ quiet --- initrd-${shortkver}.img\n\
@EXTRAKERNELS@' ${BOOTDIR}/isolinux.cfg
<% latestkver = kernel.version %>
%endfor
## configure bootloader
@ -105,7 +107,7 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
efigraft += " {0}={1}/{0}".format(img,outroot)
efihybrid = "--uefi --mac" if domacboot else "--uefi"
%>
<%include file="efi.tmpl" args="configdir=configdir, KERNELDIR=KERNELDIR, efiarch=efiarch, isolabel=isolabel"/>
<%include file="efi.tmpl" args="configdir=configdir, KERNELDIR=KERNELDIR, efiarch=efiarch, isolabel=isolabel, kver=latestkver"/>
%endif
## ## make boot.iso