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.

Dad's Nobel week official spport in Stockholm

I wanted to add that we had two amazing people to help us during Nobel Week. Dad had two people to help him during the week: Lena, for driving him around, and Eva, to help organize everything. We found out some interesting professional info about Dad's driver for the Nobel Week, Lena, when we had the opportunity to socialize a bit with her and Eva when we had dinner with Minister Lee, on the evening before the Big Day. The restaurant the Minister's people had picked was, of course, a chinese restaurant. It wasn't too far, but more on the outskirts of the city. We drove in the limo, with the others in taxis that had been arranged to pick everyone up from the Nordic Museum after the reception there (all thanks to Lena's organization). Because it was outside of town, mum felt like we shouldn't make Lena and Eva hang around and wait for us, so she invited them. Minister Lee was quite happy to have them included, and in fact, his driver sat at our table too, sitting next...

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...