Subject: Accessing HFS partition (from /i386)
To: NetBSD/current <current-users@NetBSD.org>
From: Joel CARNAT <joel@carnat.net>
List: current-users
Date: 11/29/2007 22:01:29
--RnlQjJ0d97Da+TV1
Content-Type: text/plain; charset=iso-8859-15
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello,

I have an HFS partition on an USB disk.
If if plug it on a Mac Mini, running 4.0_RC3/macppc, I can get the disk
label :
# /dev/rsd1c:
type: SCSI
disk: HM100JC        =20
label: fictitious
flags:
bytes/sector: 512
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 95396
total sectors: 195371568
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0=20
# /dev/rsd1c:
type: SCSI
disk: HM100JC        =20
label: fictitious
flags:
bytes/sector: 512
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 95396
total sectors: 195371568
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0=20

4 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:      1089 195365376    unknown                     # (Cyl.  95393*- 953=
93*)
 c: 195371568         0     unused      0     0        # (Cyl.      0 - 953=
96*)
 d: 195364864       512        HFS                     # (Cyl.      0*- 953=
93*)
disklabel: boot block size 0
disklabel: super block size 0

But I can mount it.
As I understood, HFS support comes with 4.99.x.

On a 4.99.36/i386 box, I plugged the same disk but I just can't get the
disklabel, nor can I mount the partition:

# dmesg ##########
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0: <SAMSUNG, HM100JC, 0811> disk fixed
sd0: fabricating a geometry
sd0: 95396 MB, 95396 cyl, 64 head, 32 sec, 512 bytes/sect x 195371568
sectors
##################
# sudo disklabel sd0
disklabel: could not read existing label
# sudo apmlabel sd0
get label: Inappropriate ioctl for device
# sudo apmlabel /dev/sd0
get label: Inappropriate ioctl for device
# sudo apmlabel /dev/rsd0
get label: Inappropriate ioctl for device
# sudo apmlabel -r /dev/rsd0
get label: Inappropriate ioctl for device

Can I access HFS partition from /i386 ?

TIA,
	Jo


--RnlQjJ0d97Da+TV1
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (NetBSD)

iD8DBQFHTyip0/VH7L7F7Y4RApVwAJwPKKldUaajdCghoxYWQebLXZ0xowCcCXF3
kpwwM1NYJC/HYXpmUZjSTBU=
=nN2D
-----END PGP SIGNATURE-----

--RnlQjJ0d97Da+TV1--