--- grub-mkrescue.in 2010-05-18 10:02:06.000000000 +0200 +++ grub-mkrescue.in.ts2 2010-05-20 09:34:56.000000000 +0200 @@ -38,6 +38,8 @@ efi32_dir=${libdir}/$(echo ${PACKAGE_TAR efi64_dir=${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/x86_64-efi rom_directory= +xorriso=xorriso + # Usage: usage # Print the usage. usage () { @@ -50,10 +52,15 @@ Make GRUB rescue image. --output=FILE save output in FILE [required] --modules=MODULES pre-load specified modules MODULES --rom-directory=DIR save rom images in DIR [optional] + --xorriso=PROGFILE use PROGFILE as xorriso program [optional] -$0 generates a bootable rescue image with specified source files or directories. +$0 generates a bootable rescue image with specified source files, source +directories, or mkisofs options listed by: xorriso -as mkisofs -help +Option -- switches to native xorriso command mode. +Be aware that source paths must be single words. Quotation marks will not work. Report bugs to . +Mail xorriso support requests to . EOF } @@ -78,11 +85,8 @@ for option in "$@"; do PATH=${override_dir}:$PATH export PATH ;; - -*) - echo "Unrecognized option \`$option'" 1>&2 - usage - exit 1 - ;; + --xorriso=*) + xorriso=`echo "${option}/" | sed 's/--xorriso=//'` ;; *) source="${source} ${option}" ;; esac @@ -254,7 +258,12 @@ if [ -e "${iso9660_dir}/boot/coreboot.el fi # build iso image -xorriso -pathspecs on -as mkisofs ${grub_mkisofs_arguments} --protective-msdos-label -o ${output_image} -r ${iso9660_dir} ${source} +"${xorriso}" -report_about HINT -as mkisofs -graft-points \ + ${grub_mkisofs_arguments} --protective-msdos-label -r \ + --sort-weight 0 / --sort-weight 1 /boot \ + -o "${output_image}" \ + ${iso9660_dir} ${source} + rm -rf ${iso9660_dir} rm -f ${embed_img}