Adding binary filesystem option, currently only supporting fat16 and fat32.

This commit is contained in:
Daniel Baumann 2007-11-16 23:01:03 +01:00
parent 702de9d2ed
commit ec0d5cd48b
3 changed files with 28 additions and 5 deletions

View File

@ -474,6 +474,9 @@ Set_defaults ()
## config/binary ## config/binary
# Setting image filesystem
LH_BINARY_FILESYSTEM="${LH_BINARY_FILESYSTEM:-fat16}"
# Setting image type # Setting image type
LH_BINARY_IMAGES="${LH_BINARY_IMAGES:-iso}" LH_BINARY_IMAGES="${LH_BINARY_IMAGES:-iso}"

View File

@ -99,7 +99,7 @@ Losetup $FREELO chroot/binary.img 0
case "${LH_CHROOT_BUILD}" in case "${LH_CHROOT_BUILD}" in
enabled) enabled)
Chroot "parted -s ${FREELO} mklabel msdos" || true Chroot "parted -s ${FREELO} mklabel msdos" || true
Chroot "parted -s ${FREELO} mkpart primary 0.0 100%" || true Chroot "parted -s ${FREELO} mkpart ${LH_BINARY_FILESYSTEM} primary 0.0 100%" || true
Chroot "parted -s ${FREELO} set 1 boot on" || true Chroot "parted -s ${FREELO} set 1 boot on" || true
Chroot "parted -s ${FREELO} set 1 lba off" || true Chroot "parted -s ${FREELO} set 1 lba off" || true
@ -111,7 +111,7 @@ case "${LH_CHROOT_BUILD}" in
disabled) disabled)
parted -s ${FREELO} mklabel msdos || true parted -s ${FREELO} mklabel msdos || true
parted -s ${FREELO} mkpart primary 0.0 100% || true parted -s ${FREELO} mkpart ${LH_BINARY_FILESYSTEM} primary 0.0 100% || true
parted -s ${FREELO} set 1 boot on || true parted -s ${FREELO} set 1 boot on || true
parted -s ${FREELO} set 1 lba off || true parted -s ${FREELO} set 1 lba off || true
@ -127,13 +127,23 @@ ${LH_LOSETUP} -d ${FREELO}
FREELO="$(${LH_LOSETUP} -f)" FREELO="$(${LH_LOSETUP} -f)"
Losetup $FREELO chroot/binary.img 1 Losetup $FREELO chroot/binary.img 1
case "${LH_BINARY_FILESYSTEM}" in
fat16)
MKFS_OPTIONS="-F 16"
;;
fat32)
MKFS_OPTIONS="-F 32"
;;
esac
case "${LH_CHROOT_BUILD}" in case "${LH_CHROOT_BUILD}" in
enabled) enabled)
Chroot "mkfs.vfat -F 16 -n DEBIAN_LIVE ${FREELO}" Chroot "mkfs.vfat ${MKFS_OPTIONS} -n DEBIAN_LIVE ${FREELO}"
;; ;;
disabled) disabled)
mkfs.vfat -F 16 -n DEBIAN_LIVE ${FREELO} mkfs.vfat ${MKFS_OPTIONS} -n DEBIAN_LIVE ${FREELO}
;; ;;
esac esac

View File

@ -29,6 +29,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
\t [--apt-secure enabled|disabled]\n\ \t [--apt-secure enabled|disabled]\n\
\t [-a|--architecture ARCHITECTURE]\n\ \t [-a|--architecture ARCHITECTURE]\n\
\t [-b|--binary-images iso|net|tar|usb-hdd]\n\ \t [-b|--binary-images iso|net|tar|usb-hdd]\n\
\t [--binary-filesystem fat16|fat32]\n\
\t [--binary-indices enabled|disabled]\n\ \t [--binary-indices enabled|disabled]\n\
\t [--bootappend-install PARAMETER|\"PARAMETERS\"]\n\ \t [--bootappend-install PARAMETER|\"PARAMETERS\"]\n\
\t [--bootappend-live PARAMETER|\"PARAMETERS\"]\n\ \t [--bootappend-live PARAMETER|\"PARAMETERS\"]\n\
@ -110,7 +111,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
Local_arguments () Local_arguments ()
{ {
ARGUMENTS="$(getopt --longoptions apt:,apt-ftp-proxy:,apt-http-proxy:,apt-pdiffs:,apt-pipeline:,apt-recommends:,apt-secure:,bootstrap:,cache:,cache-indices:,cache-packages:,cache-stages:,debconf-frontend:,debconf-nowarnings:,debconf-priority:,genisoimage:,initramfs:,fdisk:,losetup:,mode:,root-command:,use-fakeroot:,tasksel:,includes:,templates:,architecture:,bootstrap-config:,bootstrap-flavour:,bootstrap-keyring:,distribution:,mirror-bootstrap:,mirror-bootstrap-security:,mirror-binary:,mirror-binary-security:,sections:,chroot-filesystem:,union-filesystem:,exposed-root:,hooks:,interactive:,keyring-packages:,language:,linux-flavours:,linux-packages:,packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,binary-images:,binary-indices:,bootappend-install:,bootappend-live:,bootloader:,checksums:,chroot-build:,debian-installer:,debian-installer-daily:,encryption:,grub-splash:,hostname:,iso-application:,iso-preparer:,iso-publisher:,iso-volume:,memtest:,net-root-filesystem:,net-root-mountoptions:,net-root-path:,net-root-server:,net-cow-filesystem:,net-cow-mountoptions:,net-cow-path:,net-cow-server:,syslinux-splash:,syslinux-timeout:,syslinux-menu:,username:,source:,source-images:,breakpoints,conffile:,debug,force,help,quiet,usage,verbose,version --name=${PROGRAM} --options a:f:d:m:l:k:p:b:e:s:c:huv --shell sh -- "${@}")" ARGUMENTS="$(getopt --longoptions apt:,apt-ftp-proxy:,apt-http-proxy:,apt-pdiffs:,apt-pipeline:,apt-recommends:,apt-secure:,bootstrap:,cache:,cache-indices:,cache-packages:,cache-stages:,debconf-frontend:,debconf-nowarnings:,debconf-priority:,genisoimage:,initramfs:,fdisk:,losetup:,mode:,root-command:,use-fakeroot:,tasksel:,includes:,templates:,architecture:,bootstrap-config:,bootstrap-flavour:,bootstrap-keyring:,distribution:,mirror-bootstrap:,mirror-bootstrap-security:,mirror-binary:,mirror-binary-security:,sections:,chroot-filesystem:,union-filesystem:,exposed-root:,hooks:,interactive:,keyring-packages:,language:,linux-flavours:,linux-packages:,packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,binary-filesystem:,binary-images:,binary-indices:,bootappend-install:,bootappend-live:,bootloader:,checksums:,chroot-build:,debian-installer:,debian-installer-daily:,encryption:,grub-splash:,hostname:,iso-application:,iso-preparer:,iso-publisher:,iso-volume:,memtest:,net-root-filesystem:,net-root-mountoptions:,net-root-path:,net-root-server:,net-cow-filesystem:,net-cow-mountoptions:,net-cow-path:,net-cow-server:,syslinux-splash:,syslinux-timeout:,syslinux-menu:,username:,source:,source-images:,breakpoints,conffile:,debug,force,help,quiet,usage,verbose,version --name=${PROGRAM} --options a:f:d:m:l:k:p:b:e:s:c:huv --shell sh -- "${@}")"
if [ "${?}" != "0" ] if [ "${?}" != "0" ]
then then
@ -402,6 +403,11 @@ Local_arguments ()
;; ;;
# config/binary # config/binary
--binary-filesystem)
LH_BINARY_FILESYSTEM="${2}"
shift 2
;;
-b|--binary-images) -b|--binary-images)
LH_BINARY_IMAGES="${2}" LH_BINARY_IMAGES="${2}"
shift 2 shift 2
@ -905,6 +911,10 @@ mkdir -p config/binary_syslinux
cat > config/binary << EOF cat > config/binary << EOF
# config/binary - options for live-helper(7), binary stage # config/binary - options for live-helper(7), binary stage
# \$LH_BINARY_FILESYSTEM: set image filesystem
# (Default: ${LH_BINARY_FILESYSTEM})
LH_BINARY_FILESYSTEM="${LH_BINARY_FILESYSTEM}"
# \$LH_BINARY_IMAGES: set image type # \$LH_BINARY_IMAGES: set image type
# (Default: ${LH_BINARY_IMAGES}) # (Default: ${LH_BINARY_IMAGES})
LH_BINARY_IMAGES="${LH_BINARY_IMAGES}" LH_BINARY_IMAGES="${LH_BINARY_IMAGES}"