BD-R multisession - How to revert to an older file tree?
by exerceo from LinuxQuestions.org on (#6QT9K)
I made the silly mistake of forgetting the "-r" option when running:
Code:growisofs -M /dev/sr0 "folder with new files"This downgraded all file names on the disc to underscored single-cased garbage. This means "Example file!.mp3" got replaced with "example_file_.mp3" (on Windows, it appears as "EXAMPLE_FILE_.MP3").
The "-r" option means "Rock Ridge", which is the extension for the ISO9660 file system that adds support for proper file names. An alternative to it is -J (Joliet), and it is recognizable by Windows, but it has a 64-character limit.
It appears that BD-R doesn't add new sessions but only tracks for each time new files are added to the disc (using growisofs -M), so mount -o session=[number] is useless.
Even though growisofs is based on genisoimage, growisofs has no -C option for manually specifying the location of the last file tree.
Quote:
I am assuming the second number is supposed to specify the "next writable sector" (dvd+rw-mediainfo shows that number) so new files are given the correct offset in the new ISO9660 table of contents.
My last idea was running:
Code:growisofs -Z /dev/sr0=exFAT.img'
genisoimage -M /dev/sr0 -C 16,12132064 -o tmp.img dummy.txt
growisofs -Z /dev/sr0=tmp.imgThe first command was for testing what would happen if I wrote a 512 MB exFAT image to the disc. Since it is a write-once BD-R, it should write it to the end (after the existing data). The writing finished successfully, but it could not be mounted by default, but it was successfully mounted when I manually specified a track offset (dvd+rw-mediainfo lists the tracks and their offsets).
The second command would add "tmp.img" after the existing data on the disc. My idea was that "tmp.img" would contain the original rock ridge file tree.
I had to add a dummy.txt or it would give me a "missing pathspec" error.
But this failed with:
Code:genisoimage: Unable to find previous session PVD '/dev/sr0'."PVD" means "Primary Volume Descriptor.
After that, I did not know how to proceed.
Code:growisofs -M /dev/sr0 "folder with new files"This downgraded all file names on the disc to underscored single-cased garbage. This means "Example file!.mp3" got replaced with "example_file_.mp3" (on Windows, it appears as "EXAMPLE_FILE_.MP3").
The "-r" option means "Rock Ridge", which is the extension for the ISO9660 file system that adds support for proper file names. An alternative to it is -J (Joliet), and it is recognizable by Windows, but it has a 64-character limit.
It appears that BD-R doesn't add new sessions but only tracks for each time new files are added to the disc (using growisofs -M), so mount -o session=[number] is useless.
Even though growisofs is based on genisoimage, growisofs has no -C option for manually specifying the location of the last file tree.
Quote:
-C takes two numbers separated by a comma. The first is the first sector in the last session of the disc that should be appended to. The second number is the starting sector number of the new session. |
My last idea was running:
Code:growisofs -Z /dev/sr0=exFAT.img'
genisoimage -M /dev/sr0 -C 16,12132064 -o tmp.img dummy.txt
growisofs -Z /dev/sr0=tmp.imgThe first command was for testing what would happen if I wrote a 512 MB exFAT image to the disc. Since it is a write-once BD-R, it should write it to the end (after the existing data). The writing finished successfully, but it could not be mounted by default, but it was successfully mounted when I manually specified a track offset (dvd+rw-mediainfo lists the tracks and their offsets).
The second command would add "tmp.img" after the existing data on the disc. My idea was that "tmp.img" would contain the original rock ridge file tree.
I had to add a dummy.txt or it would give me a "missing pathspec" error.
But this failed with:
Code:genisoimage: Unable to find previous session PVD '/dev/sr0'."PVD" means "Primary Volume Descriptor.
After that, I did not know how to proceed.