[wplug-bsd] NetBSD: mounting a Windows XP disk

Brandon Kuczenski brandon at 301south.net
Sat Dec 11 17:44:57 EST 2004


I am trying to use a NetBSD live-filesystem CD-ROM to recover files from a
dying HDD belonging to a friend, which runs Windows XP.  The disk lives
inside an IBM T30 laptop.

I get NetBSD running -- it works great, by the way! -- this was the demo
given out at the installfest in July -- obtain a DHCP address, and mount
the destination drive for the rescued files on my server via nfs.  Fine.
But I cannot mount the internal hard drive.

fdisk gives me an error "wd0: no disk label" and then prints out the
following:
NetBSD disklabel disk geometry:
cylinders: 16383 heads: 16 sectors/track: 63 (1008 sectors/cylinder)

BIOS disk geometry:
cylinders: 1023 heads: 240 sectors/track: 63 (15120 sectors/cylinder)

Partition table:
0: sysid 7 (OS/2 HPFS or NTFS or QNX2 or Advanced UNIX)
    start 63, size 75327777 (36781 MB), flag 0x80
	beg: cylinder    0, head   1, sector  1
	end: cylinder 1023, head 239, sector 63
1: sysid 28 (unknown)
    start 75327840, size 2812320 (1373 MB), flag 0x0
	beg: cylinder 1023, head   0, sector  1
	end: cylinder 1023, head 239, sector 63
2: <UNUSED>
3: <UNUSED>

Partition 0 there is the 40-gig partition I expect to see.

'disklabel -r wd0' fails, saying there is no disk label, but I can read
the kernel's automatically-generated disklabel with 'disklabel wd0', which
gives:

# /dev/rwd0d:
type: ESDI
disk: HITACHI_DK23DA-4
label: fictitious
<...SNIP...>

8 partitions:
#        size   offset     fstype   [fsize bsize cpg/sgs]
  d: 78140160        0     unused        0     0         # (Cyl.    0 - 77519)
  e: 75327777       63       NTFS                        # (Cyl.    0*- 74729)
  f:  2812320 75327840     unused        0     0         # (Cyl. 74730 - 77519)

Incidentally, how would the kernel divine this information if it couldn't
read the disklabel?

I infer that wd0d is where the data lives, and it is split into 8
subpartitions (sort of like FreeBSD's slices/partitions thing).  Do I need
a /dev/wd0de device?

If I try to mount -t ntfs /dev/wd0d /tmp/home I get the error "Invalid
Argument".

I have tried to write the disklabel a few times, but it has not succeeded.

Anyone have any clues for me?

Thanks in advance,
Brandon



More information about the wplug-bsd mailing list