Create image file with Ruby instead of dd
This commit is contained in:
parent
df426afbc8
commit
eb15f473c6
@ -7,7 +7,7 @@ class Image < Builder
|
|||||||
def run(options)
|
def run(options)
|
||||||
unless @cache.up_to_date?(@target, nil, @sources, @env)
|
unless @cache.up_to_date?(@target, nil, @sources, @env)
|
||||||
print_run_message("Image <target>#{@target}<reset>", nil)
|
print_run_message("Image <target>#{@target}<reset>", 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[mformat -i #{@target} -f 1440 ::])
|
||||||
system(*%W[mmd -i #{@target} ::/EFI])
|
system(*%W[mmd -i #{@target} ::/EFI])
|
||||||
system(*%W[mmd -i #{@target} ::/EFI/BOOT])
|
system(*%W[mmd -i #{@target} ::/EFI/BOOT])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user