From eb15f473c694d9b7b2bf43376be21aad7b8ee01e Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Sat, 12 Mar 2022 09:59:56 -0500 Subject: [PATCH] Create image file with Ruby instead of dd --- Rsconscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rsconscript b/Rsconscript index 138ccb1..070c05e 100644 --- a/Rsconscript +++ b/Rsconscript @@ -7,7 +7,7 @@ class Image < Builder def run(options) unless @cache.up_to_date?(@target, nil, @sources, @env) print_run_message("Image #{@target}", nil) - system(*%W[dd if=/dev/zero of=#{@target} bs=1k count=1440]) + File.binwrite(@target, "\0" * (1440 * 1024)) system(*%W[mformat -i #{@target} -f 1440 ::]) system(*%W[mmd -i #{@target} ::/EFI]) system(*%W[mmd -i #{@target} ::/EFI/BOOT])