]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
91zipl: Translate 'ext2/3' into ext4
authorHannes Reinecke <hare@suse.de>
Fri, 11 Jul 2014 10:55:55 +0000 (12:55 +0200)
committerDaniel Molkentin <dmolkentin@suse.com>
Thu, 11 Jan 2018 10:12:39 +0000 (11:12 +0100)
91zipl tries to read the filesystem for the /boot/zipl device.
On SLE12, however, the ext2 and ext3 filesystems are handled
by the ext4 module.
And due to bug#886839 no error is registered and booting fails.
So implement a band-aid to translate it into ext4.

Signed-off-by: Hannes Reinecke <hare@suse.de>
modules.d/91zipl/module-setup.sh

index c65b9b1c1c653dfcfe9bfe2680fa9e8a4c510b2b..4ca7e3048f4c698224cb7c13b16c4c13375b094b 100755 (executable)
@@ -20,7 +20,20 @@ depends() {
 
 # called by dracut
 installkernel() {
-    instmods ext2
+    local _boot_zipl
+
+    _boot_zipl=$(sed -n 's/\(.*\)\w*\/boot\/zipl.*/\1/p' /etc/fstab)
+    if [ -n "$_boot_zipl" ] ; then
+        eval $(blkid -s TYPE -o udev ${_boot_zipl})
+        if [ -n "$ID_FS_TYPE" ] ; then
+            case "$ID_FS_TYPE" in
+                ext?)
+                    ID_FS_TYPE=ext4
+                    ;;
+            esac
+            instmods ${ID_FS_TYPE}
+        fi
+    fi
 }
 
 # called by dracut