ts-7000
[Top] [All Lists]

Re: [ts-7000] running root filesystem from ramdisk

To:
Subject: Re: [ts-7000] running root filesystem from ramdisk
From:
Date: Tue, 20 Feb 2007 19:47:12 -0500
>"initrd (0x01000000 - 0x0187f000) extends beyond physical memory -
>disabling initrd"

The irritable kernel code you are looking for is in arch/arm/mm/mm.c
in the function check_initrd().  I'm not entirely sure what is going
on there, but I think it wants to fit your entire ramdisk into a single
bank of physical memory.  (So, yes, the error message is badly phrased.)

Didn't I see something about the memory in the 7260 appearing in 4
non-contiguous banks of 8 mb each?  Normally, you wouldn't care about
something like this, but in this case it would mean that your initrd
file system can only be 8 meg.

Note that initrd is a special case of ramdisk that is handled specially
by the kernel at boot time.  If you really want something on /dev/rd*,
another option is to boot with the SD card as root, make a filesystem
on /dev/rd1, mount it, then copy files into it.

I messed around with ramdisks briefly until I figured out how clunky
the linux ramdisk is.  I gave up and switched to tmpfs.

>Some would argue that I should leave
>the root FS expanded on the SD card, mounted `ro' and use tempfs for
>/var and /tmp.  

I am doing something like this with a USB memory stick for the root.

Executables run from the root file system.  The first access causes a
page-in.  If I have enough memory, that page is never released by the VM
system; I don't get any benefit from keeping a second copy of that page
in RAM.  Similarly, that page isn't constantly being reloaded from disk,
so it won't compete with other disk traffic.

I actually mount my root read/write, but that is because I also use the
root file system for long-term data storage.  Mostly, small bits of data
pile in to the tmpfs for a while, then get copied to the USB stick in
big chunks.

b.t.w.  I don't have /var or /tmp.  I just don't make those directories
and don't run anything that expects to use them.  If I need logging,
I explicitly put it somewhere else.  That way, nothing can surprise
me by writing to my root or the tmpfs, even if I didn't realize that
some program had writes to /var buried in it somewhere.

>I believe I could also use ramdisks of fixed sizes for
>/var and /tmp, which eases my concerns of the tempfs eating all my
>ram...  

I saw something that says that tmpfs allows you to set nr_blocks and
nr_inodes at mount time.  This should keep it from eating all your
memory.

Hope that helps.

Mark S.



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

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

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU