Mounting a partition from an image

Status
Not open for further replies.

clarknova

Explorer
Joined
Sep 22, 2015
Messages
66
Reposted from dslreports.com, where I wasn't getting any bites.

FreeNAS 9.10

I have an image that I created from a Macintosh HD using ddrescue. It's clear enough how to mount a drive image in a shell using mdconfig, but I'm not having any luck mounting a partition from within a whole-drive image. In Linux I can accomplish this with

Code:
mount -oloop,ro,offset=209735680,sizelimit=499248103424 /path/to/rescue.img /tmp/mnt/


Any clues on doing the same thing from a FreeNAS shell?
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
If it was made from a Mac, it's likely HFS right? If so, FreeNAS probably will not be able to read it. Honestly, this isn't really a task for FREENAS, but of a client machine.
 

clarknova

Explorer
Joined
Sep 22, 2015
Messages
66
Yes, it's HFS+, and the image is stored on FreeNAS. I was hoping to mount it on FreeNAS since that's the only server I can access from the network where I want to copy the files to, but I can launder them through a Linux box if need be.

I got this far, but as you say, if FreeNAS won't read HFS+, then I won't be getting much further than this:

Code:
# file rescue.img
rescue.img: DOS/MBR boot sector; partition 1 : ID=0xee, start-CHS (0x3ff,254,63), end-CHS (0x3ff,254,63), startsector 1, 976773167 sectors, extended partition table (last)
# mdconfig -a -t vnode -f rescue.img -u 0
# mount -r /dev/md0s1 /mnt/hd
mount: /dev/md0s1: No such file or directory


but then I'm so far unable to mount any slice off this device.

I'm not sure why this image is being identified as MBR, but I am able to mount its partitions in a Linux machine and read files from them.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
It's probably not recognized correctly because FreeNAS doesn't understand the filesystem...
 

clarknova

Explorer
Joined
Sep 22, 2015
Messages
66
Well, I have this now. It's progress, but maybe futile yet.

Code:
# gnop create -o 209735680 /dev/md0
# file -s /dev/md0.nop
/dev/md0.nop: Macintosh HFS Extended version 4 data (mounted) last mounted by: 'fsck', created: Mon Sep 22 07:03:31 2014, last modified: Sun Jul 10 01:21:30 2016, last checked: Mon Sep 22 20:03:31 2014, block size: 4096, number of blocks: 121886744, free blocks: 107705427
# mount -r -t hfs /dev/md0.nop /mnt/hd
mount: /dev/md0.nop: Operation not supported by device


From what I can tell, HFS and HFS+ are supported in FreeBSD, but the error I'm getting suggests I'm still missing something.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Well, I have this now. It's progress, but maybe futile yet.

Code:
# gnop create -o 209735680 /dev/md0
# file -s /dev/md0.nop
/dev/md0.nop: Macintosh HFS Extended version 4 data (mounted) last mounted by: 'fsck', created: Mon Sep 22 07:03:31 2014, last modified: Sun Jul 10 01:21:30 2016, last checked: Mon Sep 22 20:03:31 2014, block size: 4096, number of blocks: 121886744, free blocks: 107705427
# mount -r -t hfs /dev/md0.nop /mnt/hd
mount: /dev/md0.nop: Operation not supported by device


From what I can tell, HFS and HFS+ are supported in FreeBSD, but the error I'm getting suggests I'm still missing something.
But is HFS supported by FreeNAS? Not to my knowledge.
 

clarknova

Explorer
Joined
Sep 22, 2015
Messages
66
You could be right. The manpage for mdconfig gives an example using gnop, and it appears I'm doing it correctly, so the error I'm getting may be just FreeNAS's way of telling me it can't.
 

clarknova

Explorer
Joined
Sep 22, 2015
Messages
66
It turns out I was making it more complicated than it needed to be. From a Mac I was able to find rescue.img on the share and mount it directly, then copy the files off.

Thank you for the input.
 
Status
Not open for further replies.
Top