-
Notifications
You must be signed in to change notification settings - Fork 92
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
install: Use zipl to install bootloader on s390x #665
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -573,15 +573,9 @@ async fn initialize_ostree_root_from_self( | |
crate::lsm::ensure_dir_labeled(rootfs_dir, "boot", None, 0o755.into(), sepolicy)?; | ||
} | ||
|
||
// Default to avoiding grub2-mkconfig etc., but we need to use zipl on s390x. | ||
// TODO: Lower this logic into ostree proper. | ||
let bootloader = if cfg!(target_arch = "s390x") { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this means we're now relying on ostreedev/ostree@e3d93a8 which should be fine. |
||
"zipl" | ||
} else { | ||
"none" | ||
}; | ||
for (k, v) in [ | ||
("sysroot.bootloader", bootloader), | ||
// Default to avoiding grub2-mkconfig etc. | ||
("sysroot.bootloader", "none"), | ||
// Always flip this one on because we need to support alongside installs | ||
// to systems without a separate boot partition. | ||
("sysroot.bootprefix", "true"), | ||
|
@@ -1239,12 +1233,17 @@ async fn install_to_filesystem_impl(state: &State, rootfs: &mut RootSetup) -> Re | |
}) | ||
.context("Writing aleph version")?; | ||
} | ||
if cfg!(target_arch = "s390x") { | ||
// TODO: Integrate s390x support into install_via_bootupd | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah...that would definitely be better in the longer term I think, but this is totally fine to do here for now. See also coreos/bootupd#432 |
||
crate::bootloader::install_via_zipl(&rootfs.device_info, boot_uuid)?; | ||
} else { | ||
crate::bootloader::install_via_bootupd( | ||
&rootfs.device_info, | ||
&rootfs.rootfs, | ||
&state.config_opts, | ||
)?; | ||
} | ||
|
||
crate::bootloader::install_via_bootupd( | ||
&rootfs.device_info, | ||
&rootfs.rootfs, | ||
&state.config_opts, | ||
)?; | ||
tracing::debug!("Installed bootloader"); | ||
|
||
// Finalize mounted filesystems | ||
|
@@ -1688,7 +1687,9 @@ fn test_gather_root_args() { | |
// A basic filesystem using a UUID | ||
let inspect = Filesystem { | ||
source: "/dev/vda4".into(), | ||
target: "/".into(), | ||
fstype: "xfs".into(), | ||
maj_min: "252:4".into(), | ||
options: "rw".into(), | ||
uuid: Some("965eb3c7-5a3f-470d-aaa2-1bcf04334bc6".into()), | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just looking at this a bit more closely...I think this is fine for now, but what I think we should do instead as a followup is just pass a
Dir
(file descriptor) for theboot
as we mounted it. Then we can probably usefindmnt -J .
on it or so.