Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Aug 2012 00:21:32 -0700
From:      Matthew Navarre <navarre.matthew@gmail.com>
To:        Michael Sierchio <kudzu@tenebras.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Mounting raw disk backup file.
Message-ID:  <CAMZ_P7izGHjBN745CysQ9XsJf+oshyOEv+Phu0We62+U70Ls5Q@mail.gmail.com>
In-Reply-To: <CAHu1Y71nrsSsp7DKmL9TUhWjvU0OFZJbjzTQ=DS_OU4i3xCCgw@mail.gmail.com>
References:  <CAMZ_P7iuN0WXzvU3BZUovat8hvXYyjB68jz-GWnerkEgJOqrCg@mail.gmail.com> <CAHu1Y71nrsSsp7DKmL9TUhWjvU0OFZJbjzTQ=DS_OU4i3xCCgw@mail.gmail.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Sun, Aug 5, 2012 at 11:28 PM, Michael Sierchio <kudzu@tenebras.com>wrote:

>
>
> On Sun, Aug 5, 2012 at 11:12 PM, Matthew Navarre <
> navarre.matthew@gmail.com> wrote:
>
>
>>
>>
>> Here's what file says about the file:
>> mnavarre@pcbsd-1810] /# file /mnt/ada1_backup
>> /mnt/ada1_backup: x86 boot sector; partition 1: ID=0xa5, active, starthead
>> 1, startsector 63, 167766732 sectors; partition 2: ID=0xa5, starthead 254,
>> startsector 167766795, 144809910 sectors, code offset 0x3c, BSD disklabel
>>
>>
> Why did you put it in /mnt?  That's customarily used for mounting
> fileystems.  Move it ;-)
>

Heh, the BSD drive with the backup file in on /mnt, the mdconfig node is
md1.

>
> mdconfig -a -t vnode -f /new-path/ada1_backup
>
> note the device that's created (probably md0)
>
> you can then operate on /dev/md0 as if it were a disk.  In particular, you
> might want to fix the partition map, the label info, etc.  You can then
> fsck the filesystem (presumably something like /dev/md0s1a or /dev/md0a
> etc).
>
> You'll probably need to tell fsck that it's ufs (i.e. fsck -t ufs
> /dev/md0a )
>
> you can then mount the fs (mount -t ufs /dev/md0a /mnt )
>

Thanks, didn't realize that I could use that device node to operate on it
like a block device. Of course, the fact that mdconfig makes the system
think a file is a block device should have been a clue ;)

Now I just need to get the partitions and disklabel figured out.

>
> - M
>

OK,
MCN



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?CAMZ_P7izGHjBN745CysQ9XsJf+oshyOEv+Phu0We62+U70Ls5Q>