Re: ramdisk for initrd

From
Ralph Blach <hidden>
Date
2001-02-23 13:35:35
Andreas

I think this is better for making a ramdisk.

dd if=/dev/zero of=./ramdisk.img bs=1k count=1000
/sbin/mke2fs -q -F -m 0 ./ramdisk.img
mkdir /mnt/foo
mount -o loop ./ramdisk.img /mnt/foo
cd /mnt/foo
tar xzf ~-/ram.tgz

Andreas Schreckenberg wrote:
Tulika Pradhan wrote:
quoted
hi !
Hi,
quoted
i need a minimal ramdisk image for booting up linux on a embedded ppc board.
i tried monteVista site (as i saw a mail in the mailing list archive), but i
already have a development platform so, how can i download a ramdisk image
without downloading CDK. I use Red Hat linux v6.2 and ppc 603e processor.

Any help would be great.
I use the following script for a 4MB ramdisk:
You must be "root" and have ramdisk support

dd if=/dev/zero of=/dev/ram bs=1k count=4096
mke2fs -vm0 /dev/ram 4096
mkdir -p /mnt/ram
mount /dev/ram /mnt/ram
(cd file_system; cp -a * /mnt/ram)
umount /mnt/ram
rmdir /mnt/ram
dd if=/dev/ram of=fs_images/ramdisk.image bs=1k count=4096
gzip -v9f ramdisk.image

First create a directory called "file_system"
and copy the files you need into it.

you create a initial console in file_system/dev with
mknod c 5 1 file_system/dev

and a shell in file_system/bin, file_system/etc, or file_system/sbin...
(I use the static sash from MontaVista, rename it as init)

hope you can use this

bye
Andreas
--
          Life's not fair. But the root password helps ! :-)
                   http://schrecky.home.pages.de
               Open minds. Open sources. Open future.

Attachments

Thread (1 message) 1 message, 1 author, last reply 2001-02-23
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help