diff options
author | imp <imp@FreeBSD.org> | 2014-08-14 16:17:23 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2014-08-14 16:17:23 +0000 |
commit | 85d1111448a1e8857f3aae02e22266689384c10d (patch) | |
tree | e4d5091a68be0fcb8fb069855903c5bc3f0e6d7e /tools | |
parent | c1d89db3fb3a5c6a32dfaf04bc9d70846783a86d (diff) | |
download | FreeBSD-src-85d1111448a1e8857f3aae02e22266689384c10d.zip FreeBSD-src-85d1111448a1e8857f3aae02e22266689384c10d.tar.gz |
Only install the boot loader if it actually exists. This is a stop-gap
change, since larger changes to use geom more exclusively to create
partitions is in th works.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tools/nanobsd/nanobsd.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/tools/nanobsd/nanobsd.sh b/tools/tools/nanobsd/nanobsd.sh index f199570..4f58da4 100644 --- a/tools/tools/nanobsd/nanobsd.sh +++ b/tools/tools/nanobsd/nanobsd.sh @@ -581,8 +581,14 @@ create_i386_diskimage ( ) ( fdisk ${MD} # XXX: params # XXX: pick up cached boot* files, they may not be in image anymore. - boot0cfg -B -b ${NANO_WORLDDIR}/${NANO_BOOTLOADER} ${NANO_BOOT0CFG} ${MD} - bsdlabel -w -B -b ${NANO_WORLDDIR}/boot/boot ${MD}s1 + if [ -f ${NANO_WORLDDIR}/${NANO_BOOTLOADER} ]; then + boot0cfg -B -b ${NANO_WORLDDIR}/${NANO_BOOTLOADER} ${NANO_BOOT0CFG} ${MD} + fi + if [ -f ${NANO_WORLDDIR}/boot/boot ]; then + bsdlabel -w -B -b ${NANO_WORLDDIR}/boot/boot ${MD}s1 + else + bsdlabel -w ${MD}s1 + fi bsdlabel ${MD}s1 # Create first image |