Subject: Re: Mounting a Windows disk with NetBSD 1.5.3
To: Brandon Kuczenski <brandon@301south.net>
From: Gary Thorpe <gathorpe79@yahoo.com>
List: netbsd-help
Date: 12/12/2004 22:44:13
--- Brandon Kuczenski <brandon@301south.net> wrote:
[...]
>
> I get NetBSD running -- it works great, by the way! -- 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:
[...]
>
> 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 (shortened version):
>
> # /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)
>
> If I try to mount -t ntfs /dev/wd0d /tmp/home I get the error
> "Invalid
> Argument".
I think you should try /dev/wd0e instead of /dev/wd0d. wd0e is entry
representing the NTFS file system, wd0d is the entire disk (including
some portions outside the NTFS partition).
>
> I have tried to write the disklabel a few times, but it has not
> succeeded,
> possibly because it doesn't know the appropriate fsize and bsize.
You shouldn't need to write a disklabel: the kernel is already
generating a fake one that you can mount the disk with (which is what
it does for CD-ROWs for example) without a label written to the disk.
>From fdisk(8):
"NetBSD does not use the partitioning done by fdisk, instead it uses a
NetBSD disklabel saved in sector 1 of the NetBSD partition."
I.e. the disklabel can only be written to the disk if there is a
partition reserved for NetBSD. However, even without a disklabel the
kernel should generate a fake one (and it seems it is doing so for the
laptop) that can be used to mount the disk's partitions if any.
______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca