mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-23 12:51:06 +01:00
nanobsd: Remove dependency on bsdlabel
The bsdlabel utility is deprecated, gpart should be used instead: - Offset the first 16 sectors, just like bsdlabel did (used for metadata) - Use a freebsd-ufs partition type (regardless bsdlabel creating a '!0') Reviewed by: emaste, imp Approved by: emaste (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D47653
This commit is contained in:
parent
accf71534c
commit
87e87fecb1
@ -116,14 +116,15 @@ create_code_slice ( ) (
|
||||
|
||||
trap "echo 'Running exit trap code' ; df -i ${MNT} ; umount ${MNT} || true ; mdconfig -d -u $MD" 1 2 15 EXIT
|
||||
|
||||
bsdlabel -w ${MD}
|
||||
gpart create -s bsd "${MD}"
|
||||
gpart add -t freebsd-ufs -b 16 "${MD}"
|
||||
if [ -f ${NANO_WORLDDIR}/boot/boot ]; then
|
||||
echo "Making bootable partition"
|
||||
gpart bootcode -b ${NANO_WORLDDIR}/boot/boot ${MD}
|
||||
else
|
||||
echo "Partition will not be bootable"
|
||||
fi
|
||||
bsdlabel ${MD}
|
||||
gpart list ${MD}
|
||||
|
||||
# Create first image
|
||||
populate_slice /dev/${MD}${NANO_PARTITION_ROOT} ${NANO_WORLDDIR} ${MNT} "${NANO_ROOT}"
|
||||
|
Loading…
Reference in New Issue
Block a user