LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1510|回复: 6

弱弱地问一下:哪个发行版支持读取MAC的HFS分区格式?

[复制链接]
发表于 2005-3-9 11:13:41 | 显示全部楼层 |阅读模式
偶现在要读取那里面的内容,没有办法搞定呀! :help
发表于 2005-3-9 11:21:20 | 显示全部楼层
Yellow dog
fedora 和 mandrake 等等都有专门为 ppc 准备的版本
你不会是想在 x86 机器上读那块硬盘吧?那样的话,编译一下内核
也许还要安装一些工具?
回复 支持 反对

使用道具 举报

发表于 2005-3-9 11:24:29 | 显示全部楼层
只要内核支持,哪个发行版无所谓。记得编译内核时见过支持HFS的选项。参考一下这个:
http://pag.lcs.mit.edu/~adonovan/hacks/ipod.html
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-3-9 19:46:37 | 显示全部楼层
晕,偶刚把FC3装上了,难道说要再重新来一遍?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-3-9 19:48:02 | 显示全部楼层
编译内核是不是太高深一点了呀,我还以为可以直接安装完就可以用呢,我找找编译内核的资料去.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-3-10 12:20:34 | 显示全部楼层
今天直接把盘放进去,提示没有无法挂载选中的卷:You Must specify the filesystem type
回复 支持 反对

使用道具 举报

发表于 2005-3-27 05:31:40 | 显示全部楼层
那个网站上的东东

An alternative approach, suggested by Erik Steffl (steffl at bigfoot dot com), is not to convert the iPod to use FAT32, but to use Linux's HFS+ drivers to access the Apple filesystem that the iPod has when it leaves the factory. This approach sounds more straightforward, if your kernel has HFS+ support. PLEASE NOTE that this approach is not guaranteed to work either, and while many users report success, others have reported problems.

Alternative approach: using HFS+

Regarding using HFS+ drivers and not reformatting the iPod to FAT32, Erik Steffl (steffl at bigfoot dot com) says:

    "I got a response from gnupod's Adrian Ulrich, the problem was that I was missing mac style partitions in my kernel (I had HFS+ but I wasn't aware of the need for the different partition style). In addition to that only the parted tool recognizes Mac-style partitions (fdisk, sfdisk, sfdisk don't).

    "In the end I didn't convert my iPod to FAT32, I am using the HFS+ driver (kernel 2.4.21), and it seems to work (I used gtkpod to copy MP3s to the iPod)."

    In order to do this, Erik mentions you need the HFS+ driver, Mac-style partition support, and the parted tool. He refers you to Adrian Ulrich's updated gnupod documents which describe this process. Please note, kernel support for Mac partitions, and and the parted tool, are both requirements; fdisk will not work.

Mattes K. (mattes at mykmk dot com) confirms that the HFS approach works with kernel 2.6.3-2.1.253.2.1 (Fedora Core release 1.91, FC2) and an off-the-shelf IEEE1394 PCI card. He was able to mount the pod simply by issuing: mount -t hfsplus /dev/sda3 /mnt/ipod.

    "Good job with the info you put together there for the ipod. I got my ipod mounted in a snap. Thought I let you know how helpful your pointers are. [...] Started 'gtkpod' and click on 'read iTunesDB' and it works. I couldn't believe how easy that went. What I like about it most: "no iPod disk conversion necessary". Played existing content from the iPod and added some new MP3 to the iPod. Thought I let you know. thanx for putting all the info together. As well thanx to the folks who made 'gtkpod' available."

Corrin Lakeland (lakeland at cs.otago.ac.nz) reports that reading HFS+ works, but writing was problematic; also, he suggests that USB can be used as a more straightforward alternative to FireWire:

    1) I got a USB cable with my iPod for about $25 extra. Since a PCI firewire card is about the same, this seemed a good idea and cuts out a lot of work. I would recommend anybody without firewire gets the cable instead of a PCI card.

    2) Running kernel 2.6.7 I was able to mount the ipod right from when I got it by issuing the command: mount -t hfsplus /dev/sda3 /mnt/ipos.
    However, write support seemed unreliable and despite using uid=1002 in /etc/fstab, I kept having all files owned by root (or some user 99 which doesn't exist on my system). Sometimes comamnds worked, frequently the failed. I spent quite a lot of hours before I finally gave up and swapped to vfat. I hope that in a few kernels, hfsplus will work for everyone.

Andy Goth (unununium at openverse.com) also reports problems using the HFS+ approach:

    Everything was going fine with my iPod until my system halted in the middle of a sync. I guess I should have used a newer kernel (2.4.22).

    Anyway, now the iPod's data partition (HFS+ format) is marked as not having been cleanly unmounted, therefore I cannot write to it. If that was the only problem, I could fix it with a little bit fiddling or commenting out checks in the kernel driver. But there's also some corruption. The iPod itself still runs fine, playing the [only] song that was on it prior to the failed sync.

    Klaus Halfmann's hfsplus tools (hpls, etc.) report a filesystem state more-or-less consistent with the iPod's actual behavior (i.e. only that one song is listed). But hpfsck reports inconsistencies. At present there's no code to repair filesystem problems. (Klaus: "lease give me time :-)")

    The Linux driver, on the other hand, shows all the new files I added in the sync (up to the point of failure, I imagine) and also indicates the removal of the original song (which is correct). I'm curious how different programs (iPod and hpls versus Linux hfsplus) can read the same directory differently.

    The upshot is, I can't write anything more to the iPod until I do one of the following:
    - Wait for hpfsck to grow some repair code
    - Connect my iPod to a Mac OS X system and use DiskFirstAid
    - (Maybe) Connect my iPod to a PC running MS-Windows and iTunes
    - Reformat to use FAT32 (ick?)
    I know of a Mac OS X system I could use, but there's a bit of a commute, I might need root access or something to do the repairs I need, and the machine is nominally reserved for graphics work. So it's chancy.

    There's probably an iPod Restore tool on the iPod CD, but I need Mac OS X or MS-Windows to use it. I'll probably have an easier time finding a Windows PC than a Mac computer, so most likely this is what I'll do.

    What does this mean for your guide? Post a warning against unplugging the iPod or rebooting (or crashing) the machine while it's mounted. And underline it. State that at present there are no Linux tools for creating or repairing HFS+ partitions.

    One last thing. On my system with my iPod, /dev/sda1 appears to be an "Apple_partition_map", /dev/sda2 is the iPod program (starting with a hilarious ASCII stop sign), and /dev/sda3 is the data partition. This is contrary to your guide. Maybe my system's too old or misconfigured, or misread your guide. But I just thought I should point it out.

(Note that the partition map Andy refers to, shown in step 3 of the FAT conversion, is the state after FAT conversion, not the state as the unit arrives from the factory.)

Shields (shields at msrl.com) confirms Andy's observation of the factory-set HFS+ partition map:

    I can confirm that this is the case for 4G (click wheel) iPods. Here is the factory partition map for a 40 GB iPod:

        #                 type name             length   base  (size)   system
/dev/sda1  Apple_partition_map partition map        62 @ 1     (31.0k)  Partition map
/dev/sda2           Apple_MDFW firmware          65536 @ 63    (32.0M)  Unknown
/dev/sda3            Apple_HFS disk           78060448 @ 65599 (37.2G)  HFS

Block size=512, Number of Blocks=78126048
DeviceType=0x0, DeviceId=0x0



An even simpler workaround, and possibly the most reliable method, is to avoid doing the FAT conversion process from Linux, and do it from a Windows-based PC, using the Apple-sanctioned conversion tool. Once this is done, you can use the iPod from Linux in the usual way. Obviously, this way requires you to have temporary access to a machine running MS Windows.

If you decide to do the conversion, don't mess around with Wine, or with WinniePod Updater, the Apple-sanctioned tool for HFS-to-FAT32 conversion. The GNU instructions for how to convert are sufficient and require only fdisk, dd and mkfs.vfat which are standard UNIX tools.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表