Mounting a raw partition file made with dd or dd_rescue in Linux
1 |
# dd if=/dev/sda of=/mnt/nfs/backup/harddrive.img |
1 2 3 4 |
# file harddrive.img harddrive.img: x86 boot sector; GRand Unified Bootloader, stage1 version 0x3, stage2 address 0x2000, stage2 segment 0x200, GRUB version 0.97; partition 1: ID=0x83, active, starthead 1, startsector 63, 33640047 sectors, code offset 0x48 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
XHTML # mount harddrive /mnt/temp mount: you must specify the filesystem type # mount harddrive /mnt/temp mount: you must specify the filesystem type fdisk -l aaa.img # mount -o ro,loop,offset=32256 harddrive.img /mnt/loop # mount | grep harddrive.img /root/harddrive.img on /mnt/loop type ext3 (ro,loop=/dev/loop1,offset=32256) # losetup --offset 32256 /dev/loop2 harddrive.img # fsck /dev/loop2 # mount /dev/loop2 /mnt/loop |
How to mount fat16
1 2 3 4 5 6 |
fstab -> from etc /dev/hda1 /home/win vfat defaults 0 0 mount -t vfat /dev/sda1 /mnt/kutayzorlu.com_mount # or mount -t [filesystem] [device] [mount point] |
Example 2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
$ blkid partition2.img partition2.img: SEC_TYPE="msdos" UUID="1EFE-FEF2" TYPE="vfat" $ blkid disk2.img disk2.img: PTUUID="7ecf1712" PTTYPE="dos" losetup -f -P disk2.img $ losetup -l NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE /dev/loop0 0 0 0 0 /rescue2.img $ ls -1 /dev/loop0* /dev/loop0 /dev/loop0p1 mount /dev/loop0p1 /mnt/rescue2/ umount /dev/loop0p1 losetup -d /dev/loop0 |