diff --git a/tool/run/image/disk b/tool/run/image/disk index 49ab0eef5..408483de9 100644 --- a/tool/run/image/disk +++ b/tool/run/image/disk @@ -15,6 +15,7 @@ proc image_disk_size { } { return [get_cmd_arg --image-disk-size 0] } # proc run_image { {unused ""} } { + requires_installation_of gdisk requires_installation_of parted requires_installation_of e2cp @@ -74,6 +75,10 @@ proc run_image { {unused ""} } { # create partition table entry pointing to the content catch { exec parted -a none [run_dir].img -- mkpart Fix GENODE* ext2 [expr $first_sector]s ${last_sector}s } + + # create hybrid MBR + exec echo -e "r\no\nh\n1\nn\n\ny\nn\no\nw\ny\n" | gdisk [run_dir].img + set size_image [expr [regsub {\s.*} [exec du -sk [run_dir].img] {}]] puts "Created image file [run_dir].img (${size_image}kiB)" }