2002-01-11 16:49:03

by Roy Sigurd Karlsbakk

[permalink] [raw]
Subject: Loop-back block device?

Hi all

I apologize if this is question doesn't belong here, but I haven't found
any answers anywhere I've been looking.

What I want to do...

dd if=/dev/hda of=/some/file/on/another/larger/drive
mk_block_dev /some/file/on/another/larger/drive
cat /proc/partitions
[here the partitions on the (latter) /dev/hda will show up

and - after this - mount the partitions.

Thanks all

roy

--
Roy Sigurd Karlsbakk, MCSE, MCNE, CLS, LCA

Computers are like air conditioners.
They stop working when you open Windows.


2002-01-11 17:32:13

by willy tarreau

[permalink] [raw]
Subject: Re: Loop-back block device?

> [here the partitions on the (latter) /dev/hda will
show
> up and - after this - mount the partitions.

Although you can't do that at the moment, at least you
can
play with the loop offset when mounting your file as a
loopback to access a given partition. I think it would
be
simpler to write a small prog that will seek on your
file to
read the MBR and extended partitions and returns a
list
of offsets for all the partitions so that you can
mount them.
(man 8 mount for more info).

Regards,
Willy



___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran?ais !
Yahoo! Courrier : http://courrier.yahoo.fr