Adding support for ntfs as binary filesystem when using syslinux.
This commit is contained in:
parent
44fd76f5a0
commit
2d94f79d0a
|
@ -1281,10 +1281,10 @@ Check_defaults ()
|
|||
then
|
||||
# syslinux + fat
|
||||
case "${LB_BINARY_FILESYSTEM}" in
|
||||
fat*)
|
||||
fat*|ntfs)
|
||||
;;
|
||||
*)
|
||||
Echo_warning "You have selected values of LB_BOOTLOADER and LB_BINARY_FILESYSTEM which are incompatible - syslinux only supports FAT filesystems."
|
||||
Echo_warning "You have selected values of LB_BOOTLOADER and LB_BINARY_FILESYSTEM which are incompatible - syslinux only supports FAT and NTFS filesystems."
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
|
|
@ -767,7 +767,7 @@ EOF
|
|||
case "${LB_BINARY_IMAGES}" in
|
||||
hdd)
|
||||
case "${LB_BINARY_FILESYSTEM}" in
|
||||
fat*)
|
||||
fat*|ntfs)
|
||||
# Creating dist directories
|
||||
for DISTRIBUTION in ${DISTRIBUTIONS}
|
||||
do
|
||||
|
|
|
@ -44,7 +44,24 @@ Check_lockfile .lock
|
|||
Create_lockfile .lock
|
||||
|
||||
# Checking depends
|
||||
Check_package chroot/sbin/mkdosfs dosfstools
|
||||
case "${LB_BINARY_FILESYSTEM}" in
|
||||
fat*)
|
||||
Check_package chroot/sbin/mkdosfs dosfstools
|
||||
;;
|
||||
|
||||
ntfs)
|
||||
case "${LB_DISTRIBUTION}" in
|
||||
squeeze)
|
||||
Check_package chroot/sbin/mkfs.ntfs ntfsprogs
|
||||
;;
|
||||
|
||||
*)
|
||||
Check_package chroot/sbin/mkfs.nfts ntfs-3g
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
Check_package chroot/usr/share/doc/mtools mtools
|
||||
Check_package chroot/sbin/parted parted
|
||||
|
||||
|
@ -102,6 +119,15 @@ then
|
|||
export LB_BINARY_FILESYSTEM
|
||||
fi
|
||||
|
||||
# Enforce ntfs if we find individual files bigger than 4GB
|
||||
if [ "${LB_BINARY_FILESYSTEM}" = "fat32" ] && [ -n "$(find binary -size +3999M)" ]
|
||||
then
|
||||
Echo_warning "FAT32 doesn't support files larger than 4GB, automatically enforcing NTFS."
|
||||
|
||||
LB_BINARY_FILESYSTEM="ntfs"
|
||||
export LB_BINARY_FILESYSTEM
|
||||
fi
|
||||
|
||||
# Everything which comes here needs to be cleaned up,
|
||||
DU_DIM="$(du -ms binary | cut -f1)"
|
||||
REAL_DIM="$(Calculate_partition_size ${DU_DIM} ${LB_BINARY_FILESYSTEM})"
|
||||
|
@ -136,6 +162,10 @@ case "${LB_BINARY_FILESYSTEM}" in
|
|||
PARTITION_TYPE="${LB_BINARY_FILESYSTEM}"
|
||||
;;
|
||||
|
||||
ntfs)
|
||||
PARTITION_TYPE="NTFS"
|
||||
;;
|
||||
|
||||
*)
|
||||
Echo_error "Unsupported binary filesystem %s" "${LB_BINARY_FILESYSTEM}"
|
||||
exit 1
|
||||
|
@ -184,6 +214,11 @@ case "${LB_BINARY_FILESYSTEM}" in
|
|||
MKFS="vfat"
|
||||
MKFS_OPTIONS="-F 32 -n ${LB_HDD_LABEL}"
|
||||
;;
|
||||
|
||||
ntfs)
|
||||
MKFS="ntfs"
|
||||
MKFS_OPTIONS="-L ${LB_HDD_LABEL}"
|
||||
;;
|
||||
esac
|
||||
|
||||
case "${LB_BUILD_WITH_CHROOT}" in
|
||||
|
|
|
@ -41,7 +41,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
|
|||
\t [--apt-source-archives true|false]\n\
|
||||
\t [-a|--architectures ARCHITECTURE]\n\
|
||||
\t [-b|--binary-images iso|iso-hybrid|netboot|tar|hdd]\n\
|
||||
\t [--binary-filesystem fat16|fat32|ext2|ext3|ext4]\n\
|
||||
\t [--binary-filesystem fat16|fat32|ext2|ext3|ext4|ntfs]\n\
|
||||
\t [--bootappend-install PARAMETER|\"PARAMETERS\"]\n\
|
||||
\t [--bootappend-live PARAMETER|\"PARAMETERS\"]\n\
|
||||
\t [--bootappend-failsafe PARAMETER|\"PARAMETERS\"]\n\
|
||||
|
|
|
@ -55,13 +55,30 @@ Chroot chroot "dpkg --get-selections" | awk '{ print $1 }' > source-selection.tx
|
|||
cat >> source-selection.txt << EOF
|
||||
${LB_BOOTLOADER}
|
||||
live-build
|
||||
dosfstools
|
||||
genisoimage
|
||||
parted
|
||||
squashfs-tools
|
||||
mtd-tools
|
||||
EOF
|
||||
|
||||
case "${LB_BINARY_FILESYSTEM}" in
|
||||
fat*)
|
||||
echo "dosfstools" >> source-selection.txt
|
||||
;;
|
||||
|
||||
ntfs)
|
||||
case "${LB_DISTRIBUTION}" in
|
||||
squeeze)
|
||||
echo "ntfsprogs" >> source-selection.txt
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "ntfs-3g" >> source-selection.txt
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
case "${LB_ARCHITECTURES}" in
|
||||
amd64|i386)
|
||||
|
||||
|
|
|
@ -83,6 +83,10 @@ case "${LB_BINARY_FILESYSTEM}" in
|
|||
PARTITION_TYPE="${LB_BINARY_FILESYSTEM}"
|
||||
;;
|
||||
|
||||
ntfs)
|
||||
PARTITION_TYPE="NTFS"
|
||||
;;
|
||||
|
||||
*)
|
||||
Echo_error "Unsupported binary filesystem %s" "${LB_BINARY_FILESYSTEM}"
|
||||
exit 1
|
||||
|
@ -112,6 +116,11 @@ case "${LB_BINARY_FILESYSTEM}" in
|
|||
MKFS="vfat"
|
||||
MKFS_OPTIONS="-F 32 -n ${LB_HDD_LABEL}"
|
||||
;;
|
||||
|
||||
ntfs)
|
||||
MKFS="ntfs"
|
||||
MKFS_OPTIONS="-L ${LB_HDD_LABEL}"
|
||||
;;
|
||||
esac
|
||||
|
||||
Chroot chroot "mkfs.${MKFS} ${MKFS_OPTIONS} ${FREELO}"
|
||||
|
|
Loading…
Reference in New Issue