Index: boot/Makefile
===================================================================
--- boot/Makefile	(revision 83285fd3caf37a4f34d7dbe0a4c21657b5db3dc7)
+++ boot/Makefile	(revision fb48a0e907656015204723ad5eead3719f29242e)
@@ -40,8 +40,5 @@
 	$(PACK) $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) arch/$(KARCH) $(COMPONENTS)
 
-$(INITRD).img: $(INITRD).fs
-	$(MKHORD) $(PAGE_SIZE) $< $@
-
-$(INITRD).fs: build_dist
+$(INITRD).img: build_dist
 ifeq ($(RDFMT),tmpfs)
 	$(MKTMPFS) $(DIST_PATH) $@
@@ -95,5 +92,5 @@
 
 clean_dist:
-	rm -f $(INITRD).fs $(INITRD).img $(COMPS_H) $(COMPS_C) $(LINK) $(LINK).comp *.co
+	rm -f $(INITRD).img $(COMPS_H) $(COMPS_C) $(LINK) $(LINK).comp *.co
 	rm -f $(USPACE_PATH)/dist/srv/*
 	rm -rf $(USPACE_PATH)/dist/drv/*
Index: boot/Makefile.common
===================================================================
--- boot/Makefile.common	(revision 83285fd3caf37a4f34d7dbe0a4c21657b5db3dc7)
+++ boot/Makefile.common	(revision fb48a0e907656015204723ad5eead3719f29242e)
@@ -53,5 +53,4 @@
 SANDBOX = pack
 PACK = $(TOOLS_PATH)/pack.py
-MKHORD = $(TOOLS_PATH)/mkhord.py
 MKTMPFS = $(TOOLS_PATH)/mktmpfs.py
 MKFAT = $(TOOLS_PATH)/mkfat.py
Index: boot/arch/amd64/Makefile.inc
===================================================================
--- boot/arch/amd64/Makefile.inc	(revision 83285fd3caf37a4f34d7dbe0a4c21657b5db3dc7)
+++ boot/arch/amd64/Makefile.inc	(revision fb48a0e907656015204723ad5eead3719f29242e)
@@ -26,6 +26,4 @@
 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
-
-PAGE_SIZE = 4096
 
 RD_SRVS_ESSENTIAL += \
Index: boot/arch/arm32/Makefile.inc
===================================================================
--- boot/arch/arm32/Makefile.inc	(revision 83285fd3caf37a4f34d7dbe0a4c21657b5db3dc7)
+++ boot/arch/arm32/Makefile.inc	(revision fb48a0e907656015204723ad5eead3719f29242e)
@@ -39,5 +39,4 @@
 BITS = 32
 ENDIANESS = LE
-PAGE_SIZE = 4096
 
 RD_SRVS_ESSENTIAL += \
Index: boot/arch/ia64/Makefile.inc
===================================================================
--- boot/arch/ia64/Makefile.inc	(revision 83285fd3caf37a4f34d7dbe0a4c21657b5db3dc7)
+++ boot/arch/ia64/Makefile.inc	(revision fb48a0e907656015204723ad5eead3719f29242e)
@@ -33,5 +33,4 @@
 BITS = 64
 ENDIANESS = LE
-PAGE_SIZE = 16384
 EXTRA_CFLAGS = -fno-unwind-tables -mfixed-range=f32-f127 -mno-pic -mno-sdata
 
Index: boot/arch/mips32/Makefile.inc
===================================================================
--- boot/arch/mips32/Makefile.inc	(revision 83285fd3caf37a4f34d7dbe0a4c21657b5db3dc7)
+++ boot/arch/mips32/Makefile.inc	(revision fb48a0e907656015204723ad5eead3719f29242e)
@@ -29,5 +29,4 @@
 BFD_ARCH = mips
 BITS = 32
-PAGE_SIZE = 16384
 EXTRA_CFLAGS = -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mips3 -mabi=32
 
Index: boot/arch/mips64/Makefile.inc
===================================================================
--- boot/arch/mips64/Makefile.inc	(revision 83285fd3caf37a4f34d7dbe0a4c21657b5db3dc7)
+++ boot/arch/mips64/Makefile.inc	(revision fb48a0e907656015204723ad5eead3719f29242e)
@@ -29,5 +29,4 @@
 BFD_ARCH = mips:4000
 BITS = 64
-PAGE_SIZE = 16384
 EXTRA_CFLAGS = -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mips3 -mabi=64
 
Index: boot/arch/ppc32/Makefile.inc
===================================================================
--- boot/arch/ppc32/Makefile.inc	(revision 83285fd3caf37a4f34d7dbe0a4c21657b5db3dc7)
+++ boot/arch/ppc32/Makefile.inc	(revision fb48a0e907656015204723ad5eead3719f29242e)
@@ -37,5 +37,4 @@
 BITS = 32
 ENDIANESS = BE
-PAGE_SIZE = 4096
 EXTRA_CFLAGS = -mcpu=powerpc -msoft-float -m32
 
Index: boot/arch/sparc64/Makefile.inc
===================================================================
--- boot/arch/sparc64/Makefile.inc	(revision 83285fd3caf37a4f34d7dbe0a4c21657b5db3dc7)
+++ boot/arch/sparc64/Makefile.inc	(revision fb48a0e907656015204723ad5eead3719f29242e)
@@ -37,5 +37,4 @@
 BITS = 64
 ENDIANESS = BE
-PAGE_SIZE = 16384
 EXTRA_CFLAGS = -mcpu=ultrasparc -m64 -mno-fpu -mcmodel=medlow
 
Index: kernel/generic/include/lib/rd.h
===================================================================
--- kernel/generic/include/lib/rd.h	(revision 83285fd3caf37a4f34d7dbe0a4c21657b5db3dc7)
+++ kernel/generic/include/lib/rd.h	(revision fb48a0e907656015204723ad5eead3719f29242e)
@@ -38,44 +38,5 @@
 #include <typedefs.h>
 
-/**
- * RAM disk version
- */
-#define RD_VERSION	1
-
-/**
- * RAM disk magic number
- */
-#define RD_MAGIC_SIZE	4
-#define RD_MAG0			'H'
-#define RD_MAG1			'O'
-#define RD_MAG2			'R'
-#define RD_MAG3			'D'
-
-/**
- * RAM disk data encoding types
- */
-#define RD_DATA_NONE	0
-#define RD_DATA_LSB		1		/* Least significant byte first (little endian) */
-#define RD_DATA_MSB		2		/* Most signigicant byte first (big endian) */
-
-/**
- * RAM disk error return codes
- */
-#define RE_OK			0	/* No error */
-#define RE_INVALID		1	/* Invalid RAM disk image */
-#define RE_UNSUPPORTED		2	/* Non-supported image (e.g. wrong version) */
-
-/** RAM disk header */
-struct rd_header {
-	uint8_t magic[RD_MAGIC_SIZE];
-	uint8_t version;
-	uint8_t data_type;
-	uint32_t header_size;
-	uint64_t data_size;
-} __attribute__ ((packed));
-
-typedef struct rd_header rd_header_t;
-
-extern int init_rd(rd_header_t *addr, size_t size);
+extern void init_rd(void *, size_t);
 
 #endif
Index: kernel/generic/src/lib/rd.c
===================================================================
--- kernel/generic/src/lib/rd.c	(revision 83285fd3caf37a4f34d7dbe0a4c21657b5db3dc7)
+++ kernel/generic/src/lib/rd.c	(revision fb48a0e907656015204723ad5eead3719f29242e)
@@ -33,5 +33,5 @@
 /**
  * @file
- * @brief	RAM disk support.
+ * @brief RAM disk support.
  *
  * Support for RAM disk images.
@@ -39,66 +39,31 @@
 
 #include <lib/rd.h>
-#include <byteorder.h>
 #include <mm/frame.h>
 #include <sysinfo/sysinfo.h>
 #include <ddi/ddi.h>
-#include <align.h>
 
-static parea_t rd_parea;		/**< Physical memory area for rd. */
+/** Physical memory area for RAM disk. */
+static parea_t rd_parea;
 
-/**
- * RAM disk initialization routine. At this point, the RAM disk memory is shared
- * and information about the share is provided as sysinfo values to the
- * userspace tasks.
- */  
-int init_rd(rd_header_t *header, size_t size)
+/** RAM disk initialization routine
+ *
+ * The information about the RAM disk is provided as sysinfo
+ * values to the uspace tasks.
+ *
+ */
+void init_rd(void *data, size_t size)
 {
-	/* Identify RAM disk */
-	if ((header->magic[0] != RD_MAG0) || (header->magic[1] != RD_MAG1) ||
-	    (header->magic[2] != RD_MAG2) || (header->magic[3] != RD_MAG3))
-		return RE_INVALID;
+	uintptr_t base = KA2PA((uintptr_t) data);
+	ASSERT((base % FRAME_SIZE) == 0);
 	
-	/* Identify version */	
-	if (header->version != RD_VERSION)
-		return RE_UNSUPPORTED;
-	
-	uint32_t hsize;
-	uint64_t dsize;
-	switch (header->data_type) {
-	case RD_DATA_LSB:
-		hsize = uint32_t_le2host(header->header_size);
-		dsize = uint64_t_le2host(header->data_size);
-		break;
-	case RD_DATA_MSB:
-		hsize = uint32_t_be2host(header->header_size);
-		dsize = uint64_t_be2host(header->data_size);
-		break;
-	default:
-		return RE_UNSUPPORTED;
-	}
-	
-	if ((hsize % FRAME_SIZE) || (dsize % FRAME_SIZE))
-		return RE_UNSUPPORTED;
-		
-	if (hsize > size)
-		return RE_INVALID;
-	
-	if ((uint64_t) hsize + dsize > size)
-		dsize = size - hsize;
-	
-	rd_parea.pbase = ALIGN_DOWN((uintptr_t) KA2PA((void *) header + hsize),
-	    FRAME_SIZE);
-	rd_parea.frames = SIZE2FRAMES(dsize);
+	rd_parea.pbase = base;
+	rd_parea.frames = SIZE2FRAMES(size);
 	rd_parea.unpriv = false;
 	rd_parea.mapped = false;
 	ddi_parea_register(&rd_parea);
-
+	
 	sysinfo_set_item_val("rd", NULL, true);
-	sysinfo_set_item_val("rd.header_size", NULL, hsize);	
-	sysinfo_set_item_val("rd.size", NULL, dsize);
-	sysinfo_set_item_val("rd.address.physical", NULL,
-	    (sysarg_t) KA2PA((void *) header + hsize));
-
-	return RE_OK;
+	sysinfo_set_item_val("rd.size", NULL, size);
+	sysinfo_set_item_val("rd.address.physical", NULL, (sysarg_t) base);
 }
 
Index: kernel/generic/src/main/kinit.c
===================================================================
--- kernel/generic/src/main/kinit.c	(revision 83285fd3caf37a4f34d7dbe0a4c21657b5db3dc7)
+++ kernel/generic/src/main/kinit.c	(revision fb48a0e907656015204723ad5eead3719f29242e)
@@ -179,5 +179,5 @@
 	for (i = 0; i < init.cnt; i++) {
 		if (init.tasks[i].addr % FRAME_SIZE) {
-			printf("init[%zu].addr is not frame aligned\n", i);
+			printf("init[%zu]: Address is not frame aligned\n", i);
 			programs[i].task = NULL;
 			continue;
@@ -203,22 +203,28 @@
 		    namebuf, &programs[i]);
 		
-		if ((rc == 0) && (programs[i].task != NULL)) {
+		if (rc == 0) {
+			if (programs[i].task != NULL) {
+				/*
+				 * Set capabilities to init userspace tasks.
+				 */
+				cap_set(programs[i].task, CAP_CAP | CAP_MEM_MANAGER |
+				    CAP_IO_MANAGER | CAP_IRQ_REG);
+				
+				if (!ipc_phone_0)
+					ipc_phone_0 = &programs[i].task->answerbox;
+			}
+			
 			/*
-			 * Set capabilities to init userspace tasks.
+			 * If programs[i].task == NULL then it is
+			 * the program loader and it was registered
+			 * successfully.
 			 */
-			cap_set(programs[i].task, CAP_CAP | CAP_MEM_MANAGER |
-			    CAP_IO_MANAGER | CAP_IRQ_REG);
-			
-			if (!ipc_phone_0)
-				ipc_phone_0 = &programs[i].task->answerbox;
-		} else if (rc == 0) {
-			/* It was the program loader and was registered */
-		} else {
-			/* RAM disk image */
-			int rd = init_rd((rd_header_t *) init.tasks[i].addr, init.tasks[i].size);
-			
-			if (rd != RE_OK)
-				printf("Init binary %zu not used (error %d)\n", i, rd);
-		}
+		} else if (i == init.cnt - 1) {
+			/*
+			 * Assume the last task is the RAM disk.
+			 */
+			init_rd((void *) init.tasks[i].addr, init.tasks[i].size);
+		} else
+			printf("init[%zu]: Init binary load failed (error %d)\n", i, rc);
 	}
 	
Index: ols/mkhord.py
===================================================================
--- tools/mkhord.py	(revision 83285fd3caf37a4f34d7dbe0a4c21657b5db3dc7)
+++ 	(revision )
@@ -1,105 +1,0 @@
-#!/usr/bin/env python
-#
-# Copyright (c) 2008 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-"""
-HORD encapsulator
-"""
-
-import sys
-import os
-import xstruct
-
-HEADER = """little:
-	char tag[4]            /* 'HORD' */
-	uint8_t version        /* version */
-	uint8_t encoding       /* encoding */
-	uint32_t header_size   /* header size */
-	uint64_t payload_size  /* payload size */
-"""
-
-HORD_LSB = 1
-
-def align_up(size, alignment):
-	"Align upwards to a given alignment"
-	return (((size) + ((alignment) - 1)) & ~((alignment) - 1))
-
-def usage(prname):
-	"Print usage syntax"
-	print(prname + " <ALIGNMENT> <FS_IMAGE> <HORD_IMAGE>")
-
-def main():
-	if (len(sys.argv) < 4):
-		usage(sys.argv[0])
-		return
-	
-	if (not sys.argv[1].isdigit()):
-		print("<ALIGNMENT> must be a number")
-		return
-	
-	align = int(sys.argv[1], 0)
-	if (align <= 0):
-		print("<ALIGNMENT> must be positive")
-		return
-	
-	fs_image = os.path.abspath(sys.argv[2])
-	if (not os.path.isfile(fs_image)):
-		print("<FS_IMAGE> must be a file")
-		return
-	
-	inf = open(fs_image, "rb")
-	outf = open(sys.argv[3], "wb")
-	
-	header = xstruct.create(HEADER)
-	
-	header_size = header.size()
-	payload_size = os.path.getsize(fs_image)
-	
-	header_size_aligned = align_up(header_size, align)
-	payload_size_aligned = align_up(payload_size, align)
-	
-	header.tag = b"HORD"
-	header.version = 1
-	header.encoding = HORD_LSB
-	header.header_size = header_size_aligned
-	header.payload_size = payload_size_aligned
-	
-	outf.write(header.pack())
-	outf.write(xstruct.create("little: padding[%d]" % (header_size_aligned - header_size)).pack())
-	
-	outf.write(inf.read())
-	
-	padding = payload_size_aligned - payload_size
-	if (padding > 0):
-		outf.write(xstruct.create("little: padding[%d]" % padding).pack())
-	
-	inf.close()
-	outf.close()
-
-if __name__ == '__main__':
-	main()
