losetup with negative offset

P

Peter0

Guest
Hello alltogether,

I got a script that uses losetup with negative numbers after -o parameter.

The script did a good job under Ubuntu 10.04 system.
After moving to Mint 17, losetup responds like this:
losetup: invalid offset '-547622912' specified

Usage:
[…]

The script calls it the following way:
Code:
$ sudo losetup -r -o -547622912 -f --show '/media/…/Multimedia_Track.tao'

Apparently, the older system’s losetup accepts negative offsets, while the newer one denies them.
Why?
Is there a way around?
Can I coax a version number out of losetup?
Where is the right place to encourage to getting rid of losetup’s cumbersome constraint?

Thanks for any hints – Peter

If you want to know why and you are able to understand german, take a look at a forum where I explained it. (Sadly I'm hindered to even post anything that might give you any impression of the forum's url.)

In a short: There is a data image file of a CD that contains also music. The image file is only from session 2 of that CD. In order to mount that image file, the script is establishing a loopdevice while giving a negative offset, followed by mounting the loopdevice with a positive offset via mount option "sbsector". The offset depends on the length of audio part on the CD, in other words, it resembles the offset of the second session on the real CD.

Mounting without this double offsetting works with HFS filesystem, but not with ISO-9660 filesystem.
 


Maybe the impression may be given as code?
Code:
forum.ubuntuusers.de/topic/cd-extra-image-nur-session-2-mounten/

Wow, this works. Of course, the "code" has to be processed via НТТР. ;)
 
Hm – maybe I'm going crazy if I had to rethink about doing such complicated things like mounting an image…
It's been some years ago, when I managed how to mount these kind of images. AFAIR, alternative ways back then included gluing a huge amount of zeros in front of the image into an temporary (sparse) file or using an additional tool to do some equivalently on the fly. Let's tackle it in a roundabout way.

But suggestions are welcome. Probably I haven't grasped the straightforward way, not even back then.
 

Members online


Top