1. Set up your /boot/grub/menu.lst to change the size of ramdisks
2. Make a filesystem on the ramdisk
3. Mount the ramdisk somewhere
STEP 1.
Open a terminal and type:
Code:
sudo gedit /boot/grub/menu.lst
Enter your password to be able to edit the file
Find a section that looks something like this:
Code:
title Ubuntu Linux
root (hd0,4)
kernel /boot/vmlinuz-2.6.12-10-686 root=/dev/hda5 ro quiet splash
initrd /boot/initrd.img-2.6.12-10-686
savedefault
boot
Add ramdisk_size=500000 to the end of the kernel line, replacing 500000 with whatever size you want your ramdisk to be in KB (this example makes a 500mb drive)
After modification, the line should look like this:
Code:
kernel /boot/vmlinuz-2.6.12-10-686 root=/dev/hda5 ro quiet splash ramdisk_size=500000
You need to reboot in order for the change to the ramdisk size to take place, otherwise you'll end up with a smaller (around 50mb for me initially) ramdisk.
The ramdisk size seems to be passed to the kernel at boot time, and all of /dev/ram* end up being that size.
STEP 2.
You need to make a filesystem on /dev/ram0 in order to be able to put files on it.
In a terminal, type:
Code:
sudo mke2fs /dev/ram0
STEP 3.
Now, you need to mount the filesystem somewhere.
Again, in a terminal, type:
Code:
cd /media/
sudo mkdir ramdisk
sudo mount /dev/ram0 /media/ramdisk/
sudo chmod -R 777 ramdisk/
Thats it. now you have a ramdisk formatted with ext2!
Bookmarks