Change uki image location to EFI/boot

This commit is contained in:
2026-10-05 16:57:42 +02:00
parent 2fedcd0805
commit 25a706d6ea
3 changed files with 33 additions and 35 deletions
Generated
+21 -21
View File
@@ -60,9 +60,9 @@ checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06"
[[package]]
name = "cfg-if"
version = "1.0.4"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
[[package]]
name = "cfg_aliases"
@@ -72,9 +72,9 @@ checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527"
[[package]]
name = "clap"
version = "4.6.6"
version = "4.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "473c7e07f409a8d772161724aa8db6a765a2532a70f9667eeb7b49d3d02fbdca"
checksum = "aa8876b300ab35ba921adea3dfd70157a46249b33f95c9084ae5709785478946"
dependencies = [
"clap_builder",
"clap_derive",
@@ -82,9 +82,9 @@ dependencies = [
[[package]]
name = "clap_builder"
version = "4.6.6"
version = "4.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b48fea5a88e9ae728a2dcbedbfc0e730f7d60da42e1cb049a83c9fb8b789889"
checksum = "ec0797fb7aeb1406c84efac526901f7ec3ead2124f946b494e72879d4b54704d"
dependencies = [
"anstream",
"anstyle",
@@ -94,9 +94,9 @@ dependencies = [
[[package]]
name = "clap_derive"
version = "4.6.4"
version = "4.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d012d2b9d65aca7f18f4d9878a045bc17899bba951561ba5ec3c2ba1eed9a061"
checksum = "f9c751b79415d4e559e3d1fcf128e09e720eb673a06d26cf6f392d37d75b66e0"
dependencies = [
"heck",
"proc-macro2",
@@ -106,9 +106,9 @@ dependencies = [
[[package]]
name = "clap_lex"
version = "1.1.0"
version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9"
checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486"
[[package]]
name = "colorchoice"
@@ -146,7 +146,7 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "hive-up"
version = "0.2.1"
version = "0.2.2"
dependencies = [
"clap",
"nix",
@@ -175,9 +175,9 @@ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
[[package]]
name = "libc"
version = "0.2.189"
version = "0.2.190"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78"
[[package]]
name = "nix"
@@ -262,9 +262,9 @@ dependencies = [
[[package]]
name = "signal-hook"
version = "0.4.4"
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2a0c28ca5908dbdbcd52e6fdaa00358ab88637f8ab33e1f188dd510eb44b53d"
checksum = "b29ffa27d3d59a049bb328258de100f8012848d1b08d444e08bbc02ac468435e"
dependencies = [
"libc",
"signal-hook-registry",
@@ -288,9 +288,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "syn"
version = "3.0.5"
version = "3.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12df2e0110f65b775f769bb17ef989067a1d931b2eb822bd4346631eeada89f9"
checksum = "8593e8e72159ed2257d083c7a454a85cbf854f37a0966d8d483aff8c8a3ebcee"
dependencies = [
"proc-macro2",
"quote",
@@ -299,9 +299,9 @@ dependencies = [
[[package]]
name = "time-format"
version = "1.2.3"
version = "1.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb54c799611991d3d4a66fee3ff17b9f600c2a0f8c0d34e8209dbd153ff0a87b"
checksum = "c21b401b09485cb2403a336b3c6f9d53bd8a7273463f71b71d4f6325f7f74f6c"
[[package]]
name = "toml"
@@ -344,9 +344,9 @@ checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2"
[[package]]
name = "unicode-ident"
version = "1.0.24"
version = "1.0.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954"
[[package]]
name = "utf8parse"
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "hive-up"
version = "0.2.1"
version = "0.2.2"
edition = "2024"
[dependencies]
+9 -11
View File
@@ -25,18 +25,18 @@ use time_format;
const SNAPS_DIR: &str = "/bzz-snaps";
const EFI_BOOT_MOUNT_POINT: &str = "/beefi";
const UKI_IMAGE_NAME: &str = "/beefi/EFI/linux-kira-lts.efi";
const UKI_IMAGE_BACK_NAME: &str = "/beefi/EFI/linux-kira-lts-back.efi";
const EFI_BOOT_DIR: &str = "/beefi/EFI/boot";
const UKI_IMAGE_NAME: &str = "/beefi/EFI/boot/linux-kira-lts.efi";
const UKI_IMAGE_BACK_NAME: &str = "/beefi/EFI/boot/linux-kira-lts-back.efi";
const EFI_PARTLABEL: &str = "bee-efi";
const BOOT_MENU_LABEL: &str = "Kira OS";
const BOOT_MENU_LABEL_BACK: &str = "Kira OS Fallback";
const BOOT_UKI_IMAGE_NAME: &str = "\\EFI\\linux-kira-lts.efi";
const BOOT_UKI_IMAGE_NAME_BACK: &str = "\\EFI\\linux-kira-lts-back.efi";
const BOOT_UKI_IMAGE_NAME: &str = "\\EFI\\boot\\linux-kira-lts.efi";
const BOOT_UKI_IMAGE_NAME_BACK: &str = "\\EFI\\boot\\linux-kira-lts-back.efi";
const PAC_LOCK_FILE: &str = "/var/lib/hive-up/pac-lock";
#[derive(Debug)]
pub struct CommandFailed {
pub stderr: Vec<u8>,
@@ -187,7 +187,6 @@ pub fn exec_command_out(cmd: &str, args: &Vec<&str>) -> Result<String, ExecComma
// exec_command("pacman", &vec!["-Su", "--noconfirm", "--noprogressbar"])
// }
///
/// creates read only snapshoy of "subvolume" and places it into "target"]
/// bcachefs subvolume snapshot -r /subvolume /target
@@ -195,7 +194,6 @@ pub fn exec_command_out(cmd: &str, args: &Vec<&str>) -> Result<String, ExecComma
/// returns snapshot time on sucess
///
pub fn snapshot(subvolume: &str, target: &str) -> Result<(), ExecCommandError> {
exec_command(
"bcachefs",
&vec!["subvolume", "snapshot", "-r", subvolume, target],
@@ -254,8 +252,7 @@ pub fn pac_finish() -> Result<(), ExecCommandError> {
if pack_lock_path.exists() {
println!("Remowing pac-lock...");
fs::remove_file(pack_lock_path)?;
}
else {
} else {
println!("Warning! Pac Lock file does not exist - something is wrong...");
}
Ok(())
@@ -526,8 +523,9 @@ pub fn init_efi_boot_partition_content() -> Result<(), ExecCommandError> {
let efi_dir = format!("{}/EFI", EFI_BOOT_MOUNT_POINT);
println!("Romoving efi dir {}", efi_dir);
fs::remove_dir_all(&efi_dir)?;
println!("Creating efi dir {}", efi_dir);
fs::create_dir(efi_dir)?;
println!("Creating efi dir {}", EFI_BOOT_DIR);
fs::create_dir_all(EFI_BOOT_DIR)?;
println!("Copy {} to {}", kernel_img_path, UKI_IMAGE_NAME);
fs::copy(&kernel_img_path, UKI_IMAGE_NAME)?;
println!("Copy {} to {}", kernel_img_path, UKI_IMAGE_BACK_NAME);