[klibc] play with initrd in early user space

H. Peter Anvin hpa at zytor.com
Thu Jun 1 22:42:41 PDT 2006


jason wrote:
>> I suspect the easiest way to do what you want is to make sure you have a
>> shell (e.g. dash) in your initramfs, and then replace /init with a shell
>> script that just runs an interactive shell:
>>
>> #!/bin/sh
>> exec sh
>>
>> The only reason you need a shell script at all is that sh will get
>> confused if it is invoked as /init, because of the arguments passed to 
>> it.
>>
>>        -hpa
>>
> 
> Yep, I can boot into a shell indeed (dash), but the key problem is How
> can I access to the initrd. Can I simply append a "initrd=initrd.gz"
> to kernel while using EUS? If I can, then how to access the content of
> initrd.gz.
> 

The initrd is present as a file in the rootfs named /initrd.image.  If 
it isn't an initrd, but rather an initramfs image, then it will be 
overlayed on the rootfs contents.

	-hpa



More information about the klibc mailing list