1 |
commit: af26e433cbe7b94ee699b4ecd14fe89efa46ecfe |
2 |
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 6 07:50:17 2012 +0000 |
4 |
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 6 08:19:05 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=af26e433 |
7 |
|
8 |
Support virtio devices, and provide fallback of all remaining devices. |
9 |
|
10 |
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org> |
11 |
|
12 |
--- |
13 |
ChangeLog | 3 +++ |
14 |
defaults/initrd.scripts | 5 +++++ |
15 |
2 files changed, 8 insertions(+), 0 deletions(-) |
16 |
|
17 |
diff --git a/ChangeLog b/ChangeLog |
18 |
index 1c39b7b..bc8be73 100644 |
19 |
--- a/ChangeLog |
20 |
+++ b/ChangeLog |
21 |
@@ -5,6 +5,9 @@ |
22 |
# Distributed under the GPL v2 |
23 |
# $Id$ |
24 |
|
25 |
+ 06 Feb 2012; Robin H. Johnson <robbat2@g.o> defaults/initrd.scripts: |
26 |
+ Support virtio devices, and provide fallback of all remaining devices. |
27 |
+ |
28 |
03 Feb 2012; Sebastian Pipping <sping@g.o> defaults/initrd.scripts: |
29 |
Support SD card readers. Patch by Rick Farina |
30 |
|
31 |
|
32 |
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts |
33 |
index 4f71a88..609c52f 100755 |
34 |
--- a/defaults/initrd.scripts |
35 |
+++ b/defaults/initrd.scripts |
36 |
@@ -139,12 +139,17 @@ devicelist(){ |
37 |
DEVICES="$DEVICES /dev/sd*" |
38 |
# IDE devices |
39 |
DEVICES="$DEVICES /dev/hd*" |
40 |
+ # virtio devices |
41 |
+ DEVICES="$DEVICES /dev/vd*" |
42 |
# USB using the USB Block Driver |
43 |
DEVICES="$DEVICES /dev/ubd* /dev/ubd/*" |
44 |
# iSeries devices |
45 |
DEVICES="$DEVICES /dev/iseries/vcd*" |
46 |
# builtin mmc/sd card reader devices |
47 |
DEVICES="$DEVICES /dev/mmcblk* /dev/mmcblk*/*" |
48 |
+ # fallback scanning, this might scan something twice, but it's better than |
49 |
+ # failing to boot. |
50 |
+ [ -e /proc/partitions ] && DEVICES="${DEVICES} $(awk -r '/([0-9]+[[:space:]]+)/{print "/dev/" $4}' /proc/partitions)" |
51 |
echo ${DEVICES} |
52 |
} |