[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: umsdos/loopback with debian



on Fri, Apr 27, 2001 at 07:10:53AM +0100, Saqib Shaikh (ss@saqibshaikh.com) wrote:
> hi all,
> 
> what i want to do is convert my existing linux partition into an
> umsdos or loopback filesystem to send to a friend. i have done the
> opposite - converted umsdos to ext2, but could someone tell me how to
> go the other way?

First:  why?

Second:  what are you trying to accomplish?  If you're sending a umsdos
image, he will need GNU/Linux to access it, ditto a loopback image.
You're not trying to give this to someone running Legacy MS Windows to
see what GNU/Linux looks like are you?

Third:  archive formats -- tar, cpio, afio, etc., are far preferable for
transferring sets of files, directory trees, or partitions, in general.


That said, if you're trying to image a partition, the way to do it in
raw format is, assuming /dev/hda1 as the device the partition is on, and
'mypartition.img' as the image file:

    # Image partition via dd:
    $ dd if=/dev/hda1 of=mypartition.img bs=1024 

...this partition can be mounted as a loopback filesystem.

To create an arbitrary filesystem as an image file, and copy content
into it.  Note that I'm not sure umsdos can be created in this fashion.

    # Create a zeroed-out file of sufficient size to save to:
    $ dd if=/dev/zero bs=1024 count=<size of image in KB> of=image.img
    $ mkfs.<fstype> image.img
    $ mkdir /tmp/mount.point
    $ mount -o loop -t <fstype> image.img /tmp/mount.point
    # copy data into the new partition via perferred method.  E.g.:
    $ cd /mypartition; tar cvf - . | ( cd /tmp/mount.point; tar xvf - )
    
...I think.

Cheers.

-- 
Karsten M. Self <kmself@ix.netcom.com>    http://kmself.home.netcom.com/
 What part of "Gestalt" don't you understand?       There is no K5 cabal
  http://gestalt-system.sourceforge.net/         http://www.kuro5hin.org

Attachment: pgpIRXOmhQZki.pgp
Description: PGP signature


Reply to: