Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Aug 2019 03:31:17 +0200
From:      Domagoj =?UTF-8?Q?Smol=C4=8Di=C4=87?= <rank1seeker@gmail.com>
To:        freebsd-hackers@freebsd.org
Cc:        Jean-Pierre =?UTF-8?Q?Andr=C3=A9?= <jean-pierre.andre@wanadoo.fr>, freebsd@dussan.org, ntfs-3g-devel@lists.sf.net
Subject:   Re: mkntfs doesn't install NTFS's bootcode during formatting
Message-ID:  <20190826033117.000003dc@gmail.com>
In-Reply-To: <20190712144429.00000776@gmail.com>
References:  <20190710192048.00001ca2@gmail.com> <qg720k$5j80$1@blaine.gmane.org> <20190712144429.00000776@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 12 Jul 2019 14:44:29 +0200
Domagoj Smol=C4=8Di=C4=87 <rank1seeker@gmail.com> wrote:

> On Thu, 11 Jul 2019 12:11:32 +0200
> Jean-Pierre Andr=C3=A9 <jean-pierre.andre@wanadoo.fr> wrote:
>=20
> > Domagoj Smol=C4=8Di=C4=87 wrote: =20
> > > FreeBSD 11.2-RELEASE-p9
> > >      fusefs-ntfs-2017.3.23
> >  >
> >  > When slice/partition is being formatted, bootcode(';    =20
> > containsMicrosoft Windows XP/VISTA bootloader BOOTMGR') isn't
> > applied, thus rendering it unbootable. =20
> >  > Under Win, after 'bootsect /nt60 ...' has been used on NTFS
> >  > created    =20
> > with mkntfs, THEN it becomes bootable. =20
>=20
> > This BOOTMGR bootcode is proprietary, and it depends on the
> > targeted Windows version, hence mkntfs cannot insert it.
> > However mkntfs creates the boot sector of the partition, which
> > is part of the ntfs file system structure. =20
>=20
> I believe you talk about volume boot record (VBR) being installed.
> Yes, but it doesn't install it's part: volume boot code(VBC) whic
> targets BOOTMGR(stage 2)
>=20
> > Nevertheless can you explain in what circumstances this would
> > be useful. On several occasions, I have formatted an ntfs
> > partition before installing Window 7 or Windows 10, and these
> > installers insert the boot code they want without formatting
> > the partition. I do not have XP or Vista any more, but I
> > would be very surprised if they do not insert their own boot
> > code as well (possibly while reformatting the partition). =20
>=20
> Installers are out of scope here.
> Goal is to start installer itself, residing on NTFS
> I'm talking about lowest level of boot procedure, JUST after BIOS
> "hits" NTFS.
>=20
> >  >
> >  > When slice/partition is being formatted directly under Win,
> >  > bootcode    =20
> > IS also being applied. =20
>=20
> > No, this is not done while formatting. The Windows formatting
> > is limited, and the full formatting occurs when the partition
> > is mounted the first time. So, when upgrading Windows, you can
> > format with the old version before installing the new one. =20
>=20
> You are wrong. I've tested it's presence with hex.
> After mkntfs, I copy files(install procedure for Win7) and device
> won't boot. It does after after 'bootsect /nt60 ...' is executed
> under Win7. (anoying part)
>=20
> If I do ONLY formating under Win7, then plug it back into FreeBSD,
> copy mentioned files and boot decvice, Win7 installation starts.
>=20
> >  > So, if you need a bootable NTFS, why to bother in a first place
> >  > with    =20
> > mkntfs, then transferring device to Win machine and using command
> > line under Win to run 'bootsect' tool, when you can simply click
> > 'Format...' & Start?!?
> > Can you explain what you want to boot into ?
> >=20
> > Jean-Pierre =20
>=20
>=20
> I want to use ONLY FreeBSD to create custom bootable Win7 install
> media. Only obstacle left is NTFS's stage 1 bootcode =3D> VBC.
>=20
> I believe I've located it's position and size in slice (7k or 8k,
> can't remember) So I'll attempt to extract it with dd tool and later
> apply it just after mkntfs. But then again, I believe (searching at a
> first glance) that this functionality exited and was removed because
> of a "proprietary issues". So versions older than
> ntfs-3g-2016.2.22-2, should be used. I believe it was about
> "ntfsprogs/boot.c". Can anyone confirm this?
>=20
> How about updating FreeBSD's license by keeping it BSD, but adding
> EXCEPTIONS for Microsoft and other big corporations with same
> "proprietary issues". In life, it is important to be equal in justice
> to each other. If they claim it's ok and normal, just do the same to
> them. If they complain ... everything is clear. ;)
>=20
>=20
> Domagoj Smol=C4=8Di=C4=87


So ... I wondered why changelog doesn't have to say anything about "feature"
removal, or to better say a degradation?
    https://www.tuxera.com/community/release-history/

Official note on 'STABLE Version 2016.2.22 (March 21, 2016)' is the last on=
e listing
'Changes to mkntfs' and it says NOTHING about functionality removal.
What is even worse, man pages are left to be misleading and here I mean on =
mkntfs's flags:
  -p, -S & -H, which all and mkntfs itslef warns that NTFS won't be bootabl=
e, if not, or improperly set!
I've lost too much time "hanging" here, thinking that I'm blind and don't s=
ee obvious!

Somwhere "else", Jean-Pierre has pointed out that UNdocumented change has b=
een done to boot.c file.
And to use v2016.2.22 or below in order to be able to create bootable NTFS =
with mkntfs.

No one is going to convince me, that this uninforming act is simply acciden=
tal!
This is sneaky and subtle manipulation and reasons should be pretty much cl=
ear to everyone.

Well ..., let's take it into community's advantage ...
=46rom legal point of view, if something isn't stated, it doesn't exist and d=
oesn't apply, therefore, can't provoke any legal act.
So ..., let's make NTFS-3G into accordance with it's official and currently=
 effective release history AND man pages!


# cd /usr/ports/sysutils/fusefs-ntfs
# make config
    Maintainer should add here another option to chose from, named:
       FETCH DA PATCH
    Hell it even rhymes! :D
And it would do:
# make extract
# fetch -qo - 'https://download.tuxera.com/opensource/ntfs-3g_ntfsprogs-201=
6.2.22.tgz' | tar -xf - -q --include=3Dntfs-3g_ntfsprogs-2016.2.22/ntfsprog=
s/boot.c --strip-components 2 -C work/ntfs-3g_ntfsprogs-2017.3.23/ntfsprogs

# make install clean


TEST: Created 2 NTFSs with mkntfs, with only -p flag specified (-S & -H wer=
en't necessary).
First on partition to boot win7's setup and second on partition of win7's f=
resh installation.
They BOTH booted!
Voila!


Resulting installation (functionality in accordance with official docs and =
mans):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Origin:
    sysutils/fusefs-ntfs
Name:
    fusefs-ntfs-2017.3.23

    Mount NTFS partitions (read/write) and disk images


Architecture:
    FreeBSD:11:i386


Maintainer's email:
    freebsd@dussan.org


Home page:
    https://www.tuxera.com/community/open-source-ntfs-3g/
Installed at:
    24-08(August)-2019 17h:11m:30s (UTC)

License(s):
    GPLv2+


On install:
NTFS-3G has been installed, for information, known issues and how to report
bugs see the FreeBSD README:

/usr/local/share/doc/ntfs-3g/README.FreeBSD

Also see the official README (but has some Linux specific parts).


Listing fusefs-ntfs-2017.3.23's installed files:

    Licence's dir:
        /usr/local/share/licenses/fusefs-ntfs-2017.3.23/

    Shared objects:
        /usr/local/lib/libntfs-3g.so
        /usr/local/lib/libntfs-3g.so.88
        /usr/local/lib/libntfs-3g.so.88.0.0

    (s)bin:
        /usr/local/bin/lowntfs-3g
        /usr/local/bin/ntfs-3g
        /usr/local/bin/ntfs-3g.probe
        /usr/local/bin/ntfscat
        /usr/local/bin/ntfscluster
        /usr/local/bin/ntfscmp
        /usr/local/bin/ntfsfix
        /usr/local/bin/ntfsinfo
        /usr/local/bin/ntfsls
        /usr/local/sbin/mkntfs
        /usr/local/sbin/ntfsclone
        /usr/local/sbin/ntfscp
        /usr/local/sbin/ntfslabel
        /usr/local/sbin/ntfsrecover
        /usr/local/sbin/ntfsresize
        /usr/local/sbin/ntfsundelete

    man: (Section 3 excluded)
        # man 8 mkntfs
        # man 8 ntfs-3g
        # man 8 ntfs-3g.probe
        # man 8 ntfscat
        # man 8 ntfsclone
        # man 8 ntfscluster
        # man 8 ntfscmp
        # man 8 ntfscp
        # man 8 ntfsdecrypt
        # man 8 ntfsfallocate
        # man 8 ntfsfix
        # man 8 ntfsinfo
        # man 8 ntfslabel
        # man 8 ntfsls
        # man 8 ntfsprogs
        # man 8 ntfsrecover
        # man 8 ntfsresize
        # man 8 ntfssecaudit
        # man 8 ntfstruncate
        # man 8 ntfsundelete
        # man 8 ntfsusermap
        # man 8 ntfswipe


Space consumption: 1.58MiB


The ntfs-3g driver is an open source, freely available read/write NTFS
driver, which provides safe and fast handling of the Windows XP, Windows
Server 2003, Windows 2000, Windows Vista, Windows Server 2008, Windows 7
and Windows 8 NTFS file systems. Almost the full POSIX filesystem
functionality is supported, the major exceptions are changing the file
ownerships and the access rights.

WWW: https://www.tuxera.com/community/open-source-ntfs-3g/




Other files:
    /usr/local/lib/libntfs-3g.a
    /usr/local/share/doc/ntfs-3g/README
    /usr/local/share/doc/ntfs-3g/README.FreeBSD
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Have a fun crew! ;)

Domagoj Smol=C4=8Di=C4=87



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190826033117.000003dc>