boot0 screen output with dual-boot of FreeBSD / WinXP

John Reynolds johnjen at reynoldsnet.org
Thu Oct 16 07:11:42 PDT 2003


Hello all, a quick question about boot0. I recently put together a new machine
and had always planned to dual-boot FreeBSD -current and WinXP on it. At first
I used FreeBSD to partition the 120Gb drive into roughly "half". I installed
FreeBSD on the second slice and just last night installed XP onto the first
"partition" (windows term). Of course XP clobbered the boot manager, but having
rescued it before from win98 I booted from the CD and chose the 'W' option
within the partition stage to get my boot mgr back.

After rebooting from there I see:

  F1 ??
  F2 FreeBSD

at the prompt once the machine boots. My fuzzy memory seems to recall from
years back that seeing ??'s was "bad" as it meant the boot mgr couldn't find
out something it wanted. I chose both F1 and F2 in multiple boots and each OS
boots fine and acts normal.

I dug into the boot0 code a little bit trying to see why ?? was printed and not
something else. First off I used /stand/sysinstall again to see what the
partition type was. This is what it showed me:

 Disk name:      ad2                                    FDISK Partition Editor   
 DISK Geometry:  14593 cyls/255 heads/63 sectors = 234436545 sectors (114470MB)  

 Offset       Size(ST)        End     Name  PType       Desc  Subtype    Flags   

          0         63         62        -     12     unused        0
         63  104856192  104856254    ad2s1      4 NTFS/HPFS/QNX        7
  104856255  129580290  234436544    ad2s2      8    freebsd      165
  234436545       5103  234441647        -     12     unused        0            

Then I dug into the code a bit and saw this:

  # These values indicate bootable types we know the names of
  #
  		.byte 0x1, 0x4, 0x6, 0xb, 0xc, 0xe, 0x83
  		.byte 0x9f, 0xa5, 0xa6, 0xa9
  
  # These are offsets that match the known names above and point to the strings
  # that will be printed.
  #
  		.byte os_misc-. 		# Unknown
  		.byte os_dos-.			# DOS
  		.byte os_dos-.			# DOS
  		.byte os_dos-.			# DOS
  		.byte os_dos-.			# Windows
  		.byte os_dos-.			# Windows
  		.byte os_dos-.			# Windows
  		.byte os_linux-.		# Linux
  		.byte os_bsd-.			# BSD/OS
  		.byte os_freebsd-.		# FreeBSD
  		.byte os_bsd-.			# OpenBSD
  		.byte os_bsd-.			# NetBSD
  #
  # And here are the strings themselves. 0x80 or'd into a byte indicates 
  # the end of the string. (not so great for Russians but...)
  #
  os_misc:	.ascii "?";    .byte '?'|0x80
  os_dos: 	.ascii "DO";   .byte 'S'|0x80
  os_linux:	.ascii "Linu"; .byte 'x'|0x80
  os_freebsd:	.ascii "Free"
  os_bsd: 	.ascii "BS";   .byte 'D'|0x80
  
So, it appears that partition type "7" just isn't a "known" type. Other
partition types seem to just "map" to print "DOS" (or whatever else). I
couldn't see where the "os_misc" string would be printed in the case of an
error of any sort, so can I assume that all is well with this partition and
dual boot combo and just ignore the '??'? Is it possible to add in another
table entry for type 0x7? Is it advisable? 

Thanks,

-Jr

-- 
John & Jennifer Reynolds  johnjen at reynoldsnet.org        www.reynoldsnet.org
Structural / Physical Design - ICG/PNG SCD     jreynold at sedona.ch.intel.com
Running FreeBSD since 2.1.5-RELEASE.               FreeBSD: The Power to Serve!
"Unix is user friendly, it's just particular about the friends it chooses."


More information about the freebsd-hackers mailing list