LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   How to mount HFS+ (journaled) hardisk? (https://www.linuxquestions.org/questions/slackware-14/how-to-mount-hfs-journaled-hardisk-261238/)

carboncopy 12-01-2004 05:00 AM

How to mount HFS+ (journaled) hardisk?
 

Hi!

I would like to mount a firewire attached harddisk fdisk and formated using Mac Os X.

The filesystem is hfs+ (journaled). It has Apple style slice partitions.

I think my kernel is compiled to support that. And HFS+ of course (can mount hfs+ cds).

I have

Code:

hfs
xhfs

installed.
using hfs /dev/sda gave me the following output:

Code:


root@fire:~# hfs /dev/sda
hfsutils version 3.2.6 - Copyright (C) 1996-1998 Robert Leslie
This is free software but comes with ABSOLUTELY NO WARRANTY.
Type `license' for details.

/dev/sda contains 1 HFS partition
partition unspecified; selecting number 1
can't mount volume: not a Macintosh HFS volume (Invalid argument)
    while executing
"hfs mount $path $partno"
    (procedure "hmount" line 20)
    invoked from within
"hmount /dev/sda"
    ("eval" body line 1)
    invoked from within
"eval hmount $argv"
    invoked from within
"if {$argc > 0} {
    eval hmount $argv
}"
    (file "/usr/bin/hfs" line 457)

Any help would be of use. Thanks.

Cedrik 12-01-2004 05:04 AM

You need hfsplus feature compiled as built-in or as module in your kernel.

/sbin/modprobe -l | grep hfsplus # if compiled as module, modprobe it
cat /proc/filesystems

Did you try to mount it with the mount command ?
mount -t hfsplus /dev/sda /mnt/macdrive_mountpoint

carboncopy 12-01-2004 05:04 AM

The following information I got it from parted

Code:

Using /dev/sda
Information: The operating system thinks the geometry on /dev/sda is 29325/64/32.  Therefore, cylinder 1024 ends at
1023.999M.
(parted) p
Disk geometry for /dev/sda: 0.000-29325.515 megabytes
Disk label type: mac
Minor    Start      End    Filesystem  Name                  Flags
1          0.000      0.031              Apple
3        128.031  29325.507              Apple_HFS_Untitled_2
(parted)


Cedrik 12-01-2004 05:07 AM

So, does the mount command return errors ? Maybe it is hfs, not hfsplus

mount -t hfs /dev/sda3 /mnt/mount_point

carboncopy 12-01-2004 05:11 AM

Quote:

Originally posted by Cedrik
You need hfsplus feature compiled as built-in or as module in your kernel.

/sbin/modprobe -l | grep hfsplus # if compiled as module, modprobe it
cat /proc/filesystems

Did you try to mount it with the mount command ?
mount -t hfsplus /dev/sda /mnt/macdrive_mountpoint

No there is no hfsplus in /proc/filesystems
There is hfs though. I am positive I can mount hfs+ cd with it.

hfsplus is not one of the switch identified by mount. only hfs.

I tried mount -t hfs /dev/sda /mnt/mountpoint and get
wrong fs type, bad superblock on /dev/sda

Sigh.. Thanks Cedrik for your suggestions.

Cedrik 12-01-2004 05:17 AM

Your cd are not in hfs+ if you mount it successfully with hfs, you need definitivly hfsplus feature enabled in kernel
config. Example : when I try to mount the Panther install CD with hfs (not hfsplus) I see only a few files but if I
mount it with hfsplus, I see all the files.

carboncopy 12-01-2004 08:21 AM

:)
Thanks. I have downloaded the hfsplus from http://www.ardistech.com/hfsplus/
In the process of compiling the patched kernel. Taking this opportunity to migrate to 2.6.9. Have been stuck with 2.6.7 since 2.6.8.1 didn't work for me.

Do I need to upgrade my hfs tools to include hfsplus? If yes, how do I go about it?

Cedrik 12-01-2004 08:58 AM

Frankly I use only the hfsplus (compiled as module) that come with standard kernel sources, I never
patched the kernel for that and I use mount command to mount hfs / hfs+ drives, I never used other
softwares than mount.

Why did you need the patch, your hfsplus driver didn't work ?

carboncopy 12-01-2004 09:13 AM

Quote:

Originally posted by Cedrik
Frankly I use only the hfsplus (compiled as module) that come with standard kernel sources, I never
patched the kernel for that and I use mount command to mount hfs / hfs+ drives, I never used other
softwares than mount.

Why did you need the patch, your hfsplus driver didn't work ?

The problem is, I did compile in hfsplus driver but it didn't appear in /proc/filesystem (before patch). Therefore I assumed that the kernel does not have it and had to be patched.

Am recompiling a clean 2.6.9 without patch now. Will post the results here later. man pages sieze to work after migrating to 2.6.9.

EDITED: Do I compile both hfs and hfsplus? Or just hfsplus?

Cedrik 12-01-2004 09:19 AM

if hfsplus is not listed in /proc/filesystem and you enabled it as module in kernel config, just
modprobe hfsplus befor cat /proc/filesystem

To mount a drive you don't need to modprobe the module when using mount, it is loaded
automatically

carboncopy 12-01-2004 09:30 AM

I compiled hfsplus in to the kernel (built-in) not as module (2.6.7 and 2.6.9-1st attempt). Still trying again. And waiting for the kernel to compile now.

Cedrik 12-01-2004 09:38 AM

If it fails again, try to compile it as module, it always worked for me this way. I have 2 modules,
hfs and hfsplus and they are loaded when I mount an apple cdrom (I added filesystem hfs and
hfsplus in fstab for cdrom) or when I mount a drive with -t hfs or -t hfsplus

carboncopy 12-01-2004 10:14 AM

It works!

EDITED: If I knew I can read/write HFS+ drives I would have save quite a sum of money on harddisk enclosures.
Got it working by compiling hfs and hfsplus in 2.6.9 kernel as modules.


Thanks Cedrik for your patient, and ideas.


All times are GMT -5. The time now is 10:17 AM.