From owner-freebsd-stable Sun Jan 26 15:37:32 2003 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1395F37B401 for ; Sun, 26 Jan 2003 15:37:30 -0800 (PST) Received: from mail.rotfl.com.au (eth1779.sa.adsl.internode.on.net [150.101.235.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31A8543EB2 for ; Sun, 26 Jan 2003 15:37:28 -0800 (PST) (envelope-from Phil@Kernick.org) Received: by mail.rotfl.com.au (8.12.6/8.12.6) with ESMTP id h0QNbQkO043736 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Mon, 27 Jan 2003 10:07:26 +1030 (CST) (envelope-from Phil@Kernick.org) Message-ID: <3E347133.1090508@Kernick.org> Date: Mon, 27 Jan 2003 10:07:23 +1030 From: Phil Kernick User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-stable@freebsd.org Subject: Making the boot loader recognise Win2k Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I've been using this successfully for months, and I thought it might be useful to others out there. This patch to boot0 that provides WinNT/Win2k/WinXP named support in the boot loader. It does it at the expense of dropping named support for Hurd. The same patch applies to either -STABLE or -CURRENT. At the moment, if you dual-boot FreeBSD/Win2k, in the boot loader shows ??? for Win2k. This is because it doesn't recognise the NTFS partition. This patch adds that back into the loader. Since the loader is *very* tight on space, I've dropped named support for Hurd. It will still work, but now Hurd will show up as ???. I'd like for this to actually get into the tree at some point, but until then, you'll have to apply it manually. Phil. --- boot0.s.1.25.txt Fri Sep 13 15:13:58 2002 +++ boot0.s Fri Sep 13 15:16:28 2002 @@ -13,7 +13,7 @@ # purpose. # -# $FreeBSD: src/sys/boot/i386/boot0/boot0.s,v 1.25 2000/12/19 00:17:36 rnordier Exp $ +# $FreeBSD: src/sys/boot/i386/boot0/boot0.s,v 1.26 2002/07/01 00:00:00 philk Exp $ # A 512-byte boot manager. @@ -364,7 +364,7 @@ # # These values indicate bootable types we know the names of # - .byte 0x1, 0x4, 0x6, 0xb, 0xc, 0xe, 0x63, 0x83 + .byte 0x1, 0x4, 0x6, 0x7, 0xb, 0xc, 0xe, 0x83 .byte 0x9f, 0xa5, 0xa6, 0xa9 # # These are offsets that match the known names above and point to the strings @@ -374,10 +374,10 @@ .byte os_dos-. # DOS .byte os_dos-. # DOS .byte os_dos-. # DOS + .byte os_nt-. # WinNT .byte os_dos-. # Windows .byte os_dos-. # Windows .byte os_dos-. # Windows - .byte os_unix-. # UNIX .byte os_linux-. # Linux .byte os_bsd-. # BSD/OS .byte os_freebsd-. # FreeBSD @@ -389,7 +389,7 @@ # os_misc: .ascii "?"; .byte '?'|0x80 os_dos: .ascii "DO"; .byte 'S'|0x80 -os_unix: .ascii "UNI"; .byte 'X'|0x80 +os_nt: .ascii "WinN"; .byte 'T'|0x80 os_linux: .ascii "Linu"; .byte 'x'|0x80 os_freebsd: .ascii "Free" os_bsd: .ascii "BS"; .byte 'D'|0x80 -- _-_|\ Phil Kernick E-Mail: Phil@Kernick.org / \ ROTFL Enterprises Mobile: 041 61 ROTFL \_.-*_/ v Humourist, satirist, and probably a few more 'ists to boot! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message