[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
loop-aes and max_loop
I use the included patch for build-initrd.sh to set the maximum number
of loop devices. Can you add this patch to the loop-aes distribution?
Or is there a better way to set the maximum number of loop devices?
diff -u -r loop-AES-v1.5c.orig/build-initrd.sh loop-AES-v1.5c/build-initrd.sh
--- loop-AES-v1.5c.orig/build-initrd.sh Tue Feb 5 15:45:34 2002
+++ loop-AES-v1.5c/build-initrd.sh Mon Apr 8 07:54:10 2002
@@ -84,6 +84,9 @@
# temporary loop device index used in this script, 7 == /dev/loop7
TEMPLOOPINDEX=7
+# maximum number of loop devices
+MAXLOOP=8
+
# 1 = use devfs, 0 = use classic disk-based device names. If this is
# enabled (USEDEVFS=1) then setting USEPIVOT=1 is also required.
USEDEVFS=0
@@ -218,7 +221,7 @@
buf[0] = 0;
strCat(buf, "/lib/insmod -o loop /lib/loop-");
strCat(buf, &un.release[0]);
- strCat(buf, ".o");
+ strCat(buf, ".o max_loop=${MAXLOOP}");
if(exeWait(buf)) goto fail3;
#endif
The manual page for pivot_root (from Feb 23, 2000) says:
pivot_root may or may not affect its cwd. It is therefore
recommended to call chdir("/") immediately after pivot_root.
diff -u -7 -r loop-AES-v1.5c.orig/build-initrd.sh loop-AES-v1.5c/build-initrd.sh
--- loop-AES-v1.5c.orig/build-initrd.sh Tue Feb 5 15:45:34 2002
+++ loop-AES-v1.5c/build-initrd.sh Mon Apr 8 08:12:22 2002
@@ -248,14 +248,15 @@
if(pivot_root(".", "initrd")) {
wrStr("pivot_root() to new root failed. Older kernels don't have pivot_root()\n");
fail1:
chdir("/");
umount("/new-root");
goto fail4;
}
+ chdir("/");
#if ${USEDEVFS}
if(mount("none", "dev", "devfs", MS_MGC_VAL, 0)) {
wrStr("Mounting /dev failed\n");
goto fail1;
}
#endif
-
Linux-crypto: cryptography in and on the Linux system
Archive: http://mail.nl.linux.org/linux-crypto/