From owner-freebsd-hackers@freebsd.org Fri Jul 12 12:45:12 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41D7115EEE9E for ; Fri, 12 Jul 2019 12:45:12 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 11C326F084 for ; Fri, 12 Jul 2019 12:45:11 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: by mail-ed1-x543.google.com with SMTP id k21so9107972edq.3 for ; Fri, 12 Jul 2019 05:45:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ns6sy4Yax6ON/BYRDgk1uPSK3kqQMfOyRxUlC5GugeQ=; b=TmQTZDafsY6gheJPeUn7R7iYXPcvy9YM4TpmIo+YpQvjrLanRUgtAi2MSBV6X5eIaP irpcb6Fpimk6iwdIdUaeRYWgUn4MvpOPpUpjZ0Wxlb2o/NFUVrg/anivSQVztwOG/418 F7yxonVVmyXyIKGA7EUul3ZNGOP4SZPfdLjDt4rHmY4JHtsE9HIz2QykVUUxi9jRq2+B j7BQ7Xk/ra7zET+AHH/YRBNtQ8gjw891D4RbnvjjSdqYOTFa4SlcmWuto+/EW+CFUyJM 94zPWqj//ruShcfpCodXFy+xBEWl2cU0fBACEqMnUcv8kyBY7YQaD4sobRGMixD82jNm EKIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ns6sy4Yax6ON/BYRDgk1uPSK3kqQMfOyRxUlC5GugeQ=; b=S7sZ+gkR+pVcrw3SJD7mGJVuTZW3kyalihNW/e9w7UdNvPoZtHfkbwHSPoGX9aqrzL 6YV7MdFHeqo8tPVfQHGNqrpzYFgdzXfXpMMfs4GbHZSuF1llE8jnDb88pwOaGCDgj2XD 0s7X8raEWjP2pYqQJD5vQPFrcpEtne6puOv5au6ohOx5V2NfcCUSjgdFRGtctVwnZm5S zylKsnDTFsJoUgqGwukVqyXLftEPzDvqUwZwurWITlrxshPS+GHB5isHZLVqziu635sR W8Og8nXCjkx6ra3OCtjKRaIx8jOaxqumIcC6xbO6wHgxKuWaJLchjUZsm5FPOfWFh7JQ f4MA== X-Gm-Message-State: APjAAAVUQ6KxTQryu+moWZQRie2w+3vVZjVCAoYwQUN6TiQfQ2w4Zu9o g7sVP96+5AnhJcRn89dLcraaX/HIVn0= X-Google-Smtp-Source: APXvYqy3qHQtLbXF2Egt5ZHZuXWn8r5IfUA/hf1yqcXSV5fTOexYt551N1+RItk1yxBMs9I7KjjrAw== X-Received: by 2002:a17:906:4d89:: with SMTP id s9mr7969422eju.160.1562935509928; Fri, 12 Jul 2019 05:45:09 -0700 (PDT) Received: from localhost ([213.149.55.215]) by smtp.gmail.com with ESMTPSA id k10sm2532300eda.9.2019.07.12.05.45.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jul 2019 05:45:09 -0700 (PDT) Date: Fri, 12 Jul 2019 14:44:29 +0200 From: Domagoj =?UTF-8?Q?Smol=C4=8Di=C4=87?= To: freebsd-hackers@freebsd.org, Jean-Pierre =?UTF-8?Q?Andr=C3=A9?= Cc: freebsd@dussan.org, ntfs-3g-devel@lists.sf.net Subject: Re: mkntfs doesn't install NTFS's bootcode during formatting Message-ID: <20190712144429.00000776@gmail.com> In-Reply-To: References: <20190710192048.00001ca2@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 11C326F084 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=TmQTZDaf; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of rank1seeker@gmail.com designates 2a00:1450:4864:20::543 as permitted sender) smtp.mailfrom=rank1seeker@gmail.com X-Spamd-Result: default: False [-5.04 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_COUNT_THREE(0.00)[3]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.94)[-0.944,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[3.4.5.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(-1.09)[ip: (-0.07), ipnet: 2a00:1450::/32(-2.89), asn: 15169(-2.44), country: US(-0.06)] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jul 2019 12:45:12 -0000 On Thu, 11 Jul 2019 12:11:32 +0200 Jean-Pierre Andr=C3=A9 wrote: > Domagoj Smol=C4=8Di=C4=87 wrote: > > 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. > > Under Win, after 'bootsect /nt60 ...' has been used on NTFS > > created =20 > 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 B= OOTMGR(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" NT= FS. > > > > When slice/partition is being formatted directly under Win, > > bootcode =20 > 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 boo= t. It does after after 'bootsect /nt60 ...' is executed under Win7. (anoying p= art) If I do ONLY formating under Win7, then plug it back into FreeBSD, copy men= tioned files and boot decvice, Win7 installation starts. > > 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 I want to use ONLY FreeBSD to create custom bootable Win7 install media. Only obstacle left is NTFS's stage 1 bootcode =3D> VBC. I believe I've located it's position and size in slice (7k or 8k, can't rem= ember) So I'll attempt to extract it with dd tool and later apply it just after mk= ntfs. But then again, I believe (searching at a first glance) that this functiona= lity 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 EXCEPTIO= NS 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 complai= n ... everything is clear. ;) Domagoj Smol=C4=8Di=C4=87