Boot loader cant identify ntfs?

Phil Kernick Phil at
Fri May 20 19:12:55 PDT 2005

Torfinn Ingolfsen wrote:
> On Thu, 19 May 2005 19:19:59 +1000
> Peter Jeremy <PeterJeremy at> wrote:
>>It would probably be possible to pad the available space with other
>>"common" partition types.
> My proposal is this; don't change anything in the FreeBSD bootloader.
> People who want a fancier / more verbose / more readable boot menu - use
> another boot manager. There are enough of them.

I submitted a patch for this in January 2003, but since no-one is prepared 
to actually own the bootloader code, it didn't ever get committed.


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.



-------------- next part --------------
--- 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

More information about the freebsd-stable mailing list