summaryrefslogtreecommitdiffstats
path: root/make_slackware_live.sh
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2019-11-02 13:30:34 +0100
committer Eric Hameleers <alien@slackware.com>2019-11-02 13:30:34 +0100
commitaac7e7f7138a9576dfe084dc1da22d2b13c3822c (patch)
treec16647cf26ca1647e7f71924ad2abdcbb5430fa0 /make_slackware_live.sh
parent09db7c1245ab4ef3aa465cb16d0d50cfdbf48854 (diff)
downloadliveslak-aac7e7f7138a9576dfe084dc1da22d2b13c3822c.tar.gz
liveslak-aac7e7f7138a9576dfe084dc1da22d2b13c3822c.tar.xz
NFS root (PXE boot): add virtio drivers required for older VM
The virtio_pci driver is required in some cases when using older types of virtual machine software.
Diffstat (limited to '')
-rwxr-xr-xmake_slackware_live.sh42
1 files changed, 22 insertions, 20 deletions
diff --git a/make_slackware_live.sh b/make_slackware_live.sh
index b7f521e..9b8d339 100755
--- a/make_slackware_live.sh
+++ b/make_slackware_live.sh
@@ -200,7 +200,7 @@ SEQ_STUDW="tagfile:a,ap,d,e,f,k,kde,l,n,t,tcl,x,xap,xfce,y pkglist:slackextra,sl
KMODS=${KMODS:-"squashfs:overlay:loop:xhci-pci:ohci-pci:ehci-pci:xhci-hcd:uhci-hcd:ehci-hcd:mmc-core:mmc-block:sdhci:sdhci-pci:sdhci-acpi:usb-storage:hid:usbhid:i2c-hid:hid-generic:hid-apple:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd:mbcache:ext3:ext4:isofs:fat:nls_cp437:nls_iso8859-1:msdos:vfat:ntfs"}
# Network kernel modules to include for NFS root support:
-NETMODS="kernel/drivers/net"
+NETMODS="kernel/drivers/net kernel/drivers/virtio"
# Network kernel modules to exclude from above list:
NETEXCL="appletalk arcnet bonding can dummy.ko hamradio hippi ifb.ko irda macvlan.ko macvtap.ko pcmcia sb1000.ko team tokenring tun.ko usb veth.ko wan wimax wireless xen-netback.ko"
@@ -2423,25 +2423,27 @@ if [ "$NFSROOTSUP" = "YES" ]; then
# We need to extract the full kernel-modules package for deps resolving:
tar -C ${KMODS_TEMP} -xf ${KMODS_PKG}
# Get the kernel modules:
- cd ${KMODS_TEMP}
- cp -a --parents lib/modules/${KVER}/${NETMODS} \
- ${LIVE_ROOTDIR}/boot/initrd-tree/
- cd - 1>/dev/null
- # Prune the ones we do not need:
- for KNETRM in ${NETEXCL} ; do
- find ${LIVE_ROOTDIR}/boot/initrd-tree/lib/modules/${KVER}/${NETMODS} \
- -name $KNETRM -depth -exec rm -rf {} \;
- done
- # Add any dependency modules:
- for MODULE in $(find ${LIVE_ROOTDIR}/boot/initrd-tree/lib/modules/${KVER}/${NETMODS} -type f -exec basename {} .ko \;) ; do
- /sbin/modprobe --dirname ${KMODS_TEMP} --set-version $KVER --show-depends --ignore-install $MODULE 2>/dev/null |grep "^insmod " |cut -f 2 -d ' ' |while read SRCMOD; do
- if [ "$(basename $SRCMOD .ko)" != "$MODULE" ]; then
- cd ${KMODS_TEMP}
- # Need to strip ${KMODS_TEMP} from the start of ${SRCMOD}:
- cp -a --parents $(echo $SRCMOD |sed 's|'${KMODS_TEMP}'/|./|' ) \
- ${LIVE_ROOTDIR}/boot/initrd-tree/
- cd - 1>/dev/null
- fi
+ for NETMODPATH in ${NETMODS} ; do
+ cd ${KMODS_TEMP}
+ cp -a --parents lib/modules/${KVER}/${NETMODPATH} \
+ ${LIVE_ROOTDIR}/boot/initrd-tree/
+ cd - 1>/dev/null
+ # Prune the ones we do not need:
+ for KNETRM in ${NETEXCL} ; do
+ find ${LIVE_ROOTDIR}/boot/initrd-tree/lib/modules/${KVER}/${NETMODPATH} \
+ -name $KNETRM -depth -exec rm -rf {} \;
+ done
+ # Add any dependency modules:
+ for MODULE in $(find ${LIVE_ROOTDIR}/boot/initrd-tree/lib/modules/${KVER}/${NETMODPATH} -type f -exec basename {} .ko \;) ; do
+ /sbin/modprobe --dirname ${KMODS_TEMP} --set-version $KVER --show-depends --ignore-install $MODULE 2>/dev/null |grep "^insmod " |cut -f 2 -d ' ' |while read SRCMOD; do
+ if [ "$(basename $SRCMOD .ko)" != "$MODULE" ]; then
+ cd ${KMODS_TEMP}
+ # Need to strip ${KMODS_TEMP} from the start of ${SRCMOD}:
+ cp -a --parents $(echo $SRCMOD |sed 's|'${KMODS_TEMP}'/|./|' ) \
+ ${LIVE_ROOTDIR}/boot/initrd-tree/
+ cd - 1>/dev/null
+ fi
+ done
done
done
# Remove the temporary tree: