diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-03-06 12:48:19 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-03-06 12:48:19 +0000 |
commit | bba506c0b28d3e2e3c9b5524452df0442c5a54c0 (patch) | |
tree | 2358aa2f840c013de2cb29be80e9ba297bc708b1 /mkimage.sh | |
parent | 3c797616da7f0b236ec22b72e917294e56f0d3e5 (diff) | |
download | morph-bba506c0b28d3e2e3c9b5524452df0442c5a54c0.tar.gz |
Install mbr.bin from one of many places
Diffstat (limited to 'mkimage.sh')
-rwxr-xr-x | mkimage.sh | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -79,7 +79,16 @@ sfdisk "$img" <<EOF EOF # Install the master boot record boot loader. We use the one from extlinux. -dd if=/usr/lib/extlinux/mbr.bin of="$img" conv=notrunc +# Depending on where we run this script (Debian vs Baserock), it might +# be installed in a different place, so we try all known ones. +for x in /usr/lib/extlinux/mbr.bin /usr/share/syslinux/mbr.bin +do + if [ -e "$x" ] + then + dd if="$x" of="$img" conv=notrunc + break + fi +done # Access the partition inside the raw disk image file. part=$(dummy_kpartx_add "$img") |