-
Notifications
You must be signed in to change notification settings - Fork 119
Replace initrd installer with live installer #148
Comments
We added new recipe file inside recipes-core/images/ as intel-aero-image-initramfs.bb and updated local.conf file We also added INITRAMFS_IMAGE = "intel-aero-image-initramfs" inside machine.conf we are getting cpio.gz inside deploy/images/intel-aero/ but it is not getting bundled with iso .. Do we need to set anything for CONFIG_INITRAMFS_SOURCE kernel variable ? @whbruce @bluelightning Any suggestions? |
Hi, I'd like to help with this, but need a bit more information. Can you provide more details about your setup (machine, layers used, etc) and about the goal. So far I understood that you need an installer image with enabled networking. Is there any chance to debug this in qemu or I must have a hardware to reproduce your setup? Regards, |
@bartosh Thank you :) Goal is to migrate from initrd to initramfs live installer. AFAIK with initramfs live installer there should be cpio.gz file which goes into ramfs, ISO will include that cpio.gz and kernel command line will change respectively. When i do above mentioned changes, i can see cpio.gz is getting generated but that is not getting bundled with ISO. |
First of all there is an old confusion in terms of initramfs and initrd. initrd is a file system, which is mounted by kernel, but initramfs is a cpio archive. Yocto uses initramfs. The fact that it's called initrd doesn't mean it's real initrd. It's still initramfs. Looking at the code in populate_kernel function I'd say that your initramfs was probably added to another one - microcode.cpio. Kernel should be able to unpack this combined archive. Please, check size of initrd file in your image. If it's much bigger than tmp/deploy/images/intel-aero/microcode.cpio than you have your initramfs archive added to it. I didn't use your patch yet. I've just added INITRD_IMAGE_LIVE = "core-image-minimal-initramfs" to conf/local.conf, built intel-aero-image and checked initrd size and size of core-image-minimal-initramfs and microcode.cpio: $ sudo mount -o loop ./tmp/deploy/images/intel-aero/intel-aero-image-intel-aero.iso /mnt $ ls -lh ./tmp/deploy/images/intel-aero/core-image-minimal-initramfs-intel-aero-20170608135642.rootfs.cpio.gz $ ls -lh ./tmp/deploy/images/intel-aero/microcode_20170511.cpio As you can see initrd size is a sum of 2 component sizes. Does this make sense to you? |
Goal is actually to boot a full image. In other words, the installer runs on a fully booted image, not a "boot to initrd type of image we have today". What we want to do is to be able to have all service fully running and being able to install the image to the final location - this way we have network up and running, mavlink-router up and running and possibly an http server up and running to guide the installation. |
Then I'd suggest to look at wic image type. There are at least 3 reasons for this:
|
+1 on moving to wic. |
@bartosh Compared to this way, moving to wic will be cleaner as you suggested. |
I'd like to point out that initramfs uses device memory. the bigger the image is the more memory is used. This is one more reason to move to wic. Anyway, let me know if you need further help with this. |
Is there an equivalent of the initram installer on the wic image? |
@lucasdemarchi good question. Here you can see how to add install target to boot loader: https://bugzilla.yoctoproject.org/show_bug.cgi?id=11044 Frankly I don't know if it's enough. I need to look how this functionality is implemented. Hopefully it won't be hard to implement it. As far as I understood you'd need to modify default installer anyway, so it shouldn't stop you I guess. |
Afair this will just instruct it to stop at the initrd in order to run the installer. What we need is a new installer that runs on the live boot |
Absolutely. So, we have 2 alternatives: It's your choice :) |
This one, of course. |
OK, here is the current install script: https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-core/initrdscripts/files/init-install-efi.sh. 7 K of shell code. It copies rootfs from rootfs image to the target root partition. You should decide if you want the same approach or you can somehow use existing root partition or create another partition just for this purpose. |
I'd suggest you to have a look at how this is implemented in RefKit: |
This allows us to use network while handling the installation.
The text was updated successfully, but these errors were encountered: