Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jan 2003 10:07:23 +1030
From:      Phil Kernick <Phil@Kernick.org>
To:        freebsd-stable@freebsd.org
Subject:   Making the boot loader recognise Win2k
Message-ID:  <3E347133.1090508@Kernick.org>

next in thread | raw e-mail | index | archive | help
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




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