Re: xorriso : FAILURE : Not a known command

"Thomas Schmitt" <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Message-ID <[email protected]>
Hi,

i tested with the intermediate grub-mkrescue version of Debian 8.

  $ grub-mkrescue --version
  grub-mkrescue (GRUB) 2.02~beta2-22

Test case is to pack up the grub-mkrescue program as payload of a
bootable ISO. grub-mkrescue insists in some payload. One could as well
use some /tmp/dummy file instead of $(which grub-mkrescue).

One can see that it is neither the script nor the released binary,
because it fails without "--" before option -f :

  $ grub-mkrescue --output=/dev/null $(which grub-mkrescue) -f
  grub-mkrescue: invalid option -- 'f'
  Try 'grub-mkrescue --help' or 'grub-mkrescue --usage' for more information.
  $ echo $?
  64
  $

So the way to operate it is with "--":

  $ grub-mkrescue --output=/dev/null $(which grub-mkrescue) -- -f
  GNU xorriso 1.4.7 : RockRidge filesystem manipulator, libburnia project.
  ...
  Written to medium : 4421 sectors at LBA 0
  Writing to 'stdio:/dev/null' completed successfully.

  $ echo $?
  0
  $

But the --help text describes the behavior of script and released binary:

  $ grub-mkrescue --help
  ...
  Generates a bootable CD/USB/floppy image.  Arguments other than options to
  this program are passed to xorriso, and indicate source files, source
  directories, or any of the mkisofs options listed by the output of `xorriso
  -as mkisofs -help'.

  Option -- switches to native xorriso command mode.
  ...

The intermediate binary consumes the first "--" and thus does not let xorriso
switch to native command mode. The script and the released binary forward
all "--" arguments to xorriso, This causes the error message which Leslie
experiences, because -f is not a native xorriso command.


Given the pitfalls of program analysis, i deem above direct experiment
the most reliable way to determine the need for "--".


Have a nice day :)

Thomas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.