diff --git a/release/amd64/mkisoimages.sh b/release/amd64/mkisoimages.sh index 2b89d89..4f5330d 100644 --- a/release/amd64/mkisoimages.sh +++ b/release/amd64/mkisoimages.sh @@ -24,8 +24,9 @@ # into base-bits-dir as part of making the image. if [ "x$1" = "x-b" ]; then + bootable=true # This is highly x86-centric and will be used directly below. - bootable="-o bootimage=i386;$4/boot/cdboot -o no-emul-boot" + bootopts="-o bootimage=i386;$4/boot/cdboot -o no-emul-boot" # Make EFI system partition (should be done with makefs in the future) dd if=/dev/zero of=efiboot.img bs=4k count=100 @@ -38,11 +39,12 @@ if [ "x$1" = "x-b" ]; then umount efi rmdir efi mdconfig -d -u $device - bootable="-o bootimage=i386;efiboot.img -o no-emul-boot $bootable" + bootopts="-o bootimage=i386;efiboot.img -o no-emul-boot $bootopts" shift else - bootable="" + bootable=false + bootopts="" fi if [ $# -lt 3 ]; then @@ -54,7 +56,7 @@ LABEL=`echo $1 | tr '[:lower:]' '[:upper:]'`; shift NAME=$1; shift publisher="The FreeBSD Project. http://www.FreeBSD.org/" -echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab -makefs -t cd9660 $bootable -o rockridge -o label=$LABEL -o publisher="$publisher" $NAME $* -rm $1/etc/fstab +$bootable && echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab +makefs -t cd9660 $bootopts -o rockridge -o label=$LABEL -o publisher="$publisher" $NAME $* +$bootable && rm $1/etc/fstab rm -f efiboot.img diff --git a/release/i386/mkisoimages.sh b/release/i386/mkisoimages.sh index e4093d7..7695afe 100644 --- a/release/i386/mkisoimages.sh +++ b/release/i386/mkisoimages.sh @@ -24,11 +24,13 @@ # into base-bits-dir as part of making the image. if [ "x$1" = "x-b" ]; then + bootable=true # This is highly x86-centric and will be used directly below. - bootable="-o bootimage=i386;$4/boot/cdboot -o no-emul-boot" + bootopts="-o bootimage=i386;$4/boot/cdboot -o no-emul-boot" shift else - bootable="" + bootable=false + bootopts="" fi if [ $# -lt 3 ]; then @@ -40,6 +42,6 @@ LABEL=`echo $1 | tr '[:lower:]' '[:upper:]'`; shift NAME=$1; shift publisher="The FreeBSD Project. http://www.FreeBSD.org/" -echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab -makefs -t cd9660 $bootable -o rockridge -o label=$LABEL -o publisher="$publisher" $NAME $* -rm $1/etc/fstab +$bootable && echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab +makefs -t cd9660 $bootopts -o rockridge -o label=$LABEL -o publisher="$publisher" $NAME $* +$bootable && rm $1/etc/fstab diff --git a/release/pc98/mkisoimages.sh b/release/pc98/mkisoimages.sh index 5a19b4d..49cead3 100644 --- a/release/pc98/mkisoimages.sh +++ b/release/pc98/mkisoimages.sh @@ -24,11 +24,13 @@ # into base-bits-dir as part of making the image. if [ "x$1" = "x-b" ]; then + bootable=true # This is highly x86-centric and will be used directly below. - bootable="-o generic-bootimage=$4/boot/cdboot" + bootopts="-o generic-bootimage=$4/boot/cdboot" shift else - bootable="" + bootable=false + bootopts="" fi if [ $# -lt 3 ]; then @@ -40,6 +42,6 @@ LABEL=`echo $1 | tr '[:lower:]' '[:upper:]'`; shift NAME=$1; shift publisher="The FreeBSD Project. http://www.FreeBSD.org/" -echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab -makefs -t cd9660 $bootable -o rockridge -o label=$LABEL -o publisher="$publisher" $NAME $* -rm $1/etc/fstab +$bootable && echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab +makefs -t cd9660 $bootopts -o rockridge -o label=$LABEL -o publisher="$publisher" $NAME $* +$bootable && rm $1/etc/fstab diff --git a/release/powerpc/mkisoimages.sh b/release/powerpc/mkisoimages.sh index b38d5ef..a56be45 100644 --- a/release/powerpc/mkisoimages.sh +++ b/release/powerpc/mkisoimages.sh @@ -24,6 +24,7 @@ # into base-bits-dir as part of making the image. if [ "x$1" = "x-b" ]; then + bootable=true # Apple boot code uudecode -o /tmp/hfs-boot-block.bz2 `dirname $0`/hfs-boot.bz2.uu bzip2 -d /tmp/hfs-boot-block.bz2 @@ -31,7 +32,7 @@ if [ "x$1" = "x-b" ]; then OFFSET=0x$(echo 0x$OFFSET | awk '{printf("%x\n",$1/512);}') dd if=$4/boot/loader of=/tmp/hfs-boot-block seek=$OFFSET conv=notrunc - bootable="-o bootimage=macppc;/tmp/hfs-boot-block -o no-emul-boot" + bootopts="-o bootimage=macppc;/tmp/hfs-boot-block -o no-emul-boot" # pSeries/PAPR boot code mkdir -p $4/ppc/chrp @@ -43,14 +44,15 @@ if [ "x$1" = "x-b" ]; then boot &device;:,\ppc\chrp\loader EOF - bootable="$bootable -o chrp-boot" + bootopts="$bootopts -o chrp-boot" # Playstation 3 boot code echo "FreeBSD Install='/boot/loader.ps3'" > $4/etc/kboot.conf shift else - bootable="" + bootable=false + bootopts="" fi if [ $# -lt 3 ]; then @@ -62,8 +64,8 @@ LABEL=`echo $1 | tr '[:lower:]' '[:upper:]'`; shift NAME=$1; shift publisher="The FreeBSD Project. http://www.FreeBSD.org/" -echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab -makefs -t cd9660 $bootable -o rockridge -o label=$LABEL -o publisher="$publisher" $NAME $* -rm $1/etc/fstab +$bootable && echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab +makefs -t cd9660 $bootopts -o rockridge -o label=$LABEL -o publisher="$publisher" $NAME $* +$bootable && rm $1/etc/fstab rm /tmp/hfs-boot-block rm -rf $1/ppc diff --git a/release/sparc64/mkisoimages.sh b/release/sparc64/mkisoimages.sh index 9c60cb2..d766f83 100644 --- a/release/sparc64/mkisoimages.sh +++ b/release/sparc64/mkisoimages.sh @@ -28,7 +28,7 @@ if [ $# -lt 3 ]; then fi case $1 in --b) BOPT=$1; shift ;; +-b) BOPT=$1; bootable=true; shift ;; esac LABEL=`echo $1 | tr '[:lower:]' '[:upper:]'`; shift NAME=$1; shift @@ -36,9 +36,9 @@ BASEBITSDIR=$1 # Create an ISO image publisher="The FreeBSD Project. http://www.FreeBSD.org/" -echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > "${BASEBITSDIR}/etc/fstab" +$bootable && echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > "${BASEBITSDIR}/etc/fstab" makefs -t cd9660 -o rockridge -o label="$LABEL" -o publisher="$publisher" ${NAME}.tmp $* -rm "${BASEBITSDIR}/etc/fstab" +$bootable && rm "${BASEBITSDIR}/etc/fstab" if [ "x$BOPT" != "x-b" ]; then mv ${NAME}.tmp ${NAME}