[syslinux] initramfs and kernel 2.6.7

H. Peter Anvin hpa at zytor.com
Thu Jul 1 11:42:13 PDT 2004


Andreas Jellinghaus [c] wrote:
> can anyone post an example how to create a "cpio.gz" format ramdisk?
> 
> my current initrd is created with
> mkcramfs -E -v $TMPDIR $BOOT/$TARGET
> 
> where $TMPDIR has bin/ lib/ etc/ etc. and linuxrc,
> $BOOT/$TARGET is /boot/initrd-typeX
> and it is working fine.
> 
> all effords to migrate this to a cpio.gz format failed
> badly, it never booted. are any special CONFIG options
> in the kernel required? I have the usual options for
> initrd:
> CONFIG_BLK_DEV_RAM=y
> CONFIG_BLK_DEV_RAM_SIZE=4096
> CONFIG_BLK_DEV_INITRD=y
> CONFIG_RAMFS=y
> CONFIG_TMPFS=y
> CONFIG_CRAMFS=y
> CONFIG_ZLIB_DEFLATE=y
> 
> that should be good enough, right?
> 
> I sometimes wonder, if the cpio.gz format is limited to 
> compiled in ramdisks (linux-2.6.7/usr/initramfs_cpio.gz),
> and external ram disks loaded with initrd= will not work at all.
> but I couldn't get an internal ramdisk to work either.
> 
> any idea what I could be missing?
> 

/init, perhaps?

Unfortunately the initial program expected to be found on the ramdisk is 
neither /sbin/init nor /linuxrc, it's /init, and if /init doesn't exist 
it falls back to the traditional methods.

You also cannot pivot-root from an initramfs.  Instead, use the run-init 
program from the klibc distribution.

	-hpa




More information about the Syslinux mailing list