LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

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


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration