Results 1 to 10 of 11
tryed
sudo ddrescue /dev/sda /home/custom/user/sda_image.img /home/custom/user/logfile
problem is would not mount under /mnt to see if it worked
so tryed
sudo ddrescue /dev/sda /home/custom/user/sda_image.iso /home/custom/user/logfile
the sda_image.img file is 55gb ...
- 03-13-2011 #1Linux Newbie
- Join Date
- Jan 2010
- Location
- usa
- Posts
- 124
use ubuntu to clone a windows hard drive with ntfs
tryed
sudo ddrescue /dev/sda /home/custom/user/sda_image.img /home/custom/user/logfile
problem is would not mount under /mnt to see if it worked
so tryed
sudo ddrescue /dev/sda /home/custom/user/sda_image.iso /home/custom/user/logfile
the sda_image.img file is 55gb the other one tht is .iso is 0gb
so now trying
dd if=/dev/sda of=/home/custom/usr/sda_image.iso
waiting to see what is going on any body got any advice on how to make the image work?
- 03-13-2011 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,977
Please say exactly what you are trying to accomplish and I'll try to give you a step-by-step. I do disc imaging of NTFS volumes and Windows system discs (as well as Linux partitions and drives) all the time without problems. Saved my (and my clients') bacon on more than one occasion.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 03-14-2011 #3
I'm sure Rub will walk you through it when you give details, but one thing that's wrong with what you're doing and what you're saying is that if you expect to be able to mount the image, it needs to be of a partition, e.g. /dev/sda1, not the full disk device.
- 03-14-2011 #4Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,977
Actually GHW, you can mount a file system that is inside a full disc image. It's just a bit harder. You have to figure the offset of the first block of the partition, and pass that information to the mount command. I've done it, but you are right in that for people who aren't into major brain burn, mounting an image of a partition is tonnes easier!
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 03-14-2011 #5
Not the first time I've learned something from your posts. Wasn't aware of that option to a loop mount.
- 03-14-2011 #6Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,977
Here is the part of the mount man page that covers that.
Code:THE LOOP DEVICE One further possible type is a mount via the loop device. For example, the command mount /tmp/fdimage /mnt -t vfat -o loop=/dev/loop3 will set up the loop device /dev/loop3 to correspond to the file /tmp/fdimage, and then mount this device on /mnt. This type of mount knows about four options, namely loop, offset, sizelimit and encryption, that are really options to losetup(8). (These options can be used in addition to those specific to the filesystem type.) If no explicit loop device is mentioned (but just an option ‘-o loop’ is given), then mount will try to find some unused loop device and use that. Since Linux 2.6.25 is supported auto-destruction of loop devices and then any loop device allocated by mount will be freed by umount independently on /etc/mtab. You can also free a loop device by hand, using ‘losetup -d’ or ‘umount -d‘.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 03-14-2011 #7
Yep, that's the first place I went after seeing your previous response. The actual offset option is documented in the losetup manpage, but it's not immediately clear how to set the option on the mount command line to get it passed to losetup. It's "-o offset" for losetup, but -o is the option switch itself for mount. How do you put the offset into the mount command?
- 03-14-2011 #8Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,977
That's how I did it. Keeping the calculator app handy is good to compute the offset in bytes from the start sector of the partition...Code:mount [-t type] filename mount-point -o loop[=/dev/loopN],offset=NNNNNNN
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 03-14-2011 #9Just Joined!
- Join Date
- Dec 2008
- Location
- San Jose, CA
- Posts
- 4
- 03-14-2011 #10
the offset isn't even technically necessary, one time to fool a dell DRAC device I created a disk image file, create fs on it, and then mounted it on the DRAC and it looked just like a regular usb stick, then i mounted it back on my local machine and everything i copied was there, i just use the -o loop and nothing else
the best part though, was that i just did all this on a hunch and it ended up working


Reply With Quote
