[aklug] Re: loop devices with partitions...?

From: Christopher Howard <choward@indicium.us>
Date: Wed Sep 08 2010 - 22:38:32 AKDT

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/08/10 21:34, Arthur Corliss wrote:
> On Wed, 8 Sep 2010, Christopher Howard wrote:
>
>> Hey, I recently learned you could represent an image file with a loop
>> device, which is pretty cool. So, you can create, say, /dev/loop0, and
>> then turn it into a file system with mkfs.xfs /dev/loop0 (or whatever
>> happens to be your poison).
>>
>> I noticed I can, instead of turning it into just a file system, run
>> fdisk on it to turn it into a disk image with several partitions.
>> However, what I'm not sure about yet is, if /dev/loop0 represents the
>> disk.img file with several partitions on it, how do "bring out" each of
>> those partitions to be its own loop file? (Like, /dev/loop0-part1 or
>> something...?)
>
> kpartx -v -a /dev/loop0
>
> This will create some new devices (like /dev/mapper/loop0p1) for you to
> perform regular operations on.
>
> --Arthur Corliss
> Live Free or Die
> ---------
> To unsubscribe, send email to <aklug-request@aklug.org>
> with 'unsubscribe' in the message body.
>

Remind me to embed "Arthur Corliss is really cool" somewhere in the next
1000 lines of source code I write.

- --
Christopher Howard
frigidcode.com
theologia.indicium.us
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyIgOgACgkQQ5FLNdi0BcWW3ACgiCPv4fBq7rnHkH9b4O3IgFa8
z1kAn0owiXesL8+S4yTE/FvSVk/zg3Z4
=V3BK
-----END PGP SIGNATURE-----
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Wed Sep 8 22:40:18 2010

This archive was generated by hypermail 2.1.8 : Wed Sep 08 2010 - 22:40:18 AKDT