Index: kernel/arch/ia32/src/boot/cboot.c
===================================================================
--- kernel/arch/ia32/src/boot/cboot.c	(revision 16da5f8ea9ab37e2cfa254399004c4e82b09001c)
+++ kernel/arch/ia32/src/boot/cboot.c	(revision 20f1597006e19ccb446878b9d52dd70c85ec74cc)
@@ -40,7 +40,43 @@
 #include <memstr.h>
 #include <string.h>
+#include <macros.h>
 
 /* This is a symbol so the type is only dummy. Obtain the value using &. */
 extern int _hardcoded_unmapped_size;
+
+/** Extract command name from the multiboot module command line.
+ *
+ * @param buf		Destination buffer (will always null-terminate).
+ * @param n		Size of destination buffer.
+ * @param cmd_line	Input string (the command line).			
+ */
+static void extract_command(char *buf, size_t n, const char *cmd_line)
+{
+	const char *start, *end, *cp;
+	size_t max_len;
+
+	/* Find the first space. */
+	end = strchr(cmd_line, ' ');
+	if (end == NULL) end = cmd_line + strlen(cmd_line);
+
+	/*
+	 * Find last occurence of '/' before 'end'. If found, place start at
+	 * next character. Otherwise, place start at beginning of buffer.
+	 */
+	cp = end;
+	start = buf;
+	while (cp != start) {
+		if (*cp == '/') {
+			start = cp + 1;
+			break;
+		}
+		--cp;
+	}
+
+	/* Copy the command and null-terminate the string. */
+	max_len = min(n - 1, (size_t) (end - start));
+	strncpy(buf, start, max_len + 1);
+	buf[max_len] = '\0';
+}
 
 /** C part of ia32 boot sequence.
@@ -73,8 +109,7 @@
 			/* Copy command line, if available. */
 			if (mods[i].string) {
-				strncpy(init.tasks[i].name, mods[i].string,
-				    CONFIG_TASK_NAME_BUFLEN - 1);
-				init.tasks[i].name[CONFIG_TASK_NAME_BUFLEN - 1]
-				    = '\0';
+				extract_command(init.tasks[i].name,
+				    CONFIG_TASK_NAME_BUFLEN,
+				    mods[i].string);
 			} else {
 				init.tasks[i].name[0] = '\0';
Index: kernel/generic/include/string.h
===================================================================
--- kernel/generic/include/string.h	(revision 16da5f8ea9ab37e2cfa254399004c4e82b09001c)
+++ kernel/generic/include/string.h	(revision 20f1597006e19ccb446878b9d52dd70c85ec74cc)
@@ -44,4 +44,7 @@
 extern char *strcpy(char *dest, const char *src);
 
+extern char *strchr(const char *s, int i);
+extern char *strrchr(const char *s, int i);
+
 #endif
 
Index: kernel/generic/src/lib/string.c
===================================================================
--- kernel/generic/src/lib/string.c	(revision 16da5f8ea9ab37e2cfa254399004c4e82b09001c)
+++ kernel/generic/src/lib/string.c	(revision 20f1597006e19ccb446878b9d52dd70c85ec74cc)
@@ -162,4 +162,45 @@
 }
 
+/** Find first occurence of character in string.
+ *
+ * @param s	String to search.
+ * @param i	Character to look for.
+ *
+ * @return	Pointer to character in @a s or NULL if not found.
+ */
+extern char *strchr(const char *s, int i)
+{
+	while (*s != '\0') {
+		if (*s == i) return (char *) s;
+		++s;
+	}
+
+	return NULL;
+}
+
+/** Find last occurence of character in string.
+ *
+ * @param s	String to search.
+ * @param i	Character to look for.
+ *
+ * @return	Pointer to character in @a s or NULL if not found.
+ */
+extern char *strrchr(const char *s, int i)
+{
+	const char *start;
+
+	start = s;
+	if (*s == '\0') return NULL;
+
+	while (*s != '\0') ++s;
+
+	while (s != start) {
+		--s;
+		if (*s == i) return (char *) s;
+	}
+
+	return NULL;
+}
+
 /** @}
  */
Index: kernel/generic/src/main/kinit.c
===================================================================
--- kernel/generic/src/main/kinit.c	(revision 16da5f8ea9ab37e2cfa254399004c4e82b09001c)
+++ kernel/generic/src/main/kinit.c	(revision 20f1597006e19ccb446878b9d52dd70c85ec74cc)
@@ -65,4 +65,6 @@
 #include <lib/rd.h>
 #include <ipc/ipc.h>
+#include <debug.h>
+#include <string.h>
 
 #ifdef CONFIG_SMP
@@ -78,4 +80,7 @@
 static char alive[ALIVE_CHARS] = "-\\|/";
 #endif
+
+#define BOOT_PREFIX		"boot:"
+#define BOOT_PREFIX_LEN		5
 
 /** Kernel initialization thread.
@@ -176,9 +181,21 @@
 		}
 
-		char *name = init.tasks[i].name;
-		if (name[0] == '\0') name = "init-bin";
+		/*
+		 * Construct task name from the 'boot:' prefix and the
+		 * name stored in the init structure (if any).
+		 */
+
+		char namebuf[TASK_NAME_BUFLEN], *name;
+
+		name = init.tasks[i].name;
+		if (name[0] == '\0') name = "<unknown>";
+
+		ASSERT(TASK_NAME_BUFLEN >= BOOT_PREFIX_LEN);
+		strncpy(namebuf, BOOT_PREFIX, TASK_NAME_BUFLEN);
+		strncpy(namebuf + BOOT_PREFIX_LEN, name,
+		    TASK_NAME_BUFLEN - BOOT_PREFIX_LEN);
 		
 		int rc = program_create_from_image((void *) init.tasks[i].addr,
-		    name, &programs[i]);
+		    namebuf, &programs[i]);
 		
 		if ((rc == 0) && (programs[i].task != NULL)) {
Index: uspace/srv/loader/main.c
===================================================================
--- uspace/srv/loader/main.c	(revision 16da5f8ea9ab37e2cfa254399004c4e82b09001c)
+++ uspace/srv/loader/main.c	(revision 20f1597006e19ccb446878b9d52dd70c85ec74cc)
@@ -271,6 +271,10 @@
 static void loader_run(ipc_callid_t rid, ipc_call_t *request)
 {
+	const char *cp;
+
 	/* Set the task name. */
-	task_set_name(pathname);
+	cp = strrchr(pathname, '/');
+	cp = (cp == NULL) ? pathname : (cp + 1);
+	task_set_name(cp);
 
 	if (is_dyn_linked == true) {
