[svlug] RAMDisk Bluesy

Ivan Passos lists at cyclades.com
Mon Jul 16 19:43:01 PDT 2001

On Mon, 16 Jul 2001, Alvin Oga wrote:
> you need to create yourown ramdisk...with oyurown kernel...
> ( unless rd_image.gz is currently used on your system and does
> ( work before having done the flash stuff

The way I created my compressed image was as follows:

	# Create Temporary 128MB File
	dd if=/dev/zero of=/tmp/tmpfile bs=1k count=131072
	# Configure loop device
	losetup /dev/loop0 /tmp/tmpfile
	# Make ext2 filesystem on loop device and mount it
	mke2fs -m 0 /dev/loop0
	mount -t ext2 /dev/loop0 /mnt
	# Copy all files to be on the image to the loop device
	# (NOTE: file in the image/ dir. were copied from a working
	# root partition)
	cp -a image/* /mnt
	# Unmount and "delete" loop device
	umount /mnt
	losetup -d /dev/loop0
	# Compress root image
	dd if=/tmp/tmpfile | gzip -9 > rd_image.gz

> the "ramdisk_size" should be the size of the "kernel" + overhead
> for the starting point or rd_image.gz
> 	( something like that

>From the docs I read, ramdisk_size should be the size of the RAMDisk you
want the kernel to allocate (in RAM, of course :). Isn't it?

> check the mkinitrd file too for more hints

I believe mkinitrd is a Red Hat'ism. I don't have it on my system (I use

> check tomsrtbt files tooo for even more hints

These are instructions for boot floppies, and I've already checked those.
It seems that RAMDisks don't cope well with HD's, only with floppies
(someone please prove me wrong, _please_ !! :). Or at least the procedures
might be different ...

> rd_image should be a compressed image of the root fs that
> used to run in /dev/ram0 for that lilo stuff to work

Check description above.

> mke sure your kernel has the proper support for running ramdisks
> and loop device and  related options for /dev/ram

Yes, it does have support for RAMDisk, initrd and loop devices, all
built-in (i.e. not as modules, but static).

Any other clues, anyone?!?!


More information about the svlug mailing list