Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s390x: put coreos-installer into initramfs #294

Closed

Conversation

nikita-dubrovskii
Copy link
Contributor

Signed-off-by: Nikita Dubrovskii nikita@linux.ibm.com

Signed-off-by: Nikita Dubrovskii <nikita@linux.ibm.com>
@nikita-dubrovskii
Copy link
Contributor Author

This PR depends on: coreos/coreos-installer#153
Both of them allows CoreOS to be installed and used on IBM zVM.


`#cp ipl c`

During `cosa buildextend-live` ramdisk gets generated, but contains no coreos-installer,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, can you expand on this? The ramdisk contains the root squashfs into which we pivot, right? That rootfs is a regular FCOS system which should have coreos-installer in it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After checking (unpacking) fedora-coreos-*.dev.*-live-initramfs.s390x.img i figured out, that it doesn't contain coreos-installer service. Maybe on x86 it's there, haven't checked yet. It means, that on IBM Z we are not able to proceed with CoreOS without installation during 1st boot.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After checking (unpacking) fedora-coreos-*.dev.*-live-initramfs.s390x.img i figured out, that it doesn't contain coreos-installer service.

The initramfs is a concatenation of multiple CPIO archives. One of those contains the root squashfs.

Are you able to boot the live image on s390x? Does it not boot all the way to the real root?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After unpacking the initramfs you need to look for a file at /root.squashfs. That squashfs has the real root filesystem in it that contains coreos-installer. As @jlebon said, the suggestion here is to boot a live cd all the way up and then you'll find coreos-installer easily.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing to watch for if you're doing cpio -id is that it doesn't understand concatenated CPIO archives. That's why dracut has skipcpio to skip over the first microcode one. But even then, that one just seems to print everything after the first CPIO, regardless if there's just one or multiple ones left.

Copy link
Contributor Author

@nikita-dubrovskii nikita-dubrovskii Mar 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you able to boot the live image on s390x?

on zVM it's possible with live-initramfs, not live-iso

Copy link
Contributor Author

@nikita-dubrovskii nikita-dubrovskii Mar 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with unpatched ramdisk ostree-prepare-root.service fails during boot.
I'll continue investigation

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on zVM it's possible with live-initramfs, not live-iso

Gotcha. How are you booting with the live initramfs directly, via live PXE or some s390x-specific thing?

Either way, if it boot fine all the way to the real root, you should have access to coreos-installer there, right?

Copy link
Contributor Author

@nikita-dubrovskii nikita-dubrovskii Mar 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's s390x specific: on zVM kernel, ramdisk and boot.prm should be directly copied into reader queue, and then ipl'ed (booted).
Here some more details about it:
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/installation_guide/sect-installation-overview-s390

I wasn't aware about /root.squashfs exists within ramdisk, so decided to add coreos-installer. Currently CoreOS failes during boot - mount issues. I'll try fixinig it today.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so, it was my bad. the script i've wrote and used to boot CoreOS on zVM had a bug preventing ostree-prepare-root to parse cmdline. after fixing it root.squashfs mounts without issues

dustymabe pushed a commit to jbtrystram/fedora-coreos-config that referenced this pull request Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants