diff --git a/free.c b/free.c
index b071354..78a36fe 100644
--- a/free.c
+++ b/free.c
@@ -23,15 +23,33 @@
 
 #include "internal.h"
 #include <stdio.h>
+#include <sys/sysinfo.h>
 
-
-#if ! defined BB_FEATURE_USE_PROCFS
-#error Sorry, I depend on the /proc filesystem right now.
-#endif
-
+#define DIVISOR	1024
 extern int free_main(int argc, char **argv)
 {
-	char *cmd[] = { "cat", "/proc/meminfo", "\0" };
+	struct sysinfo info;
+	sysinfo(&info);
+	info.totalram/=DIVISOR;
+	info.freeram/=DIVISOR;
+	info.totalswap/=DIVISOR;
+	info.freeswap/=DIVISOR;
+	info.sharedram/=DIVISOR;
+	info.bufferram/=DIVISOR;
 
-	exit(cat_main(3, cmd));
+
+	printf("%6s%13s%13s%13s%13s%13s\n", "", "total", "used", "free", 
+			"shared", "buffers");
+
+	printf("%6s%13ld%13ld%13ld%13ld%13ld\n", "Mem:", info.totalram, 
+			info.totalram-info.freeram, info.freeram, 
+			info.sharedram, info.bufferram);
+
+	printf("%6s%13ld%13ld%13ld\n", "Swap:", info.totalswap,
+			info.totalswap-info.freeswap, info.freeswap);
+
+	printf("%6s%13ld%13ld%13ld\n", "Total:", info.totalram+info.totalswap,
+			(info.totalram-info.freeram)+(info.totalswap-info.freeswap),
+			info.freeram+info.freeswap);
+	exit(TRUE);
 }
diff --git a/init.c b/init.c
index 4a19822..6ec8115 100644
--- a/init.c
+++ b/init.c
@@ -49,15 +49,12 @@
 #include <linux/serial.h>		/* for serial_struct */
 #include <sys/vt.h>				/* for vt_stat */
 #include <sys/ioctl.h>
+#include <sys/sysinfo.h>		/* For check_free_memory() */
 #include <linux/version.h>
 #ifdef BB_SYSLOGD
 #include <sys/syslog.h>
 #endif
 
-#if ! defined BB_FEATURE_USE_PROCFS
-#error Sorry, I depend on the /proc filesystem right now.
-#endif
-
 #ifndef KERNEL_VERSION
 #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
 #endif
@@ -226,25 +223,18 @@
 }
 
 /* How much memory does this machine have? */
-static int mem_total()
+static int check_free_memory()
 {
-	char s[80];
-	char *p = "/proc/meminfo";
-	FILE *f;
-	const char pattern[] = "MemTotal:";
+	struct sysinfo info;
 
-	if ((f = fopen(p, "r")) < 0) {
-		message(LOG, "Error opening %s: %s\n", p, strerror(errno));
+	sysinfo(&info);
+	if (sysinfo(&info) != 0) {
+		message(LOG, "Error checking free memory: %s\n", strerror(errno));
 		return -1;
 	}
-	while (NULL != fgets(s, 79, f)) {
-		p = strstr(s, pattern);
-		if (NULL != p) {
-			fclose(f);
-			return (atoi(p + strlen(pattern)));
-		}
-	}
-	return -1;
+
+	return(info.freeram/1024);
+
 }
 
 static void console_init()
@@ -454,13 +444,13 @@
 {
 	struct stat statBuf;
 
-	if (mem_total() > 3500)
+	if (check_free_memory() > 1000)
 		return;
 
 	if (stat("/etc/fstab", &statBuf) == 0) {
 		/* Try to turn on swap */
 		system("/sbin/swapon -a");
-		if (mem_total() < 3500)
+		if (check_free_memory() < 1000)
 			goto goodnight;
 	} else
 		goto goodnight;
@@ -555,6 +545,11 @@
 }
 
 #if defined BB_FEATURE_INIT_CHROOT
+
+#if ! defined BB_FEATURE_USE_PROCFS
+#error Sorry, I depend on the /proc filesystem right now.
+#endif
+
 static void check_chroot(int sig)
 {
 	char *argv_init[2] = { "init", NULL, };
@@ -853,13 +848,6 @@
 #endif
 
 
-	/* Mount /proc */
-	if (mount("proc", "/proc", "proc", 0, 0) == 0) {
-		message(LOG, "Mounting /proc: done.\n");
-		kernelVersion = get_kernel_revision();
-	} else
-		message(LOG | CONSOLE, "Mounting /proc: failed!\n");
-
 	/* Make sure there is enough memory to do something useful. */
 	check_memory();
 
diff --git a/init/init.c b/init/init.c
index 4a19822..6ec8115 100644
--- a/init/init.c
+++ b/init/init.c
@@ -49,15 +49,12 @@
 #include <linux/serial.h>		/* for serial_struct */
 #include <sys/vt.h>				/* for vt_stat */
 #include <sys/ioctl.h>
+#include <sys/sysinfo.h>		/* For check_free_memory() */
 #include <linux/version.h>
 #ifdef BB_SYSLOGD
 #include <sys/syslog.h>
 #endif
 
-#if ! defined BB_FEATURE_USE_PROCFS
-#error Sorry, I depend on the /proc filesystem right now.
-#endif
-
 #ifndef KERNEL_VERSION
 #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
 #endif
@@ -226,25 +223,18 @@
 }
 
 /* How much memory does this machine have? */
-static int mem_total()
+static int check_free_memory()
 {
-	char s[80];
-	char *p = "/proc/meminfo";
-	FILE *f;
-	const char pattern[] = "MemTotal:";
+	struct sysinfo info;
 
-	if ((f = fopen(p, "r")) < 0) {
-		message(LOG, "Error opening %s: %s\n", p, strerror(errno));
+	sysinfo(&info);
+	if (sysinfo(&info) != 0) {
+		message(LOG, "Error checking free memory: %s\n", strerror(errno));
 		return -1;
 	}
-	while (NULL != fgets(s, 79, f)) {
-		p = strstr(s, pattern);
-		if (NULL != p) {
-			fclose(f);
-			return (atoi(p + strlen(pattern)));
-		}
-	}
-	return -1;
+
+	return(info.freeram/1024);
+
 }
 
 static void console_init()
@@ -454,13 +444,13 @@
 {
 	struct stat statBuf;
 
-	if (mem_total() > 3500)
+	if (check_free_memory() > 1000)
 		return;
 
 	if (stat("/etc/fstab", &statBuf) == 0) {
 		/* Try to turn on swap */
 		system("/sbin/swapon -a");
-		if (mem_total() < 3500)
+		if (check_free_memory() < 1000)
 			goto goodnight;
 	} else
 		goto goodnight;
@@ -555,6 +545,11 @@
 }
 
 #if defined BB_FEATURE_INIT_CHROOT
+
+#if ! defined BB_FEATURE_USE_PROCFS
+#error Sorry, I depend on the /proc filesystem right now.
+#endif
+
 static void check_chroot(int sig)
 {
 	char *argv_init[2] = { "init", NULL, };
@@ -853,13 +848,6 @@
 #endif
 
 
-	/* Mount /proc */
-	if (mount("proc", "/proc", "proc", 0, 0) == 0) {
-		message(LOG, "Mounting /proc: done.\n");
-		kernelVersion = get_kernel_revision();
-	} else
-		message(LOG | CONSOLE, "Mounting /proc: failed!\n");
-
 	/* Make sure there is enough memory to do something useful. */
 	check_memory();
 
diff --git a/procps/free.c b/procps/free.c
index b071354..78a36fe 100644
--- a/procps/free.c
+++ b/procps/free.c
@@ -23,15 +23,33 @@
 
 #include "internal.h"
 #include <stdio.h>
+#include <sys/sysinfo.h>
 
-
-#if ! defined BB_FEATURE_USE_PROCFS
-#error Sorry, I depend on the /proc filesystem right now.
-#endif
-
+#define DIVISOR	1024
 extern int free_main(int argc, char **argv)
 {
-	char *cmd[] = { "cat", "/proc/meminfo", "\0" };
+	struct sysinfo info;
+	sysinfo(&info);
+	info.totalram/=DIVISOR;
+	info.freeram/=DIVISOR;
+	info.totalswap/=DIVISOR;
+	info.freeswap/=DIVISOR;
+	info.sharedram/=DIVISOR;
+	info.bufferram/=DIVISOR;
 
-	exit(cat_main(3, cmd));
+
+	printf("%6s%13s%13s%13s%13s%13s\n", "", "total", "used", "free", 
+			"shared", "buffers");
+
+	printf("%6s%13ld%13ld%13ld%13ld%13ld\n", "Mem:", info.totalram, 
+			info.totalram-info.freeram, info.freeram, 
+			info.sharedram, info.bufferram);
+
+	printf("%6s%13ld%13ld%13ld\n", "Swap:", info.totalswap,
+			info.totalswap-info.freeswap, info.freeswap);
+
+	printf("%6s%13ld%13ld%13ld\n", "Total:", info.totalram+info.totalswap,
+			(info.totalram-info.freeram)+(info.totalswap-info.freeswap),
+			info.freeram+info.freeswap);
+	exit(TRUE);
 }
diff --git a/utility.c b/utility.c
index 5bfed81..64598fa 100644
--- a/utility.c
+++ b/utility.c
@@ -48,6 +48,7 @@
 #include <unistd.h>
 #include <ctype.h>
 #include <sys/param.h>			/* for PATH_MAX */
+#include <sys/utsname.h>		/* for uname(2) */
 
 #if defined BB_FEATURE_MOUNT_LOOP
 #include <fcntl.h>
@@ -103,26 +104,20 @@
 }
 
 #if defined (BB_INIT) || defined (BB_PS)
-
-#if ! defined BB_FEATURE_USE_PROCFS
-#error Sorry, I depend on the /proc filesystem right now.
-#endif
 /* Returns kernel version encoded as major*65536 + minor*256 + patch,
  * so, for example,  to check if the kernel is greater than 2.2.11:
  *	if (get_kernel_revision() <= 2*65536+2*256+11) { <stuff> }
  */
 int get_kernel_revision()
 {
-	FILE *file;
+	struct utsname name;
 	int major = 0, minor = 0, patch = 0;
 
-	file = fopen("/proc/sys/kernel/osrelease", "r");
-	if (file == NULL) {
-		/* bummer, /proc must not be mounted... */
+	if (uname(&name) == -1) {
+		perror("cannot get system information");
 		return (0);
 	}
-	fscanf(file, "%d.%d.%d", &major, &minor, &patch);
-	fclose(file);
+	sscanf(name.version, "%d.%d.%d", &major, &minor, &patch);
 	return major * 65536 + minor * 256 + patch;
 }
 #endif							/* BB_INIT || BB_PS */
