Bug 127017

Summary: sysutils/ntfsprogs - ntfsclone not working version 2.0.0
Product: Ports & Packages Reporter: annona2 <annona2>
Component: Individual Port(s)Assignee: Stefan Walter <stefan>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Makefile.diff none

Description annona2 2008-09-01 04:50:01 UTC
ntfsclone -s in sysutils/ntfsprog version 2.0.0 won't work with default config.
and ntfsclone -r wor't work with DMA mode.
# ntfsclone -s -o ad0s1 /dev/ad0s1
> ntfsclone v2.0.0 (libntfs 10:0:0)
> ERROR(22): Opening '/dev/ad0s1' as NTFS failed: Invalid argument
> Apparently device '/dev/ad0s1' doesn't have a valid NTFS. Maybe you selected
> the whole disk instead of a partition (e.g. /dev/hda, not /dev/hda1)?
> #

Fix: 

only workaround.

when you want to dump, make conifg => LOCK off
and rebuild and install.

when you want to restore,
atacontrol mode ad1 PIO4
will work but slow.
How-To-Repeat: # ntfsclone -s -o ad1s1 /dev/ad1s1
ntfsclone v2.0.0 (libntfs 10:0:0)
ERROR(22): Opening '/dev/ad1s1' as NTFS failed: Invalid argument
Apparently device '/dev/ad1s1' doesn't have a valid NTFS. Maybe you selected
the whole disk instead of a partition (e.g. /dev/hda, not /dev/hda1)?

ntfsclone -r -O /dev/ad1s1 ad1s1
> ntfsclone v2.0.0 (libntfs 10:0:0)
Ntfsclone image version: 10.0
Cluster size           : 4096 bytes
Image volume size      : 8257503232 bytes (8258 MB)
Image device size      : 8257503744 bytes
Space in use           : 1341 MB (16.2%)   
Offset to image data   : 56 (0x38) bytes
Restoring NTFS from image ...
ERROR(5): Write failed: Input/output error
ata1: FAILURE - non aligned DMA transfer attempted
ad1: setting up DMA failed
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-09-01 04:51:46 UTC
Responsible Changed
From-To: freebsd-ports-bugs->farrokhi

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Martin Wilke freebsd_committer freebsd_triage 2008-09-01 09:05:49 UTC
Responsible Changed
From-To: farrokhi->alepulver

could you please take a look?.
Comment 3 Alejandro Pulver freebsd_committer freebsd_triage 2009-02-28 03:12:04 UTC
Responsible Changed
From-To: alepulver->freebsd-ports-bugs

I don't have time to look at it now.
Comment 4 Urankar Mikael 2009-04-22 13:19:57 UTC
it seems ntfsclone doesn't like -02 optimization (at least on i386
since it works without problems on amd64)
a possible workaround is to add CFLAGS= -O0 to Makefile
can someone confirm ?
Comment 5 Stefan Walter freebsd_committer freebsd_triage 2010-05-19 11:16:41 UTC
Hi Mikael,

could you provide a patch against the current version of
sysutils/ntfsprogs that the submitter can test and that could be
committed?

Regards,
Stefan
Comment 6 Stefan Walter freebsd_committer freebsd_triage 2010-05-19 11:16:50 UTC
State Changed
From-To: open->feedback

Waiting for a patch that can be tested. 


Comment 7 Stefan Walter freebsd_committer freebsd_triage 2010-05-19 11:16:50 UTC
Responsible Changed
From-To: freebsd-ports-bugs->stefan

Track this for now.
Comment 8 Urankar Mikael 2010-05-19 13:32:14 UTC
Here it is
Comment 9 dfilter service freebsd_committer freebsd_triage 2010-05-19 21:16:10 UTC
stefan      2010-05-19 20:16:02 UTC

  FreeBSD ports repository

  Modified files:
    sysutils/ntfsprogs   Makefile 
  Log:
  For i386, change compiler optimization flags to -O0, as optimizations seem to
  break things.
  
  PR:             ports/127017
  Submitted by:   annona2@gmail.com
  Patch by:       Urankar Mikael <mikael.urankar@ujf-grenoble.fr>
  
  Revision  Changes    Path
  1.38      +5 -0      ports/sysutils/ntfsprogs/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 10 Stefan Walter freebsd_committer freebsd_triage 2010-05-19 21:19:33 UTC
Urankar Mikael, 19.05.10, 14:32h CEST:

> --- Makefile.orig	2010-05-19 14:20:04.457729999 +0200
> +++ Makefile	2010-05-19 14:23:03.074275034 +0200
> @@ -36,6 +36,10 @@
>  
>  .include <bsd.port.pre.mk>
>  
> +.if ${ARCH} == "i386"
> +CFLAGS:=	${CFLAGS:C/-O.?/-O0/g}
> +.endif
> +
>  .if defined(WITH_GNOMEVFS2)
>  CONFIGURE_ARGS+=--enable-gnome-vfs
>  USE_GNOME=	gnomevfs2

Thanks, I just committed it! If I don't get any reports that this did not
fix the issue during the next days, I will close this PR.

Regards,
Stefan
Comment 11 Stefan Walter freebsd_committer freebsd_triage 2010-05-20 08:49:34 UTC
State Changed
From-To: feedback->patched

Patch committed.
Comment 12 Stefan Walter freebsd_committer freebsd_triage 2010-05-29 18:06:17 UTC
State Changed
From-To: patched->closed

Patch committed more than a week ago and no negative feedback seen since then.
Comment 13 Miroslav Prymek 2011-08-22 19:58:21 UTC
Still doesn't work :( 

> % pkg_info | grep ntfs
> ntfsprogs-2.0.0_2   Utilities and library to manipulate NTFS partitions
> % ntfsclone -r -O /dev/ad0s1 image.ntfsc
> [...]
> Restoring NTFS from image ...
> ERROR(5): Write failed: Input/output error

Unfortunatelly, I would not have enough time to test it in the next few days,
so just reporting the patch has not helped...

regards

Mirek