[Top] [All Lists]

mounting fs from memory

Subject: mounting fs from memory
From: Andrew Frezell <>
Date: Sun, 21 Mar 2004 22:18:37 -0500
Original-recipient: rfc822;
Hello All,

I have a bootloader that that is reading segments out of flash and into memory. The segments are 3 compressed ext2 filesystems and the linux kernel. After a signature check of each of the sections in memory the bootloader jumps to the kernel.

I would like to mount one filesystem section in RAM as the root filesystem. I think it's easy enough to specify initrd as the offset and size of the section in RAM. But I would also like to mount the remaining two filesystems in RAM when linux starts up. This is where I'm having some trouble. I have two questions:

1. Is there some way to protect the memory regions in RAM from linux just trashing it? I saw a function add_memory_region in arch/mips/kernel/setup.c that seems to do something, does anyone know what exactly this does?

2. How do you mount an area of memory that you know has a filesystem already there under linux? Is there some mount command where you can pass the address and size, and mount does the right thing?

Thank you in advance,

Drew Frezell

<Prev in Thread] Current Thread [Next in Thread>