Need your help : mount -o loop problem !

Hi all

I ask here because I know there is some good sysadm, maybe some Guru ?

Well, talking about linux sysadmin tips/tricks and questions, maybe you could point me to a good forum, community of linux guru ?

Ok here is my problem

I’d like to move the content of a disk image to a partition.
To do this I’ll mount the img to a loop device
Then copy the content to my partition

So I do

mount -o loop myfile.img /mnt/image/ -t ext3

And I have this error

mount -o loop xen01 /mnt/image/ -t ext3

mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

If I look at the log I see

hfs: unable to find HFS+ superblock
VFS: Can’t find ext3 filesystem on dev loop0.

So ok I do :
1- create zero file of 1G

dd if=/dev/zero of=/file bs=1M count=1000

Setup the loop of this size and format the loop device to ext3

losetup /dev/loop0 /file

mkfs -t ext3 /dev/loop0

then I retry

mount -o loop=/dev/loop0 myfile.img /mnt/image/ -t ext3

But now I gave this error

ioctl: LOOP_SET_FD: P?riph?rique ou ressource occup?

Which, in english mean something like : “ressource or device busy” !!!

erffff !

Do you have any idea ?
If not, could you please give some net pointer to a good sysadmin forum or somewhere I could have an answer ?

Thanks a ton

Pascal

I am actually in the process of rescuing data from a corrupt disc using dd_rhelp.

If I don’t remember totally wrong, it should be as easy as; dd_rhelp /dev/source /dev/target (the target being a clean un-used disc that is as big or larged than the source disc).

The above will move over the whole shabang. Run it under screen and you can go to bed while it’s running :wink:

[QUOTE=Henrik;13388]I am actually in the process of rescuing data from a corrupt disc using dd_rhelp.

If I don’t remember totally wrong, it should be as easy as; dd_rhelp /dev/source /dev/target (the target being a clean un-used disc that is as big or larged than the source disc).

The above will move over the whole shabang. Run it under screen and you can go to bed while it’s running ;)[/QUOTE]

heu…

lol :wink:

not sure to understand !

It is not a harddrive…

But thank you it is an interesting tool

Pascal

I seem to have misunderstood what you wanted… but hey… just “click click delete” my comment :wink: :smiley:

Did you find out a solution for your problem though? (and yes, you can copy over partitions through dd_rhelp too)