mkntfs doesn't install NTFS's bootcode during formatting
Domagoj Smolčić
rank1seeker at gmail.com
Mon Aug 26 01:32:33 UTC 2019
On Fri, 12 Jul 2019 14:44:29 +0200
Domagoj Smolčić <rank1seeker at gmail.com> wrote:
> On Thu, 11 Jul 2019 12:11:32 +0200
> Jean-Pierre André <jean-pierre.andre at wanadoo.fr> wrote:
>
> > Domagoj Smolčić wrote:
> > > FreeBSD 11.2-RELEASE-p9
> > > fusefs-ntfs-2017.3.23
> > >
> > > When slice/partition is being formatted, bootcode(';
> > containsMicrosoft Windows XP/VISTA bootloader BOOTMGR') isn't
> > applied, thus rendering it unbootable.
> > > Under Win, after 'bootsect /nt60 ...' has been used on NTFS
> > > created
> > with mkntfs, THEN it becomes bootable.
>
> > 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.
>
> 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)
>
> > 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).
>
> 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.
>
> > >
> > > When slice/partition is being formatted directly under Win,
> > > bootcode
> > IS also being applied.
>
> > 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.
>
> 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)
>
> If I do ONLY formating under Win7, then plug it back into FreeBSD,
> copy mentioned files and boot decvice, Win7 installation starts.
>
> > > So, if you need a bootable NTFS, why to bother in a first place
> > > with
> > 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 ?
> >
> > Jean-Pierre
>
>
> I want to use ONLY FreeBSD to create custom bootable Win7 install
> media. Only obstacle left is NTFS's stage 1 bootcode => VBC.
>
> 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?
>
> 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. ;)
>
>
> Domagoj Smolčić
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 one 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 bootable, if not, or improperly set!
I've lost too much time "hanging" here, thinking that I'm blind and don't see obvious!
Somwhere "else", Jean-Pierre has pointed out that UNdocumented change has been 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 accidental!
This is sneaky and subtle manipulation and reasons should be pretty much clear to everyone.
Well ..., let's take it into community's advantage ...
From legal point of view, if something isn't stated, it doesn't exist and doesn'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-2016.2.22.tgz' | tar -xf - -q --include=ntfs-3g_ntfsprogs-2016.2.22/ntfsprogs/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 weren't necessary).
First on partition to boot win7's setup and second on partition of win7's fresh 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 at 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čić
More information about the freebsd-hackers
mailing list