Skip to content

Commit 97b902c

Browse files
Use discoverable partition specification for rootfs UUID
Signed-off-by: Pragyan Poudyal <[email protected]>
1 parent 83227f5 commit 97b902c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/src/install/baseline.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,15 @@ fn mkfs<'a>(
104104
label: &str,
105105
wipe: bool,
106106
opts: impl IntoIterator<Item = &'a str>,
107+
dps_uuid: Option<uuid::Uuid>,
107108
) -> Result<uuid::Uuid> {
108109
let devinfo = bootc_blockdev::list_dev(dev.into())?;
109110
let size = ostree_ext::glib::format_size(devinfo.size);
110-
let u = uuid::Uuid::new_v4();
111+
let u = if let Some(u) = dps_uuid {
112+
u
113+
} else {
114+
uuid::Uuid::new_v4()
115+
};
111116
let mut t = Task::new(
112117
&format!("Creating {label} filesystem ({fs}) on device {dev} (size={size})"),
113118
format!("mkfs.{fs}"),
@@ -383,6 +388,7 @@ pub(crate) fn install_create_rootfs(
383388
"boot",
384389
opts.wipe,
385390
[],
391+
None,
386392
)
387393
.context("Initializing /boot")?,
388394
)
@@ -403,6 +409,8 @@ pub(crate) fn install_create_rootfs(
403409
"root",
404410
opts.wipe,
405411
mkfs_options.iter().copied(),
412+
// TODO: Add cli option for this
413+
Some(uuid::uuid!("6523f8ae-3eb1-4e2a-a05a-18b695ae656f")),
406414
)?;
407415
let rootarg = format!("root=UUID={root_uuid}");
408416
let bootsrc = boot_uuid.as_ref().map(|uuid| format!("UUID={uuid}"));

0 commit comments

Comments
 (0)