diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-02-20 14:33:29 +0100 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-02-20 14:33:29 +0100 |
commit | eb0d45c9a7407a787a9cfcf542952ae9636027e8 (patch) | |
tree | 291f52ae5c9bca62c934871ee107025783ed37d8 | |
parent | d85f321c261f8f6174c17b2ec20639dd0072feae (diff) |
debug messages: vmlinuz -> kernel.img
-rw-r--r-- | src/main.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 8e522f7..691952b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -240,7 +240,7 @@ fn write_mbr(file: &mut File, kernel_buf: &[u8], cmdline_buf: &[u8]) -> anyhow:: let kernel_offset: u32 = (buf .windows(kernel_buf.len()) .position(|window| window == kernel_buf) - .expect("can't find kernel (/vmlinuz) on boot partition") + .expect("can't find kernel (/kernel.img) on boot partition") / 512 + 1) .try_into()?; @@ -270,7 +270,10 @@ fn write_mbr(file: &mut File, kernel_buf: &[u8], cmdline_buf: &[u8]) -> anyhow:: println!("MBR written successfully"); println!("MBR summary:"); - println!(" LBA: vmlinuz={}, cmdline.txt={}", kernel_lba, cmdline_lba); + println!( + " LBA: kernel.img={}, cmdline.txt={}", + kernel_lba, cmdline_lba + ); Ok(()) } |