-1

I'm trying to create a iso bootable file by grub-mkrescue. But I require to assign the iso's label. After read the man page, I guess here is a correct command line, but failed.

grub-mkrescue -o "my_arch.iso" -- -volid=MY_ARCH my_iso_dir

It will show error as:

xorriso 1.4.2 : RockRidge filesystem manipulator, libburnia project.

Drive current: -outdev 'stdio:my_arch.iso'
Media current: stdio file, overwriteable
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data, 19.1g free
Added to ISO image: directory '/'='/tmp/grub.ZoYEzy'
xorriso : UPDATE : 613 files added in 1 seconds
xorriso : FAILURE : -as mkisofs: Unrecognized option '-volid=MY_ARCH'
xorriso : UPDATE : 613 files added in 1 seconds
xorriso : aborting : -abort_on 'FAILURE' encountered 'FAILURE'

According the 'info grub-mkrescue' document:

  All arguments not explicitly listed as 'grub-mkrescue' options are
passed on directly to 'xorriso' in 'mkisofs' emulation mode.  Options
passed to 'xorriso' will normally be interpreted as 'mkisofs' options;
if the option '--' is used, then anything after that will be interpreted
as native 'xorriso' options.

   Non-option arguments specify additional source directories.  This is
commonly used to add extra files to the image:
user3840170
  • 26,597
  • 4
  • 30
  • 62
Daniel YC Lin
  • 15,050
  • 18
  • 63
  • 96

1 Answers1

0

The -as mkisofs emulation of xorriso understands

-V MY_ARCH

or

-volid MY_ARCH

but not

-volid=MY_ARCH

Further be aware that you obviously use the intermediate C version of grub-mkrescue which does not comply to the documentation you quoted. This version demands '--' as delimiter between grub-mkrescue options and xorriso -as mkisofs options.

But if you have '--' among the arguments of old grub-mkrescue shell script or of current grub-mkrescue C program, then you will drop out of mkisofs emulation. This will earn you an error message

xorriso : FAILURE : Not a known command:  'my_iso_dir'
Thomas Schmitt
  • 259
  • 1
  • 3
  • I believe the grub-mkrescue is C version. I'm not understand well. What's the correct full command line for C version? – Daniel YC Lin May 09 '16 at 09:01
  • Yes, your current program version is the temporary software accident. Your command line matches this version. The only problem for now is the '=' character between -volid and MY_ARCH. After some future upgrade of GRUB, you will have to omit the '--' argument. – Thomas Schmitt May 10 '16 at 06:17