Unix Technical Forum

Ramdisk (making and mounting)

This is a discussion on Ramdisk (making and mounting) within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> How do I make and mount a ramdisk from a root shell?...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-18-2008, 07:01 PM
M. K.
 
Posts: n/a
Default Ramdisk (making and mounting)

How do I make and mount a ramdisk from a root shell?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-18-2008, 07:01 PM
Billy Watt
 
Posts: n/a
Default Re: Ramdisk (making and mounting)

In news:3F9882D4.E8C2336D@ozemail.com.au,
M. K. <mkup@ozemail.com.au> rambled:

> How do I make and mount a ramdisk from a root shell?


You look it up on google you lazy bastard, do your own work.

Billy


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-18-2008, 07:01 PM
Old Man
 
Posts: n/a
Default Re: Ramdisk (making and mounting)

M. K. wrote:

> How do I make and mount a ramdisk from a root shell?


man 4 ram
http://www.linuxfocus.org/English/No...rticle124.html

--
Old Man
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-18-2008, 07:02 PM
AthlonRob
 
Posts: n/a
Default Re: Ramdisk (making and mounting)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message

On Fri, 24 Oct 2003 11:39:33 +1000, M. K. <mkup@ozemail.com.au> wrote:
> How do I make and mount a ramdisk from a root shell?


I just use /dev/shm, myself.

--
Rob | If not safe,
Email and Jabber: | one can never be free.
athlonrob at axpr dot net |
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/mJxWhm6KEoOOAe0RAs2LAJ9oab2N37maMkY7IlebMTtL07vxIA CffvRp
6VdHI7VIYWifymkwQZ3jxxY=
=pGSY
-----END PGP SIGNATURE-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-18-2008, 07:06 PM
Old Man
 
Posts: n/a
Default Re: Ramdisk (making and mounting)

AthlonRob wrote:

> I just use /dev/shm, myself.


Wow!

mount -t tmpfs tmpfs /dev/shm

How easy is that! And I had no clue it existed. This is why I read this
group. Thanks.

--
Old Man
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-18-2008, 07:06 PM
Guy Macon
 
Posts: n/a
Default Re: Ramdisk (making and mounting)


Let's review, shall we?

-----------------------------------------

LINUX:

mount -t tmpfs tmpfs /dev/shm

-----------------------------------------

WINDOWS 2000:

Download Ramdisk.exe from
http://download.microsoft.com/downlo...01/1/NT5/EN-US
/Ramdisk.exe and hope that it doesn't have a security flaw or fatal bug
- no source, so you don't know what's in it.

Extract the contents to a "folder."

Open up Control Panel

Select Add New Hardware

Select Other Device

Select Have Disk

Select the .inf file in the "folder" you extracted ramdisk.exe to.

Back up your registry

Use regedit to go to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Ramdisk\Parameters

Edit DiskSize key to the size you want.

Edit DriveLetter key to the drive letter you want.

Use regedit to go to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\AFD

Edit ImagePath key to match the drive letter you chose

Use regedit to go to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Tcpip

Edit ImagePath key to match the drive letter you chose

make a batch file named tcp.bat containing:

copy c:\winnt\System32\DRIVERS\tcpip.sys Z:\
copy c:\winnt\System32\DRIVERS\afd.sys Z:\
net start afd
net start tcpip
net start dhcp
ipconfig
pause

(Use the drive letter you chose before)

Save as tcp.bat in your startup folder.

(Windows will probably save it as tcp.bat.txt and hide the .txt
from you. Fix this)

Reboot with Zone Alarm or other firewall disabled. Note that
Windows 2000 will take an extra three minutes or so to boot
and that you may see erropr messages that (we hope) will go
away later when you set up the snapin.

VerIfy that the ramdisk works. Troubleshoot as needed.

remove the ipconfig and pause lines from tcp.bat

rename tcp.bat to tcp.cmd

move tcp.cmd from your startup folder to your root folder.

Run the Microsoft Manangement Console.

Press CTRL+M

Select Add/Remove Snap-In

Select Add to add tcp.cmd as a snapin.

Select Select Local Computer Policy

Select Computer Configuration

Select Windows Settings

Select Scripts

Select Startup/Shutdown

Select Startup

Select Startup Properties

Select Add a Script

Type in the path to tcp.cmd

Click OK twice.

Reboot, test, and troubleshoot any programs that tank when
a drive letter is added or removed.

-----------------------------------------

Aren't you glad that Windows is easy to use, not like that
hard-to-use Linux?


(Disclaimer: I got the above procedure from
http://dslnuts.com/ramdisk.shtml, but was not brave enough
to try it on my fragile Windows 2000 installation. Don't
blame me if you hose Windows.)



--
Guy Macon, Electronics Engineer & Project Manager for hire.
Remember Doc Brown from the _Back to the Future_ movies? Do you
have an "impossible" engineering project that only someone like
Doc Brown can solve? My resume is at http://www.guymacon.com/

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-18-2008, 07:06 PM
M. K.
 
Posts: n/a
Default Re: Ramdisk (making and mounting)

Cool. You can even do stuff like "mount -t tmpfs tmpfs /tmp"

Old Man wrote:

> AthlonRob wrote:
>
> > I just use /dev/shm, myself.

>
> Wow!
>
> mount -t tmpfs tmpfs /dev/shm
>
> How easy is that! And I had no clue it existed. This is why I read this
> group. Thanks.
>
> --
> Old Man


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-18-2008, 07:06 PM
Alan Connor
 
Posts: n/a
Default Re: Ramdisk (making and mounting)

On Sat, 25 Oct 2003 11:27:19 +1000, M. K. <mkup@ozemail.com.au> wrote:
>
>
> Cool. You can even do stuff like "mount -t tmpfs tmpfs /tmp"
>
> Old Man wrote:
>
>> AthlonRob wrote:
>>
>> > I just use /dev/shm, myself.

>>
>> Wow!
>>
>> mount -t tmpfs tmpfs /dev/shm
>>
>> How easy is that! And I had no clue it existed. This is why I read this
>> group. Thanks.
>>
>> --
>> Old Man

>


ramdisks are pretty simple


dd if=/dev/zero of=/dev/ram0 count=foo bs=foo
mke2fs /dev/ram0
mkdir ~/ram # arbitrary choice of names
mount /dev/ram0 ~/ram

Copy whatever files you want to it (including an entire Linux OS)

--
Alan C
Post validation at http://tinyurl.com/rv0y
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-18-2008, 07:06 PM
AthlonRob
 
Posts: n/a
Default Re: Ramdisk (making and mounting)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message

On Sat, 25 Oct 2003 11:27:19 +1000, M. K. <mkup@ozemail.com.au> wrote:
> Cool. You can even do stuff like "mount -t tmpfs tmpfs /tmp"


That wouldn't be such a great idea, though. Sometimes big stuff gets
put in /tmp...

Right now my server has 244MB of stuff in /tmp, my desktop about 4MB,
and my laptop about 17MB. I definitely couldn't afford to lose 244MB of
RAM like that, nor would I want to lose 17MB on my laptop.

(FWIW, the server's /tmp stuff is from rebuilding openssh and openssl)

--
Rob | If not safe,
Email and Jabber: | one can never be free.
athlonrob at axpr dot net |
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/md0Xhm6KEoOOAe0RAn0QAJsGTLN0sGK/K1P4bLJYY4J3YCSTtgCfQ4aB
2D+/Eecd5ZK+4o0bW+tVN48=
=1dCh
-----END PGP SIGNATURE-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-18-2008, 07:07 PM
Mark Hill
 
Posts: n/a
Default Re: Ramdisk (making and mounting)

On Fri, 24 Oct 2003 19:16:51 -0700,
AthlonRob <junkmail@axpr.net> wrote:
> On Sat, 25 Oct 2003 11:27:19 +1000, M. K. <mkup@ozemail.com.au> wrote:
>> Cool. You can even do stuff like "mount -t tmpfs tmpfs /tmp"

>
> That wouldn't be such a great idea, though. Sometimes big stuff gets
> put in /tmp...


I'd disagree. I've used a tmpfs /tmp for quite some time, so it can be
clear on reboot.

> I definitely couldn't afford to lose 244MB of
> RAM like that, nor would I want to lose 17MB on my laptop.


You don't really lose it. When the RAM is needed by something else, the
tmpfs goes in to swap. My swap is hardly used for anything else, so this
is okay by me, but I can see why some people wouldn't like this.

--
Mark Hill <usenet@mark.ukfsn.org>
The address in the From: line is not read
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:10 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com