--- grub-mkrescue.in?revision=1.5-orig 2008-01-24 01:01:13.000000000 +0100 +++ grub-mkrescue.in?revision=1.5 2008-01-24 01:08:35.000000000 +0100 @@ -46,6 +46,7 @@ --pkglibdir=DIR use images from directory DIR instead of ${pkglibdir} --grub-mkimage=FILE use FILE as grub-mkimage --image-type=TYPE select floppy or cdrom (default) + --image-size=1440 size of the image size (720, 1440 or 2880 KiB). grub-mkimage generates a bootable rescue image of the specified type. @@ -54,6 +55,7 @@ } image_type=cdrom +image_size=1440 input_dir=${pkglibdir} grub_mkimage=grub-mkimage @@ -82,6 +84,14 @@ echo "Unknown image type \`$image_type'" 1>&2 exit 1 ;; esac ;; + --image-size=*) + image_size=`echo "$option" | sed 's/--image-size=//'` + case "$image_size" in + 720|1440|2880) ;; + *) + echo "Invalid image size \`$image_size'" 1>&2 + exit 1 ;; + esac ;; -*) echo "Unrecognized option \`$option'" 1>&2 usage @@ -125,7 +135,7 @@ core_img=`mktemp` ${grub_mkimage} -d ${input_dir}/ -m ${memdisk_img} -o ${core_img} memdisk cpio biosdisk ${modules} rm -f ${memdisk_img} -cat ${input_dir}/boot.img ${core_img} /dev/zero | dd bs=1024 count=1440 > $floppy_image +cat ${input_dir}/boot.img ${core_img} /dev/zero | dd bs=1024 count=${image_size} > $floppy_image rm -f ${core_img} if [ "x${image_type}" = "xfloppy" ] ; then