Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Maybe I'm just not doing right, but I can't seem to get genisoimage to produce a UDF image and preserve the exec bit.

$ genisoimage --version
genisoimage 1.1.11 (Linux)

$ echo "echo 'Hello world'" > script.sh

$ chmod +x script.sh

$ ./script.sh 
Hello world

$ genisoimage -input-charset utf-8 -r -udf -volid minimal -o minimal.iso script.sh 
Total translation table size: 0
Total rockridge attributes bytes: 250
Total directory bytes: 0
Path table size(bytes): 10
Max brk space used 0
420 extents written (0 MB)

$ mkdir mount
$ sudo mount minimal.iso $PWD/mount -o ro,loop -t udf

$ ls -l script.sh mount/script.sh 
-r--r--r-- 1 root root 19 Sep 21 18:40 mount/script.sh
-rwxrwxr-x 1 kip  kip  19 Sep 21 18:40 script.sh

You'll note in the last command that script.sh was executable at the time it was injected into the image, but does not appear to be inside of the mounted image.

Is this a bug in genisoimage, a problem with the way I am mounting the image, or a problem in my usage of genisoimage?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

One potential problem with your command line may be the -udf option. Here is what the manual says:

Include UDF filesystem support in the generated filesystem image. UDF support is currently in alpha status and for this reason, it is not possible to create UDF-only images. UDF data structures are currently coupled to the Joliet structures, so there are many pitfalls with the current implementation. There is no UID/GID support, there is no POSIX permission support, there is no support for symlinks.

EDIT: this is definitely the problem. If the image is created with

genisoimage -input-charset utf-8 -r -volid minimal -o minimal.iso script.sh

then the script.sh is executable (actually even -r-xr-xr-x, because the -r option propagates the executable bit on files). If you want the iso to be readable to Windows, use the Joliet extension (option -J).

share|improve this answer
    
Hey january. While that's not the answer I wanted to hear, it's the one that I needed to hear. It's unfortunate that genisoimage's UDF support isn't mature yet, as I don't know of any other straightforward command line driven way to generate a UDF image. Standard iso9660 is unfortunately not an option in my case due to the size of some of the files I am working with and the inherent limitation that file system imposes on them. –  user92187 Sep 23 '12 at 22:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.