From: Rob F. <rf...@ke...> - 2001-12-29 22:00:15
|
On Sat, 29 Dec 2001 09:46:36 -0500 Jeff Dike <jd...@ka...> wrote: >. I've never had cause to figure out what an initrd image is supposed > to do or how it's supposed to do it. A normal way to use it is: On another machine make a blank file i.e. with dd if=/dev/zero of=fs count=4000 bsize=1k mkfs a filesystem on this file this file, i.e. mkfs fs loop mount the file: mkdir mnt; mount -o loop fs mt copy a filesystem into this file (for example get a copy of tomsbtr and copy -a it, I use a busybox and uClibc built disk). unmount and gzip it to make fs.gz then fire up ye old unix kernel with the initrd compiled in and initrd=fs.gz ramdisk_size=4000 root=/dev/ram0 init=/linuxrc as arguments. The kernel will create a ram disk, then uncompress the fs.gz directly into it as an image. Once this is done, the ram disk will have a filesystem in it. The kernel will then mount this fileystem as the root and, under instruction from the command line will execute the linuxrc file which kicks starts the whole process. (That's where I create the shm filesystem and pivot). -- Rob Fowler rf...@ke... |