aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimbeerserverDE <himbeerserverde@gmail.com>2023-04-11 20:59:23 +0200
committerHimbeerserverDE <himbeerserverde@gmail.com>2023-04-11 20:59:23 +0200
commit8742ad4f0d69a6dc83f3824b69058b1db6fac49b (patch)
treed83ca68751802a41aec7dcdb920f402ea07b0723
parentf6691abc4e97fc59a113e5df0f553c953fd5a6e4 (diff)
rename kernel file back to vmlinuz
-rw-r--r--src/main.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/main.rs b/src/main.rs
index 32ecd5d..8e0930f 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -150,7 +150,7 @@ fn partition(
write_mbr(
file,
&mut boot_partition,
- &buf["kernel.img"],
+ &buf["vmlinuz"],
&buf["cmdline.txt"],
)?;
@@ -212,7 +212,7 @@ fn write_boot(
let mut copy = BTreeMap::new();
- copy.insert("kernel.img", format!("vmlinuz-{}", arch));
+ copy.insert("vmlinuz", format!("vmlinuz-{}", arch));
copy.insert("cmdline.txt", String::from("cmdline.txt"));
copy.insert("config.txt", String::from("config.txt"));
@@ -278,7 +278,7 @@ fn write_mbr(
let kernel_offset: u32 = (buf
.windows(kernel_buf.len())
.position(|window| window == kernel_buf)
- .expect("can't find kernel (/kernel.img) on boot partition")
+ .expect("can't find kernel (/vmlinuz) on boot partition")
/ 512
+ 1)
.try_into()?;
@@ -308,10 +308,7 @@ fn write_mbr(
println!("MBR written successfully");
println!("MBR summary:");
- println!(
- " LBA: kernel.img={}, cmdline.txt={}",
- kernel_lba, cmdline_lba
- );
+ println!(" LBA: vmlinuz={}, cmdline.txt={}", kernel_lba, cmdline_lba);
Ok(())
}