Discussion:
Howto: Prepare USB key with FreeDOS using FreeBSD
O. Hartmann
2007-10-12 16:35:08 UTC
Permalink
Hello.

Well, I have a bunch of TYAN S2925B based boxes, all without floppy
drives. For BIOS flash preparation I need an installation media and due
to the fact I do not have a Windows XP box or FreeDOS box I need my
laptop for creation of a bootable USB key media with the appropriate
BIOS flash images and flashing tools.
It seems to be a desaster. Every Wiki I visited looking for the subject
referes to Gentoo/FreeDOS or highly complicated voodoo sessions
installing first some files on floppy drive and the creating a bootable
USB key ... blabla.
Sorry, but I do not have FreeDOS running nor do I have Linux/Gentoo or
Windows XP, I run FreeBSD on all of my machines. But in the age of
legacy free computers, were floppy drives seems to be not essential
anymore I run into massif problems having a legacy free server from TYAN
without the ability taking any BIOS images from an USB key :-( The
problem is I picked up some memory issues which have been solved with
one of the newer BIOS images so I desperately need an update solution.

Does anyone do have an idea?

Thanks a lot in advance,
Oliver
CyberLeo Kitsana
2007-10-13 13:43:29 UTC
Permalink
Post by O. Hartmann
Does anyone do have an idea?
Ah, the disproportionate march of progress...

The easy way out would be to procure a USB floppy drive. If the machines
support booting from a USB stick, they can handle booting a USB floppy
in legacy mode.

If you're really bent on using a USB thumbdrive, you're in for quite a
ride. Due to the way DOS is designed, it needs a pretty nonstandard
(nowadays) method of booting.

You could 'format' the thumbdrive with FAT12 or FAT16 and put the files
on there, but you would need to find a way to do so from within DOS
itself, as neither Linux nor FreeBSD can create FAT filesystems that
boot DOS.

Your best bet is to use an already existing bootable DOS floppy image,
loading the files onto there (using mdconfig to mount it), and using
GRUB (or another modern boot loader) and memdisk (part of syslinux) to
boot the floppy image off the thumbdrive. This worked for me when
building a thumbdrive capable of booting Norton Ghost, PM8, FreeDOS, and
a few other DOS-only utility diskettes. I believe it's also the method
used by the Ultimate Boot CD.

Good luck!
--
Fuzzy love,
-CyberLeo
Technical Administrator
CyberLeo.Net Webhosting
http://www.CyberLeo.Net
<***@CyberLeo.Net>

Furry Peace! - http://wwww.fur.com/peace/
Tijl Coosemans
2007-10-13 14:40:25 UTC
Permalink
If the BIOS can boot from USB it's as easy as using dd.

dd if=freedos-floppy.img of=/dev/daX
mount -t msdosfs /dev/daX /mnt
(Add extra files. You only have about 1.5Mb though.)
(Reboot with USB key plugged. You may have to alter the boot device
ordering in the BIOS first.)

Afterwards you can restore the USB key to its full capacity using
fdisk(8) and newfs(8) or newfs_msdos(8).
Boris Samorodov
2007-10-13 20:27:41 UTC
Permalink
Post by O. Hartmann
Well, I have a bunch of TYAN S2925B based boxes, all without floppy
drives. For BIOS flash preparation I need an installation media and
due to the fact I do not have a Windows XP box or FreeDOS box I need
my laptop for creation of a bootable USB key media with the
appropriate BIOS flash images and flashing tools.
It seems to be a desaster. Every Wiki I visited looking for the
subject referes to Gentoo/FreeDOS or highly complicated voodoo
sessions installing first some files on floppy drive and the creating
a bootable USB key ... blabla.
Sorry, but I do not have FreeDOS running nor do I have Linux/Gentoo or
Windows XP, I run FreeBSD on all of my machines. But in the age of
legacy free computers, were floppy drives seems to be not essential
anymore I run into massif problems having a legacy free server from
TYAN without the ability taking any BIOS images from an USB key :-(
The problem is I picked up some memory issues which have been solved
with one of the newer BIOS images so I desperately need an update
solution.
Does anyone do have an idea?
It is not an answer to your question. It's just how I do
it. Limitation: I use only PXE-capable cards.

1. Set up a dhcp server. In my case all servers are located at one
hardware server.
2. Set up a tftp server.
3. Use pxelinux [1] to boot the needed binary.

1. Dhcp config (partial):
-----
host temp1 {
hardware ethernet <MAC-address>;
fixed-address <ip-address>;
filename "pxelinux.0";
server-name "booting.domain.com";
next-server booting.domain.com;
option host-name "temp1.domain.com";
}
-----


[1] http://syslinux.zytor.com/pxe.php


WBR
--
bsam
Boris Samorodov
2007-10-13 21:10:17 UTC
Permalink
Sorry for the first email, it was sent by an accident.

WBR
--
bsam
Boris Samorodov
2007-10-13 21:07:31 UTC
Permalink
Post by O. Hartmann
Well, I have a bunch of TYAN S2925B based boxes, all without floppy
drives. For BIOS flash preparation I need an installation media and
due to the fact I do not have a Windows XP box or FreeDOS box I need
my laptop for creation of a bootable USB key media with the
appropriate BIOS flash images and flashing tools.
It seems to be a desaster. Every Wiki I visited looking for the
subject referes to Gentoo/FreeDOS or highly complicated voodoo
sessions installing first some files on floppy drive and the creating
a bootable USB key ... blabla.
Sorry, but I do not have FreeDOS running nor do I have Linux/Gentoo or
Windows XP, I run FreeBSD on all of my machines. But in the age of
legacy free computers, were floppy drives seems to be not essential
anymore I run into massif problems having a legacy free server from
TYAN without the ability taking any BIOS images from an USB key :-(
The problem is I picked up some memory issues which have been solved
with one of the newer BIOS images so I desperately need an update
solution.
Does anyone do have an idea?
It is not an answer to your question. It's just how I do
it.

1. Set up a dhcp server. In my case all servers are located at one
hardware server.
2. Set up a tftp server.
3. Use pxelinux [1] to boot the needed binary.

1. Dhcp config (partial):
-----
host temp1 {
hardware ethernet <MAC-address>;
fixed-address <ip-address>;
filename "pxelinux.0";
server-name "booting.domain.com";
next-server booting.domain.com;
option host-name "temp1.domain.com";
}
-----

2. /tftpboot directory contains

. a directory "pxelinux.cfg" with the config file "default"
(partially):
-----
default memtest
prompt 5
timeout 30

label memtest
kernel memtest86+-1.70

label 3ware
kernel memdisk
append initrd=3WARE-FLASH-9.4.0.1.DOS

label ep
kernel memdisk
append initrd=EP-9HEAI.DOS

label freebsd7
kernel pxeboot.0
-----

. file "pxelinux.0" [1];
. file "memdisk" [2] needed to load floppies with DOS images;
. file "memtest86+-1.70" is an image of memtest floppy, good for
testing new hardware;
. file "3WARE-FLASH-9.4.0.1.DOS" is an image of DOS floppy with 3WARE
updates;
. file "EP-9HEAI.DOS" is an image of DOS floppy with flasher for the
EP-9HEAI motherboard;
. file "pxeboot.0" (renamed from pxeboot since pxelinux need it) is a
real pxeboot to boot FreeBSD.

One can choose what to boot while PXE-booting (use a label from the
config file).

I use one of those free DOS available at internet. To create the
needed image:
-----
# mdconfig -a -t vnode -f <floppy_dos_image> -u 0
# mount -t msdosfs /dev/md0 /mnt
-----

Then copy the needed files to /mnt. Don't forget to do:
-----
# umount /mnt
# mdconfig -d -u 0
-----

That's it, here is a floppy image one can boot via PXE.

Limitations:
1. I use only PXE-capable network cards.
2. An old flash image cannot be saved.


[1] http://syslinux.zytor.com/pxe.php
[2] http://syslinux.zytor.com/memdisk.php


WBR and HTH
--
bsam
Loading...