When NANO_IMAGE_MBRONLY is set, and we're backing via swap, only copy
the MBR. PR: 136889 Submitted by: Aragon Gouveia
This commit is contained in:
parent
54d2d0eb5d
commit
0bf5403204
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=263188
@ -136,6 +136,9 @@ NANO_BOOT2CFG="-h"
|
||||
# Can be "file" or "swap"
|
||||
NANO_MD_BACKING="file"
|
||||
|
||||
# for swap type md(4) backing, write out the mbr only
|
||||
NANO_IMAGE_MBRONLY=true
|
||||
|
||||
# Progress Print level
|
||||
PPLEVEL=3
|
||||
|
||||
@ -573,6 +576,14 @@ create_i386_diskimage ( ) (
|
||||
fi
|
||||
|
||||
if [ "${NANO_MD_BACKING}" = "swap" ] ; then
|
||||
if [ ${NANO_IMAGE_MBRONLY} ]; then
|
||||
echo "Writing out _.disk.mbr..."
|
||||
dd if=/dev/${MD} of=${NANO_DISKIMGDIR}/_.disk.mbr bs=512 count=1
|
||||
else
|
||||
echo "Writing out ${NANO_IMGNAME}..."
|
||||
dd if=/dev/${MD} of=${IMG} bs=64k
|
||||
fi
|
||||
|
||||
echo "Writing out ${NANO_IMGNAME}..."
|
||||
dd conv=sparse if=/dev/${MD} of=${IMG} bs=64k
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user