bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Rock Ridge features in grub-mkrescue


From: Free Software Supporter
Subject: Rock Ridge features in grub-mkrescue
Date: Mon, 25 Apr 2016 19:04:41 -0400

Version: grub 2.02-beta2

Overview:

Invoking the grub-mkrescue program with a -r flag (lowercase) should
have the effect of adding Rock Ridge extensions to the ISO image being
created that represent highly simplified Unix-style ownership and
permissions for the included files and directories: all files should
share a single file owner and a limited set of permissions.

In contrast, invoking the grub-mkrescue program with a -R flag
(uppercase) should have the effect of adding Rock Ridge extensions to
the ISO image so that Unix-style ownership and permissions for the
included files and directories are fully and accurately rendered: the
filesystem on the ISO image should represent as fully as possible the
ownership and permissions of the source Unix filesystem.

Currently, however, when the grub-mkrescue program is invoked with a
-R flag, the richer ownership and permission information that the user
presumably expects is suppressed from the ISO image.  Instead, only
the most simplified Rock Ridge information is included in the image.

Whether the -R flag is properly an argument to grub-mkrescue or is
instead an argument to xorriso that is transparently passed by its
caller is less compelling than the fact that grub-mkrescue currently
suppresses fullest use of otherwise available Rock Ridge features.  In
the former case, the -R flag is without its expected effect; in the
latter case, grub-mkrescue is absurdly overriding the same flag that
it is transparently passing.

Analysis:

The grub-mkrescue program invokes the xorriso program to assemble and
write the ISO image.  The xorriso program seems to accept and
interpret either of the -R or -r flags consistently with user
expectations.  When both flags are present, xorriso reasonably gives
precedence to the -r (lowercase) flag.

However, the grub-mkrescue program, regardless of the combination of
flags with which it is invoked, invariably invokes the xorriso program
with a -r flag, thereby suppressing the richer file ownership and
permission information in the created ISO image.

Experimental Method:

As the superuser, execute the attached program reproduce_bug.sh and
capture the output in a file.  This program constructs a directory
hierarchy with a variety of file owners and permissions.  Then, the
grub-mkrescue program is invoked with the -R flag to construct a
bootable ISO image that includes that directory hierarchy.  File
ownership and permissions for the initial directory hierarchy are
presented for observation as are those in the created ISO image.

Experimental Results:

Experimental results are presented in the attached file
script_output.txt.  View captured results in a text editor.  Search on
the token "TMPDIR" to observe the flags (including -R) with which the
grub-mkrescue program is invoked.  Search on the phrase "executing
xorriso" to observe the flags (both -R and -r) with which the xorriso
program is invoked.  Search on the phrase "Observe variety" to observe
the variety of file ownership and permissions in the initial directory
hierarchy.  Search on the phrase "Observe homogeneity" to observe the
inadequate rendering of file ownerships and permissions in the created
ISO image.

Although the reported results are for xorriso version 1.3.2, similar
results also obtain for version 1.4.0.

Proposed Fix:

The reported behavior is corrected by the attached patch
grub-2.02-beta2.patch.  If the -R flag is present among the invocation
arguments for grub-mkrescue, then the -r flag is not automatically
added to its invocation of the xorriso program.

Attachment: grub-2.02-beta2.patch
Description: Text Data

Attachment: reproduce-bug.sh
Description: application/shellscript

Attachment: script_output.txt
Description: Text document

Attachment: bug_report.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]