Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

making a ramdisk

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
the_darkhorse13
n00b
n00b
Posts: 21
Joined: Fri Mar 19, 2004 5:11 am

making a ramdisk

  • Quote

Post by the_darkhorse13 » Sun Jun 13, 2004 9:26 am

Hi

I want to make a ramdisk for use a temp dir (Galeon cache or GIMP cache for example). I inherited (friend bought DDR ram instead of SDRAM for his old comp) a bunch of ram and now have 1GB, so I think I have plenty to donate. I've created one by using the commands

Code: Select all

# mk2fs -m 0 /dev/ram0
# mkdir /mnt/ramdisk
# mount /dev/ram0 /mnt/ramdisk
This worked fine, except that it's only 4 MB big! A howto online said I could add a

Code: Select all

ramdisk_size=10000
in /etc/lilo.conf to make the default bigger, however I get the error,

Code: Select all

Unrecognized token "ramdisk_size" at or above line 36 in file '/etc/lilo.conf'
My next try is in the kernel, where you can manually change the default ramdisk size, yet the help under this advises against it. Is there an easier way to do this? Just for info sake, I'm running a 2.6.5 gentoo-dev kernel with a bootsplash provided by the HOWTO in the this forum. Would the initrd be affected by changes to the default ramdisk size?
Thanks
Top
Regor
Guru
Guru
User avatar
Posts: 545
Joined: Tue Aug 06, 2002 5:25 am
Location: 39° 2' 48" N, 120° 59' 2" W

  • Quote

Post by Regor » Sun Jun 13, 2004 9:57 am

Did you put that ramdisk_size line as part of an "append=" line? It's a kernel parameter rather than a lilo command and needs to be passed as an argument to the kernel.
Sometimes the appropriate response to reality is to go insane.
-Philip K. Dick, Valis
Top
Nunatak
n00b
n00b
Posts: 65
Joined: Tue Jan 13, 2004 12:02 pm
Location: DarkZone

Re: making a ramdisk

  • Quote

Post by Nunatak » Sun Jun 13, 2004 12:13 pm

the_darkhorse13 wrote:Hi
I want to make a ramdisk for use a temp dir (Galeon cache or GIMP cache for example). I inherited (friend bought DDR ram instead of SDRAM for his old comp) a bunch of ram and now have 1GB
Try tmpfs

Code: Select all

cat /usr/src/linux/Documentation/filesystems/tmpfs.txt
Example from my system (fstab):

Code: Select all

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)
# Adding the following line to /etc/fstab should take care of this:
none            /tmp            tmpfs           defaults                0 0
none            /var/log        tmpfs           size=32M                0 0
<peace>
Top
the_darkhorse13
n00b
n00b
Posts: 21
Joined: Fri Mar 19, 2004 5:11 am

sounds good

  • Quote

Post by the_darkhorse13 » Mon Jun 14, 2004 9:01 am

I like the tmpfs thing. I've made a little one for the Galeon cache pages. Just another question, how big does /tmp become on the ram? You have defaults there while the other is defined at 32MB. Thanks
Top
Regor
Guru
Guru
User avatar
Posts: 545
Joined: Tue Aug 06, 2002 5:25 am
Location: 39° 2' 48" N, 120° 59' 2" W

  • Quote

Post by Regor » Mon Jun 14, 2004 9:30 am

The default is half of your physical RAM without swap.
From /usr/src/linux/Documentation/filesystems/tmpfs.txt
Sometimes the appropriate response to reality is to go insane.
-Philip K. Dick, Valis
Top
Nunatak
n00b
n00b
Posts: 65
Joined: Tue Jan 13, 2004 12:02 pm
Location: DarkZone

Re: sounds good

  • Quote

Post by Nunatak » Mon Jun 14, 2004 9:51 am

the_darkhorse13 wrote:I like the tmpfs thing.
I learn about it from this thread:http://forums.gentoo.org/viewtopic.php?t=132187
the_darkhorse13 wrote: Just another question, how big does /tmp become on the ram? You have defaults there while the other is defined at 32MB.
The default value is half of the memory. I think 512 MB that's enough for my temp files. But importent things: system allocate as much as nessasery from memory (declare value it's maximum)
<peace>
Top
the_darkhorse13
n00b
n00b
Posts: 21
Joined: Fri Mar 19, 2004 5:11 am

Thanks for the help

  • Quote

Post by the_darkhorse13 » Thu Jun 17, 2004 11:24 am

Thanks for the help.

I've just specified the /tmp folder as 70 megs, which I think is more than enough since from my own little monitoring, the folder has made it to 20 megs max...
Top
Post Reply

7 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic