First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 46342
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: PPC Porters <ppc@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Simon Strandman <simon.strandman@telia.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
diskdev_cmds-208.11.ebuild Ebuild for mkfs.hfsplus, mkfs.hfs, fsck.hfsplus and fsck.hfs text/plain Joe Jezak 2004-10-21 19:31 0000 886 bytes Details
hfsplus-tools-208.11.ebuild hfsplus-tools based on the previous patchset text/plain Joe Jezak 2005-03-06 08:04 0000 890 bytes Details
hfsplus-tools-277.2.ebuild hfsplus-tools based on the latest from Apple text/plain Joe Jezak 2005-03-06 08:05 0000 893 bytes Details
hfsplus-tools-277.2.ebuild hfsplus-tools based on the latest from Apple - Stupid typo in last ebuild text/plain Joe Jezak 2005-03-06 08:09 0000 891 bytes Details
hfsplus-tools-332.ebuild hfs-tools-332.ebuild text/plain Florian E 2005-11-12 07:09 0000 918 bytes Details
hfs-tools-332.11.1.ebuild Ebuild for hfs-tools from Apple's Mac OS 10.4.4 text/plain charles bobo 2006-01-15 12:39 0000 1.42 KB Details
hfs-tools-332.14.ebuild hfs-tools-332.14.ebuild text/plain cilly 2006-06-19 09:53 0000 1.44 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 46342 depends on: Show dependency tree
Show dependency graph
Bug 46342 blocks: 61152
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-03-31 03:14 0000
Every time i boot i get the message that my hfs+ disks where not cleanly
unmounted and that i schould run fsck to correct it, and therefore they are
only mounted read-only.

But when i try tu run hpfsck i get this error:

bash-2.05b# hpfsck /dev/hda2
*** Checking Volume Header:
Volume was not cleanly unmounted
Volume is inconsistent
Reserved attribute in use: 2000

Invalid total blocks 182B32, expected 0                                       
Done ***
*** Checking Backup Volume Header:
Unexpected Volume signature '  ' expected 'H+'
hpfsck: hpfsck: This is not a HFS+ volume (Unknown error 4294967295)

I have tried to run fsck from darwin but linux still thinks that they where not
cleanly unmounted.

Reproducible: Always
Steps to Reproduce:
1.Install gentoo on a ppc with a hfs+ partition
2.Try to check the hfs+ partition for errors with hpfsck




bash-2.05b$ emerge info
Portage 2.0.50-r1 (default-ppc-2004.0, gcc-3.3.3, glibc-2.3.2-r9, 2.6.3-benh2)
=================================================================
System uname: 2.6.3-benh2 ppc 750FX
Gentoo Base System version 1.4.3.13
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.7.8
ACCEPT_KEYWORDS="ppc ~ppc"
AUTOCLEAN="yes"
CFLAGS="-O3 -pipe -mcpu=750 -mtune=750 -mpowerpc-gfxopt -fsigned-char
-falign-functions=4 -fomit-frame-pointer -fforce-addr -frerun-loop-opt
-fprefetch-loop-arrays -funroll-loops"
CHOST="powerpc-unknown-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/share/config /var/lib/pbbuttons
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -pipe -mcpu=750 -mtune=750 -mpowerpc-gfxopt -fsigned-char
-falign-functions=4 -fomit-frame-pointer -fforce-addr -frerun-loop-opt
-fprefetch-loop-arrays -funroll-loops"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache"
GENTOO_MIRRORS="http://mirror.pudas.net/gentoo ftp://ftp.rhnet.is/pub/gentoo/
ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/
http://ftp.rhnet.is/pub/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib apm berkdb cdr dga directfb dvd esd fbcon foomaticdb gdbm gif
gnome
gnome-libs gphoto2 gpm gtk gtk2 imlib jpeg libwww linguas_sv mad mikmod mitshm
mng mostif motif mozilla mpeg ncurses nls nptl offensive oggvorbis opengl oss
pam pcmcia perl png pnp ppc python quicktime readline samba sdl slang ssl tcltk
tcpd tiff truetype unicode usb video_cards_radeon xine xml2 xv xvid"

bash-2.05b$ uname -a
Linux Stardust 2.6.3-benh2 #2 Wed Mar 31 10:35:34 CEST 2004 ppc 750FX
PowerBook4,3 GNU/Linux

------- Comment #1 From groepaz@gmx.net 2004-10-07 23:27:01 0000 -------
there is a workaround ... use hpmount to mount the hfs+ partition. it will
result in a simelar error-message BUT hpmount will reset the partition-dirty
bit. hpumount immediatly. now you should be able to mount the partition r/w
normally. however i have also seen warnings about using hpfsck somewhere else,
you probably shouldnt use it. (and resort to the non existing fsck.hfsplus :=P)

------- Comment #2 From Pieter Van den Abeele 2004-10-21 12:56:45 0000 -------
We'd probably need an ebuild for:
http://www.ardistech.com/hfsplus/hfsplus-20040216.tar.gz

If I'm not mistaken this provides the much requested fsck.hfsplus

------- Comment #3 From Simon Strandman 2004-10-21 13:32:17 0000 -------
I have sold my iBook now so I can't test this. But thanks anyway!

------- Comment #4 From Joe Jezak 2004-10-21 16:37:48 0000 -------
Actually, the above is just the hfs+ driver included with the kernel.  To
make/fsck an hfsplus fs you need apple's tools.

Get diskdev_cmds-208.11 from the link below:
http://www.opensource.apple.com/darwinsource/10.2.5/

Now patch it with this patch:
http://www.ardistech.com/hfsplus/diskdev_cmds.diff.gz

And finally, build with:
make -f makefile.lnx

This should build mkfs and fsck for hfs/hfs+

I don't think later version have been ported, and I'm not sure if we can make
an ebuild out of this.

------- Comment #5 From Joe Jezak 2004-10-21 19:31:03 0000 -------
Created an attachment (id=42387) [edit]
Ebuild for mkfs.hfsplus, mkfs.hfs, fsck.hfsplus and fsck.hfs

This ebuild will build the OSX 10.2.5 version of these utilities.  Note that
they do not seem to support journaled fs, if I have time, I'll look into
porting the newer verisons, but there are heaps of patches to go through.

------- Comment #6 From Lars Weiler (RETIRED) 2005-01-09 01:17:47 0000 -------
JoseJX, can you keep an eye on this package, so that it finds it's way into
portage?

------- Comment #7 From Pieter Van den Abeele 2005-02-08 21:55:35 0000 -------
This will not be in the 2005.0 livecd.

------- Comment #8 From Joe Jezak 2005-03-05 19:39:49 0000 -------
Now that I'm back for a bit, I'll try and clean up the ebuild and look at
porting one of the newer versions.  I'm not sure if we want to put this one in
portage, but if I don't have anything soon, I think I will.  Should we rename
the package something more obvious like hfsplus-tools or something like that?

------- Comment #9 From Joe Jezak 2005-03-06 08:04:01 0000 -------
Created an attachment (id=52786) [edit]
hfsplus-tools based on the previous patchset

This *may* work on little endian machines as well, but I'm not sure.

------- Comment #10 From Joe Jezak 2005-03-06 08:05:37 0000 -------
Created an attachment (id=52787) [edit]
hfsplus-tools based on the latest from Apple

I'm pretty sure this won't work yet on little endian machines and I've only
tested some rudimentary things on linux at the moment, so don't use it if you
value your data.

------- Comment #11 From Joe Jezak 2005-03-06 08:09:37 0000 -------
Created an attachment (id=52788) [edit]
hfsplus-tools based on the latest from Apple - Stupid typo in last ebuild

------- Comment #12 From Joe Jezak 2005-03-08 21:44:01 0000 -------
It looks like I missed something in porting 277.2, I'll have to try reworking
that again.  208.11 is probably okay for inclusion in portage, it just doesn't
support some of the new HFS+ features (like case sensitivity).

------- Comment #13 From Markus Rothe 2005-05-06 06:27:16 0000 -------
just a comment: diskdev_cmds-332 is out...

------- Comment #14 From Ortwin Glueck 2005-08-13 09:26:42 0000 -------
People that have an iPOD want to use this under x86 as well. Does the patch
address any endianness issues?

------- Comment #15 From Joe Jezak 2005-11-04 01:58:31 0000 -------
I've ported 332, the patch can be found at
http://dev.gentoo.org/~josejx/diskdev_cmds-332.patch.bz2

Consider it a first draft, it's missing a little bit of error checking, but the
important bits seem fine.  I've tested it on ppc32, both fsck_hfs and newfs_hfs,
on both actual disk partitions and disk images.  I'd appreciate testing on x86
and ppc64, but it should be fine.

------- Comment #16 From Florian E 2005-11-12 07:09:46 0000 -------
Created an attachment (id=72749) [edit]
hfs-tools-332.ebuild

some filenames for the src-files changed in the newest version ported by
JoseJX, so the old ebuild didn't work.

------- Comment #17 From Joe Jezak 2005-11-19 00:06:41 0000 -------
I've updated the patch again to make it work on OSX again to address Kito's
concerns with conditional patching.  Please test again and let me know if this
version works.  If anyone knows of a simple way to test if a disk is mounted,
that would be useful too. :)

http://dev.gentoo.org/~josejx/diskdev_cmds-332-2.patch.bz2

------- Comment #18 From Ortwin Glueck 2005-11-26 07:05:54 0000 -------
doesn't compile on x86:

gcc -g3 -Wall -I/var/tmp/portage/hfsplus-tools-332/work/diskdev_cmds-332/include
-DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64   -c -o newfs_hfs.o newfs_hfs.c
makehfs.c: In function `WriteExtentsFile':
makehfs.c:816: warning: implicit declaration of function `NXSwapBigShortToHost'
makehfs.c:830: warning: implicit declaration of function `NXSwapBigLongToHost'
makehfs.c: In function `WriteJournalInfo':
makehfs.c:959: warning: implicit declaration of function `NXSwapBigLongLongToHost'
gcc -g3 -Wall -I/var/tmp/portage/hfsplus-tools-332/work/diskdev_cmds-332/include
-DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -o newfs_hfs makehfs.o newfs_hfs.o -lssl
makehfs.o: In function `WriteMDB':
/var/tmp/portage/hfsplus-tools-332/work/diskdev_cmds-332/newfs_hfs.tproj/makehfs.c:467:
undefined reference to `hfs_swap_HFSMasterDirectoryBlock'
makehfs.o: In function `WriteVH':
/var/tmp/portage/hfsplus-tools-332/work/diskdev_cmds-332/newfs_hfs.tproj/makehfs.c:612:
undefined reference to `hfs_swap_HFSPlusVolumeHeader'
makehfs.o: In function `WriteExtentsFile':
/var/tmp/portage/hfsplus-tools-332/work/diskdev_cmds-332/newfs_hfs.tproj/makehfs.c:816:
undefined reference to `NXSwapBigShortToHost'
... (hundreds of complaints about undefined references) ...
/var/tmp/portage/hfsplus-tools-332/work/diskdev_cmds-332/newfs_hfs.tproj/makehfs.c:2007:
undefined reference to `NXSwapBigShortToHost'
collect2: ld returned 1 exit status
make[1]: *** [newfs_hfs] Error 1
make[1]: Leaving directory
`/var/tmp/portage/hfsplus-tools-332/work/diskdev_cmds-332/newfs_hfs.tproj'

------- Comment #19 From Florian E 2005-11-28 16:52:50 0000 -------
while patching anyway, what about a linux style option for testing to make it
(gentoo-linux-)init-
compatible? ;)
I get errors at every boot about wrong options and init interprets the exitcode
as "Some Filesystem 
errors were corrected" or something like this

------- Comment #20 From Joe Jezak 2006-01-04 13:45:47 0000 -------
Here's a new patch against the latest version (332.11) which fixes the issues
with x86:

http://dev.gentoo.org/~josejx/diskdev_cmds-332.11.patch.bz2

Perhaps a simple wrapper script would be adequate to fix the fsck on boot
issues?   I'll see what I can come up with.

------- Comment #21 From charles bobo 2006-01-15 12:39:46 0000 -------
Created an attachment (id=77185) [edit]
Ebuild for hfs-tools from Apple's Mac OS 10.4.4

hfs-tools-332.11.1.ebuild uses same patch as hfs-tools-332.11.ebuild,

------- Comment #22 From charles bobo 2006-01-15 12:41:21 0000 -------
hfs-tools-332.11.1 will build on x86 in addition to ppc.

------- Comment #23 From Ortwin Glueck 2006-02-27 13:01:16 0000 -------
Joe, would you mind to symlink diskdev_cmds-332.11.1.patch.bz2 to
http://dev.gentoo.org/~josejx/diskdev_cmds-332.11.patch.bz2 ? (mind the extra
".1") Because the latest ebuild expects this location filename and thus doesn't
currently build.

------- Comment #24 From Ortwin Glueck 2006-02-28 14:12:48 0000 -------
Even with 332.11.1 I can not repair my iPod. It claims that the partition is
mounted, but it actually isn't. The iPod is connected by IEEE-1394 and managed
by the sbp-2 driver.

gimli ~ # fsck -f /dev/sda3
fsck 1.38 (30-Jun-2005)
** /dev/sda3
** Checking HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
   Incorrect number of thread records
(4, 3)
** Checking multi-linked files.
** Checking Catalog hierarchy.
   Invalid directory item count
   (It should be 10 instead of 11)
** Checking volume bitmap.
   Volume Bit Map needs minor repair
** Checking volume information.
   Invalid volume free block count
   (It should be 1429726 instead of 1429829)
** Cannot repair volume when it is mounted with write access.
** The volume My iPod could not be repaired.

------- Comment #25 From Joe Jezak 2006-03-13 22:49:35 0000 -------
Sorry, that was a stupid mistake in the patch, the mount issue should be fixed
now, I updated the patch for 322.11.  I'm cleaning up a few more things and
hope to get this in portage soon.

------- Comment #26 From Brian Tarricone 2006-03-15 12:21:08 0000 -------
(In reply to comment #25)
> Sorry, that was a stupid mistake in the patch, the mount issue should be fixed
> now, I updated the patch for 322.11.  I'm cleaning up a few more things and
> hope to get this in portage soon.

You sure about that?  I downloaded yesterday, and it won't repair *any* volume,
whether it's unmounted, or mounted read-only, claiming it's mounted read-write.

This is using 322.11.1 with your 322.11 patch applied against it.

Also of issue: fsck.hfsplus doesn't accept the -a option, and so it doesn't
work with Gentoo's quick check on system boot.  I patched my local copy to
interpret -a as -y, but I'm not sure that that's the safe/appropriate way to go
(it also takes quite a while to run compared to fsck.ext3).

------- Comment #27 From Chris White (RETIRED) 2006-04-04 22:40:30 0000 -------
This bug looks somewhat old.. forgotten?

------- Comment #28 From Joe Jezak 2006-04-04 23:51:38 0000 -------
It is old, but my last activity on the bug was a month ago. :p  I've just
gotten my new powerbook, so I'll have a look at the hfs+ utils when I get back
from LWE.

------- Comment #29 From cilly 2006-06-19 09:53:38 0000 -------
Created an attachment (id=89543) [edit]
hfs-tools-332.14.ebuild

This is an ebuild which uses the updated version of hfs-tools available on:

http://www.ecl.udel.edu/~mcgee/diskdev_cmds/

Instead of ppc-sources the x86 sources are used.

This is a port from the recently released x86 Darwin kernel OS X 10.4.[5-6] /
Darwin 8.[5-6](x86).

See here for further info about the different patches:

http://gentoo-wiki.com/HOWTO_hfsplus

------- Comment #30 From Tyler McGee 2006-06-19 16:07:39 0000 -------
(In reply to comment #29) Cilly, just thought should comment on your ebuild.

I posted those newer patches in my udel directory in which SRC_URL points.
Josex is the developer of the patches, I simply updated the patches for the
latest darwin kernel. I have emailed josex about them, and he repled would be
adding them to his directory at gentoo at some point. 

Although I have no problem hosting the files for an ebuild; I would recommend
that we keep the SRC_URI pointing to josex's directory, since he has indicated
that he is still developing new patches.

http://www.ecl.udel.edu/~mcgee/diskdev_cmds/_README
http://dev.gentoo.org/~josejx/

------- Comment #31 From Philip Derrin 2006-07-15 07:57:48 0000 -------
(In reply to comment #26)
> Also of issue: fsck.hfsplus doesn't accept the -a option, and so it doesn't
> work with Gentoo's quick check on system boot.  I patched my local copy to
> interpret -a as -y, but I'm not sure that that's the safe/appropriate way to go
> (it also takes quite a while to run compared to fsck.ext3).

It should interpret -a as -p, like e2fsck does. mac os x runs fsck -p at boot
time.

------- Comment #32 From Tyler McGee 2006-08-11 08:49:44 0000 -------
(In reply to comment #31)
> 
> It should interpret -a as -p, like e2fsck does. mac os x runs fsck -p at boot
> time.
> 
Patched hfs-tools for boot check compatibility. 
http://www.ecl.udel.edu/~mcgee/diskdev_cmds/hfs-tools-332.14-r1.ebuild

------- Comment #33 From Ryan Olf 2006-09-14 23:08:05 0000 -------
All of the versions of fsck.hfsplus available here segfault when trying to
check a partition on my iPod.  The output does not get beyond 

** /dev/sdb3
** Checking HFS Plus volume.
Segmentation fault

even with -d flag.  The partition was formatted originally with mkfs.hfsplus on
this same Gentoo system (gentoo-sources 2.6.17-r7).  The error occurs with the
partition both mounted and unmounted.  dmesg claims the filesystem was not
cleanly unmounted, and Gentoo will only mount it read-only.

------- Comment #34 From Ryan Olf 2006-09-14 23:11:00 0000 -------
(In reply to comment #33)
By the way (doh), this is an AMD64 system with CHOST="x86_64-pc-linux-gnu".  Is
there something special one needs to do to compile this on a 64 bit system?

------- Comment #35 From Joe Jezak 2006-11-12 20:23:09 0000 -------
I've added this to portage as diskdev_cmds (the Apple name for it).  As for
AMD64 support, I don't have a machine to test it on, you'll have to figure out
why it's crashing (probably not 64 bit safe) and fix it.  Sorry. :(

If there are any issues with this, please file new bugs.

Thanks!

------- Comment #36 From Todd Partridge 2008-03-26 22:07:54 0000 -------
Someone has found a way to get diskdev commands to work for AMD64 support
haven't tested it though.

http://ubuntuforums.org/showthread.php?p=4591297#post4591297

First Last Prev Next    No search results available      Search page      Enter new bug