From af26e433cbe7b94ee699b4ecd14fe89efa46ecfe Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Mon, 6 Feb 2012 07:50:17 +0000 Subject: [PATCH] Support virtio devices, and provide fallback of all remaining devices. Signed-off-by: Robin H. Johnson --- ChangeLog | 3 +++ defaults/initrd.scripts | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1c39b7b..bc8be73 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ # Distributed under the GPL v2 # $Id$ + 06 Feb 2012; Robin H. Johnson defaults/initrd.scripts: + Support virtio devices, and provide fallback of all remaining devices. + 03 Feb 2012; Sebastian Pipping defaults/initrd.scripts: Support SD card readers. Patch by Rick Farina diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 4f71a88..609c52f 100755 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -139,12 +139,17 @@ devicelist(){ DEVICES="$DEVICES /dev/sd*" # IDE devices DEVICES="$DEVICES /dev/hd*" + # virtio devices + DEVICES="$DEVICES /dev/vd*" # USB using the USB Block Driver DEVICES="$DEVICES /dev/ubd* /dev/ubd/*" # iSeries devices DEVICES="$DEVICES /dev/iseries/vcd*" # builtin mmc/sd card reader devices DEVICES="$DEVICES /dev/mmcblk* /dev/mmcblk*/*" + # fallback scanning, this might scan something twice, but it's better than + # failing to boot. + [ -e /proc/partitions ] && DEVICES="${DEVICES} $(awk -r '/([0-9]+[[:space:]]+)/{print "/dev/" $4}' /proc/partitions)" echo ${DEVICES} } -- 2.26.2