0

How can I create a loop device of an existing block device or regular file of size z so that a certain byte x (with x > 0) appears as first byte, x+1 as second, etc. and a certain byte y as last byte (with x < y z). It'd be great if there was a solution which could provide subsets of a 1TB device image.

This is not about operations on file level (e.g. mount -o bind).

4
  • This smells like an XY problem. BTW the device you mount must contain a valid filesystem.
    – sawdust
    Oct 23, 2014 at 19:51
  • @sawdust, right, I hope I removed the unclear parts or shrunk them at least. I found an answer which is using losetup with -o and --sizelimit options. If you remove the "on hold" status, I'll post an answer. Oct 25, 2014 at 20:45
  • Please post an answer as you said. Leave me a comment and I will upvote it. Nov 7, 2017 at 13:55
  • @KamilMaciorowski I don't remember, sorry - and I don't mean "but, maybe, if you give me an upvote, I might remember" ;) too much time has passed. Nov 7, 2017 at 19:21

0

You must log in to answer this question.

Browse other questions tagged .