boot0: Unable to boot DOS slices/partitions

Jeremy Chadwick koitsu at FreeBSD.org
Mon Nov 10 07:17:34 PST 2008


I've been working for the past 2-3 days on a Wiki entry describing how
to get two versions or architecture types of FreeBSD, and MS-DOS, all on
a USB stick.  The intended goal is to allow an administrator to install
FreeBSD i386 or FreeBSD amd64 from a USB stick, while also providing the
ability to boot DOS for BIOS upgrades and so forth.

Please note the below is a complete mess, due to the fact that I have
spent the past 9 hours editing things off and on.

http://wiki.freebsd.org/JeremyChadwick/Installing_from_USB_flash_drive

So far, I've had great success with the FreeBSD part of it -- no issues
or oddities.  The problem I'm running into is the DOS part.

I've been completely unable to get boot0 to boot MS-DOS 6.22 (on a FAT16
slice), MS-DOS 7.10 (on a FAT16 or FAT32 slice), or FreeDOS 1.0 (on a
FAT16 or FAT32 slice).  With MS-DOS, COMMAND.COM, IO.SYS, and MSDOS.SYS
are all copied on to the slice.  With FreeDOS, COMMAND.COM and
KERNEL.SYS are all copied on to the slice.

boot0 shows "F1 DOS" as a choice, but depending upon where I formatted
the slice (on Windows XP or via newfs_msdos), I get one of the following
two error messages from the bootstraps installed on /dev/da0s1:

Non-system disk
Disk error

I've even gone so far to try using FAT32LBA.BIN from the FreeDOS
project as the bootstrap, e.g. newfs_msdos -B FAT32LBA.BIN /dev/da0s1
which just causes a hard-lock.

Enabling packet mode in boot0cfg makes no difference.

What *does* work, however, is using FAT32LBA.BIN and SYSLINUX together
as the actual boot loader itself (e.g. at sector 0).  I can successfully
boot FreeDOS using this method.

I'd advocate using SYSLINUX entirely, but it doesn't appear possible to
get SYSLINUX to boot a slice/partition, only refer to actual files on
the FAT16/FAT32 partition.

I'd try GRUB, except that all of my BSD boxes at home are amd64 (sans
the one I'm trying to boot the USB stick on, but that doesn't have
FreeBSD installed on it), and sysutils/grub only builds on i386.

Slice layout:

DISK Geometry:  977 cyls/255 heads/63 sectors = 15695505 sectors (7663MB)

Offset       Size(KB)        End     Name  PType       Desc  Subtype    Flags

         0         31         62        -     12     unused        0
        63    5759271   11518604    da0s1      4 fat (32-bit,LBA)       12      A
  11518605    1044225   13607054    da0s2      8    freebsd      165
  13607055    1044225   15695504    da0s3      8    freebsd      165
  15695505        183   15695870        -     12     unused        0

I don't have boot0cfg output immediately on hand, but can get it if need
be.

Ideas?

-- 
| Jeremy Chadwick                                jdc at parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |



More information about the freebsd-fs mailing list