Hi, All I am currently learning on the early userspace(EUS) code. And my goal is accessing initrd while in the EUS. For example: mount an initrd with the EUS mount command, Fsck it, chroot to it, run linuxrc in it and so on... But depend on the code, One can not preserve a initrd image when loading into EUS. So I must modify the EUS code to reach the goal. Can you give me some advices about this? Thank you! -- Yours, Jason
jason wrote:> Hi, All > > I am currently learning on the early userspace(EUS) code. And my goal > is accessing initrd while in the EUS. For example: mount an initrd > with the EUS mount command, Fsck it, chroot to it, run linuxrc in it > and so on... > > But depend on the code, One can not preserve a initrd image when > loading into EUS. So I must modify the EUS code to reach the goal. Can > you give me some advices about this? Thank you! >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
> 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. -- Yours, jason