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).

  • This smells like an XY problem. BTW the device you mount must contain a valid filesystem. – sawdust Oct 23 '14 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. – Karl Richter Oct 25 '14 at 20:45
  • Please post an answer as you said. Leave me a comment and I will upvote it. – Kamil Maciorowski Nov 7 '17 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. – Karl Richter Nov 7 '17 at 19:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.