LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-06-2008, 05:36 AM   #1
mechagojira
LQ Newbie
 
Registered: Dec 2006
Posts: 13

Rep: Reputation: 0
Can I NOT have a root acc and still make a RAMDISK in linux?


I have a user account on a CentOS system.
For my student project, I need a ramdisk with about 300MB capacity.
Can I somehow create a ram-disk although I'm NOT root?
Thanks!
 
Old 09-06-2008, 05:50 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,447
Blog Entries: 54

Rep: Reputation: 2890Reputation: 2890Reputation: 2890Reputation: 2890Reputation: 2890Reputation: 2890Reputation: 2890Reputation: 2890Reputation: 2890Reputation: 2890Reputation: 2890
If /dev/shm is accessable you can use that to write to. Otherwise no you can't, only if your unprivileged user has been granted root rights (CAP_SYS_ADMIN in this case).
 
Old 09-06-2008, 08:10 AM   #3
Whyte
LQ Newbie
 
Registered: Mar 2007
Distribution: Ubuntu
Posts: 17

Rep: Reputation: 4
Laughable, idiotic, and overly-complicated suggestion:

Maybe you could try User-Mode Linux? (or qemu, or some other kind of virtualization)
 
Old 09-06-2008, 11:57 AM   #4
mechagojira
LQ Newbie
 
Registered: Dec 2006
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by unSpawn View Post
If /dev/shm is accessable you can use that to write to. Otherwise no you can't, only if your unprivileged user has been granted root rights (CAP_SYS_ADMIN in this case).

Thank you very much for this answer.

I wrote a perl-program which does a lot of file-access, reading a line, parsing the line, several x-thausand times. total runtime was 5 hours.

I then copied everything to /dev/shm in the hope that this would speed things up. it didn't, runtime is exactly the same as from HD!

So I guess the parsing of the line takes much more time than I thought, or /dev/shm got swapped or whatever.

anyway, thanks.
 
Old 09-07-2008, 11:28 PM   #5
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,287

Rep: Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034
Sounds odd. Care to post your prog?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I make a Ramdisk? Toods Slackware 2 02-05-2006 02:50 PM
How can i make a ramdisk of 1GB or more narmida Linux - General 3 03-09-2005 12:52 PM
Root FileSystem from RamDisk/InitRD winklmj Linux - Newbie 1 11-24-2004 11:16 PM
Seg fault with root on ramdisk nawazsa Programming 0 12-08-2003 01:41 AM
I comment my root acc errno Slackware 3 07-06-2003 05:29 PM


All times are GMT -5. The time now is 08:05 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration