• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Ramdisk on standard Ubuntu  (Read 3708 times)
Headworx
Newbie
*

Karma: 0
Posts: 19


View Profile
« on: November 11, 2009, 02:24:40 AM »

Hi,

To reduce flash wear, I would like to set up a ramdisk to hold temporary webcam images, that are continuously uploaded by a web camera. Can anybody please point me to a solution...? I am new to Linux... Found some how-to's on other boards, but they all refer to grub which is not present on the Sheeva...

Cheers,
Headworx
Logged

--
Cheers,
Headworx
http://tech.slupik.com

fragfutter
Sr. Member
****

Karma: 12
Posts: 280


View Profile
« Reply #1 on: November 11, 2009, 05:27:26 AM »

Code:
mkdir /media/ramdisk
mount -t tmpfs tmpfs /media/ramdisk

most likely /tmp is already a tmpfs. Check with
Code:
mount |grep tmpfs

Logged

Headworx
Newbie
*

Karma: 0
Posts: 19


View Profile
« Reply #2 on: November 11, 2009, 06:57:35 AM »

Thanks, but I am getting mount: unknown filesystem type 'tempfs'

Cheers,
Headworx
Logged

--
Cheers,
Headworx
http://tech.slupik.com

fragfutter
Sr. Member
****

Karma: 12
Posts: 280


View Profile
« Reply #3 on: November 11, 2009, 08:44:49 AM »

no E in tmpfs
Logged

Headworx
Newbie
*

Karma: 0
Posts: 19


View Profile
« Reply #4 on: November 11, 2009, 10:00:33 AM »

sure Smiley it does work now... i need a bigger screen I guess... now one last thing... I need to put the mounting code somewhere in a startup script... there are a lot of them in /etc/init.d... which is the right one?

Cheers,
Headworx
Logged

--
Cheers,
Headworx
http://tech.slupik.com

DamonHD
Full Member
***

Karma: 4
Posts: 169


View Profile WWW
« Reply #5 on: November 11, 2009, 11:20:38 AM »

A suitable entry in /etc/fstab should get it done automatically for you.

Note also that /var/run seems to be mounted as tmpfs automatically during startup for me, and if so maybe you could (ab)use that instead?  It's all the same storage.

Rgds

Damon
Logged

Headworx
Newbie
*

Karma: 0
Posts: 19


View Profile
« Reply #6 on: November 11, 2009, 01:42:07 PM »

so how does a suitable entry look like in thsi case....? my fstab is just:

# UNCONFIGURED FSTAB FOR BASE SYSTEM

I'd rather have a separate mount point below /var/www, as I need the ramdisk for temporary image uploads... Would not want to mix that with /var/run...

Cheers,
Headworx
Logged

--
Cheers,
Headworx
http://tech.slupik.com

mgillespie
Full Member
***

Karma: 8
Posts: 239



View Profile
« Reply #7 on: November 11, 2009, 02:10:11 PM »

Mine looks like this:

Code:
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/sda1         /usb           ext4    defaults        0       0
/usb/swap.img   none   swap   sw   0   0
tmpfs /tmp tmpfs defaults,noexec,nosuid 0 0

Logged

Headworx
Newbie
*

Karma: 0
Posts: 19


View Profile
« Reply #8 on: November 11, 2009, 03:20:53 PM »

Thank you very very much.... It all works now as expected... And I learned something new Smiley

Cheers,
Headworx
Logged

--
Cheers,
Headworx
http://tech.slupik.com

Pages: [1]
Print
Jump to: