OT: fdisk

Robert traveling08 at cox.net
Mon Oct 4 14:52:28 UTC 2010


On Mon, 4 Oct 2010 16:32:25 +0200
Polytropon <freebsd at edvax.de> wrote:

> On Mon, 4 Oct 2010 07:08:58 -0700, Robert <traveling08 at cox.net> wrote:
> > I have now a free 1TB drive for use. It is formatted as UFS. Should
> > I remove formatting before I dd the 500GB drive to it? 
> 
> Not needed, as you're going to use it under the control of FreeBSD.
> After formatting and mounting it, let's say as /mnt, use dd (or
> ddrescue) to first get an 1:1 copy of the source disk.
> 

It is being performed even as we "speak".

> 
> 
> > I tried the above process and here is what I have.
> > 
> > [root at asus64] ~# mdconfig -a -t vnode -u 10 -f /250extra/disk.img 
> > [root at asus64] ~# mount -o ro /dev/md10 /mnt
> > mount: /dev/md10 : Invalid argument
> 
> Of course. :-)
> 
> 
> 
> > [root at asus64] ~# mount_ntfs -o ro /dev/md10 /mnt
> > mount_ntfs: /dev/md10: Input/output error
> 
> This indicates that the NTFS seems to be damaged and prevents
> mount_ntfs from mounting it. Start with "baby steps": Is there
> a valid partition table?
> 
> 	# fdisk /dev/md10

[root at asus64] ~# fdisk /dev/md10
******* Working on device /dev/md10 *******
parameters extracted from in-core disklabel are:
cylinders=7648 heads=255 sectors/track=63 (16065 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=7648 heads=255 sectors/track=63 (16065 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 7 (0x07),(NTFS, OS/2 HPFS, QNX-2 (16 bit) or Advanced UNIX)
    start 63, size 976773105 (476939 Meg), flag 0
	beg: cyl 0/ head 1/ sector 1;
	end: cyl 1023/ head 15/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>

> 
> You should now get a partition table.
> 
> Did you create disk.img by dd'ing da0 or da0s1? This may matter.

da1...but not the entire disk.
> 
> 
> 
> > [root at asus64] ~# ls -l /dev/md*
> > crw-r-----  1 root  operator    0, 129 Oct  4 06:43 /dev/md10
> > crw-r-----  1 root  operator    0, 130 Oct  4 06:43 /dev/md10s1
> > crw-------  1 root  wheel       0,  66 Oct  1 14:43 /dev/mdctl
> > [root at asus64] ~# mount -o ro /dev/md10s1 /mnt
> 
> Good. At least a bit.

Is this the way to mount it, not _ntfs?

> 
> 
> 
> > [root at asus64] ~# ls -l /mnt
> > total 0
> > [root at asus64] ~# df -h
> > Filesystem           Size    Used   Avail Capacity  Mounted on
> > <snip>
> > /dev/ad12s1d         226G     59G    149G    28%    /250extra
> > /dev/md10s1          451G     32G    383G     8%    /mnt
> >                      ^^^^     ^^^
> > [root at asus64] ~# ls -la /mnt
> > total 0
> 
> Hmmm... you dd'ed the WHOLE disk to disk.img? Does the size look
> reasonable?

No. I was trying to just get the data to a 250GB drive. Now I am doing
the 500GB to a 1TB drive and will follow up when complete.

Robert


More information about the freebsd-questions mailing list