missing /dev/stX device file even if rescue mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

as you know, anaconda try to load st.ko for tape support
if we are in rescue mode.

[see the followings (loader2/loader.c)]
-------------------------------------
1658     /* if we are in rescue mode lets load st.ko for tape support */
1659     if (FL_RESCUE(flags))
1660         scsiTapeInitialize(modLoaded, modDeps, modInfo);
-------------------------------------

but /dev/st0, /dev/st1,... are not created by anaconda, even if
scsi tape device(s) is found and load st.ko successfully on
rescue mode.

so I made the patch for this condition.
(and then test it on the machine which has two tape device)

thank you very much

diff -u -r1.57 hardware.c
--- loader2/hardware.c  12 Jun 2007 18:54:42 -0000      1.57
+++ loader2/hardware.c  3 Aug 2007 05:48:17 -0000
@@ -135,6 +135,8 @@
 int scsiTapeInitialize(moduleList modLoaded, moduleDeps modDeps,
                       moduleInfoSet modInfo) {
     struct device ** devices;
+    char dev[] = "/dev/stX";
+    int n;

     if (FL_TESTING(flags)) return 0;

@@ -154,6 +156,15 @@
        return 1;
     }

+    for (n = 0; devices[n]; n++) {
+        if (n > 9) {
+            logMessage(ERROR, "cannot create tape device files greater than 9");
+            break;
+        }
+        sprintf(dev, "/dev/st%d", n);
+        mknod(dev, 0600 | S_IFCHR, makedev(9, n));
+    }
+
     return 0;
 }



[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux