mkntfs do not work, whatever FreeBSD version. badly ported from Linux, it wants block devices, and infinite loop when forcing on character device (if using libublio). also, the libntfs uses bad defines to get disk geometry. Fix: I made these two patches (for libntfs, and mkntfs) Also: with the patch mkntfs, I correct the infinite loop using libublio. The problem is that ublio reads out of disk, because of UBLIO_BLOCK_SIZE defined to 262144. When reading on a entire drive, there's no problem, but when working on parts, ublio returns a negative value, not handled by mkntfs. but, my patch only avoid the infinite loop. the problem is still that mkntfs failed writing the end boot sector. user would have to chkdsk under windows to repair its partition. I think a way to avoid that may be, for example, UBLIO_BLOCK_SIZE=`expr 63 '*' 255` mkntfs $dev. Anyway, without libublio support, the partition is just fine. There's still a thing I didn't fixed: when chkdsk on 'correct' partition, it says that the $UpCase file is invalid. Indeed, a few differences. I'll make an other patch to get rid of it (it's at my office, I don't work every day) Patch attached with submission follows: How-To-Repeat: mkntfs /dev/ad0s1 > not block device mkntfs /dev/ad0s1 > infinite loop also, warning about bad geometry (and using pointless default values)
Responsible Changed From-To: freebsd-ports-bugs->makc I'll take it.
Hi I just ran some tests, this patch seems to correct ntfsresize problems also. I still didn't have time to look at the $UpCase problem. ntfsprogs-2.0.0 is supposed to generate the Vista version of the $UpCase file. But I've got 3 different versions of this file (generated by Vista, XP, and ntfsprogs-2.0.0) Maybe the easier way to fix it would be to use the ntfsprogs-1 version of that file (also different, I didn't test it, but I assume it have been working some day) Whatever, I'll take time to look at it. The problem I'm trying to fix now is the libublio support. I think the solution may looks like that: --- libntfs/unix_io.c 2010-03-23 15:04:46.000000000 +0100 +++ libntfs/unix_io.c 2010-03-23 15:06:57.000000000 +0100 @@ -183,6 +183,7 @@ #if USE_UBLIO struct ublio_param up; int use_ublio = 0; + u_int secpt = 0; char *xenv, *xgarbage; #endif @@ -220,7 +221,15 @@ if ((xenv = getenv("UBLIO_BLOCKSIZE"))) up.up_blocksize = strtoul(xenv, &xgarbage, 10); if (!xenv || *xgarbage != '\0') + { +#ifdef DIOCGFWSECTORS + if (ioctl(ufh->fd, DIOCGFWSECTORS, &secpt) == 0) + up.up_blocksize = secpt * 5 * 512; + else +#endif up.up_blocksize = UBLIO_DEFAULT_BLOCKSIZE; + } +fprintf(stdout, "tada: sec/track=%u; blksize=%u;\n", secpt, up.up_blocksize); if ((xenv = getenv("UBLIO_ITEMS"))) up.up_items = strtoul(xenv, &xgarbage, 10); if (!xenv || *xgarbage != '\0') I don't understand why, but it's still not working. Whatever, I'll forward you the correct patch, when I'll get it. Cheers, Samuel Martín Moro {EPITECH.} tek4 CamTrace S.A.S
Sorry for the previous mails. It seems that the previous quoted mails (or too long posts) are not correctly handled by the PR site. Whatever, the previous post provide the cat of my five patches. for the record: -ntfsresize is now working -mkntfs is now working, with and without libublio, on usb sticks or drives -$UpCase file as XP generates it -less warnings about redefined macros also: it seems I was compairing the $UpCase file generated by ntfsprogs2 (Vista-like) with a Windows 7's one. So, maybe the original ntfsprogs2 $UpCase file was correct. (yep, pebkac, but since XP, I stoped using winwin) But, when one run chkdsk on a ntfs filesystem, if we used vista or 7 to generate the checked partition, it would fail on older windows versions, and it would rewrite the $UpCase file to match current Window's version. So, I still think it's a better way to format a NTFS device using XP $UpCase file, wich would pass every chkdsk without causing any troubles. Cheers, Samuel Martín Moro {EPITECH.} tek4 CamTrace S.A.S
Responsible Changed From-To: makc->freebsd-ports-bugs Release, don't have ntfs now.
Responsible Changed From-To: freebsd-ports-bugs->makc "Grab again."
makc 2011-03-17 16:21:09 UTC FreeBSD ports repository Modified files: sysutils/ntfsprogs Makefile distinfo sysutils/ntfsprogs/files patch-libntfs-device.c Added files: sysutils/ntfsprogs/files patch-libntfs-unistr.c patch-ntfsprogs-mkntfs.c Log: Fix mkntfs Replace Vista's $UpCase file by a Windows XP one Pass maintainership to submitter Remove md5 sum while I'm here PR: ports/144852 Submitted by: Samuel Martin Moro <faust64 at gmail.com> Revision Changes Path 1.39 +2 -2 ports/sysutils/ntfsprogs/Makefile 1.9 +0 -1 ports/sysutils/ntfsprogs/distinfo 1.4 +123 -24 ports/sysutils/ntfsprogs/files/patch-libntfs-device.c 1.1 +138 -0 ports/sysutils/ntfsprogs/files/patch-libntfs-unistr.c (new) 1.1 +31 -0 ports/sysutils/ntfsprogs/files/patch-ntfsprogs-mkntfs.c (new) _______________________________________________ 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"
State Changed From-To: open->closed Committed.