Skip to main content

Create large 1G Ramdisk on Red Hat Enterprise 4 Linux

Might as well put this up because I had a bit of a time finding info on this. The question is, how do you make a large ramdisk on linux (specifically for me, Red Hat Enterprise 4). Took a combination of other people's posts to put it together.

The basics are:
1. Edit /etc/grub.conf to add ramdisk_size = xxx (in kb) at the end of the 'kernal' line. I wanted to get a 1G ramdisk, so: ramdisk_size = 1000000

2. Reboot.

3. Double check things are ok: dmesg | grep RAMDISK

4. Then format the disk. I want the whole 1G in one disk. And here's the little tidbit. Apparantly, the default behavior for mke2fs is to create block sizes of 1024 for ramdisk sizes <= 512M. For larger sizes, it creates block sizes of 4096. If you use the default, you'll get the error something like this:
"wrong fs type, bad option, bad superblock on /dev/sda1, or too many mounted file systems"
when you try to mount your ramdisk.

So you need to do this:
mke2fs -b 1024 -m 0 /dev/ram0
(-m is optional; use if you don't want space reserved for root user)

5. Now you can mount the ramdisk: mount /dev/ram0 /var/mountpoint

6. Check to see if all is well with: df

And there you have it. A big ramdisk.

Comments

Popular posts from this blog

Add a user with root privileges on a linux system running busybox

The problem with busybox is that it doesn't support a whole bunch of useful stuff that would help in this situation, such as sudo, and therefore the wheel solution proposed in other posts, in /etc/sudoers , can't be done. Likewise, usermod is not available, and even adduser -u 0 doesn't work because it complains that "UID 0 is already used". What you have to do is simple: adduser user vi /etc/passwd and modify the uid of user . /etc/passwd will look something like this: root:x:0:0:root:/home:/bin/sh daemon:x:1:1:daemon:/usr/sbin:/bin/sh sampleUser:x:1000:1000:Linux User,,,:/home/sampleUser:/bin/sh to give sampleUser root privileges, edit like this: sampleUser:x:0:0:Linux User,,,:/home/sampleUser:/bin/sh I.e. set sampleUser's uid = 0 Done.

Head Radar Helmet vs Head Cinema Pro Helmet

I was intriuged by the HEAD integrated visor/google-replacement helmets, and used the HEAD Radar helmet all last season (23-24). I love the sphere fit, which is very comfortable since it conforms to your head shape. My head is 59cm and thus at the top of the range of the M/L size, and the Radar helmet was very comfortable. With the Radar, the way the visor/goggle-replacement works is that there is an clip mounted via an elastic cord to the helmet, that mechanically clicks into the visor/google-replacement. It can be raised and is held by a click stop on the helmet but because of the elastic at each side, needs two hands to bring up and down as it needs to be extended away from the helmet before being moved. The lens is big and provides good peripheral vision, but again because of the elastic, is pretty tight to your face, i.e. as tight as a google would be. This seals the visor pretty well, so that no wind gets behind the lens at speed. The visor padding is comfortable, but it is not...

Danger Zone revisited

Finally tracked down some statistics on homicides in the SF Bay area as a whole. As previously stated, Hong Kong, a city of 8m, has roughly the same population as the Bay area, and a homicide total of about 50 murders per year. In 2007, the 11 cities in the aqrea with populations over 100k, had approx 350 people murdered. In comparison to NYC, which had approx 500 murders in 2007 (out of 19.7m population) So in terms of population, the murder rate in the Bay Area (1/23k) is higher than in NYC (1/40k) by almost twice! And of course, much more dangerous (7x) than HK (1/160k) Yikes.