[wplug-bsd] NetBSD: mounting a Windows XP disk
Tom Rhodes
trhodes at FreeBSD.org
Mon Dec 13 09:53:48 EST 2004
On Sat, 11 Dec 2004 17:44:57 -0500 (EST)
Brandon Kuczenski <brandon at 301south.net> wrote:
> 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.
Gotta love IBM. :)
>
> 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?
The kernel, if I'm not mistaken, would create a false label
based on hardware.
Have you tried to mount any of the parts with random / likely
file system drivers?
>
> 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?
You shouldn't. You know, there is a device out there which permits
the connection of a laptop hard disk drive to a standard PC. This
way you wouldn't need live file system CDs. :)
>
> If I try to mount -t ntfs /dev/wd0d /tmp/home I get the error "Invalid
> Argument".
DANGER! DANGER! WILL ROBINSON: NTFS SUPPORT IN *BSD IS VERY
LACKING AND YOU MAY BE BETTER OFF USING LINUX/WINDOWS FOR THIS
TYPE OF THING.
>
> I have tried to write the disklabel a few times, but it has not succeeded.
>
> Anyone have any clues for me?
Reply to my questions and I may be able to help you out.
/me telephones David Maxwell from NetBSD. :)
--
Tom Rhodes
More information about the wplug-bsd
mailing list