FreeDOS: Difference between revisions
| Line 39: | Line 39: | ||
}} | }} | ||
=== See Also === | |||
Gentoo has a guide outlining how to create a custom FreeDOS environment imaage | |||
* https://wiki.gentoo.org/wiki/BIOS_Update/en | |||
== PXE Boot FreeDOS == | == PXE Boot FreeDOS == | ||
Revision as of 22:22, 18 May 2017
Creating Custom FreeDOS Image
To create your own custom FreeDOS image file (such as creating your own BIOS update boot USB/PXE image):
- Get FreeDOS
- Get the FreeDOS sys-freedos-linux package
- Create an empty file of the desired size
- Create a msdos filesystem
- Load the FreeDOS boot sector image
- Copy the FreeDOS files into the image
- Copy any additional files to the image
- Unmount
## Download FreeDOS (the floppy image works) and mount it.
# wget fdboot.img
# mount fdboot.img freedos
## Create an file for the image. Eg. 50 MB
# dd if=/dev/null of=freedos.img bs=1024 seek=51200
## Make the MSDOS filesystem (vfat)
# mkfs.msdos freedos.img
## Load the boot sector to the image
# ./sys-freedos.pl --disk=freedos.img
## Mount and copy the FreeDOS system files over
# mount -o loop -t vfat freedos.img /mnt/freedos
# cp -r freedos/* /mnt/freedos
## Copy any other files over such as BIOS updates. Make any other changes
# cp -r bios_update.exe /mnt/freedos
# vi /mnt/freedos/AUTOEXEC.BAT # tweak any other settings as required
# vi /mnt/freedos/CONFIG.SYS # tweak any other settings as required
## Unmount and deploy.
# umount /mnt/freedos
See Also
Gentoo has a guide outlining how to create a custom FreeDOS environment imaage
PXE Boot FreeDOS
With a custom FreeDOS image created as outlined above, you should be able to PXE boot the image using memdisk.
Assuming that you have all the PXE infrastructure set up (DHCP + TFTP + /tftpboot/pxelinux.cfg), add an entry in the pxelinux.cfg directory containing:
LABEL Dell-BIOS-Update
MENU LABEL Dell-BIOS-Update
kernel /images/Dell-BiosUpdate/memdisk
append initrd=/images/Dell-BiosUpdate/freedos-bios.img
Use the memdisk binary from syslinux.
Dell BIOS updates seem to work only when himem and the emm386 are not loaded. With them loaded, the BIOS update will fail.
My settings for the following files are:
CONFIG.SYS
DOS=HIGH
rem ?DEVICE=\FDOS\HIMEM.EXE /VERBOSE
rem ?DEVICE=\FDOS\EMM386.EXE /VERBOSE
rem ?DEVICE=\UMBPCI.SYS
FILES=20
BUFFERS=20
!rem SHELL=A:\COMMAND.COM /E:512 /MSG /P
SHELLHIGH=\COMMAND.COM /E:256 /P
AUTOEXEC.BAT
@ECHO OFF
CLS
ECHO Welcome to FreeDOS (http://www.freedos.org)!
O9020A19.exe
iPXE Boot
If you do not have a DHCP server set up to do PXE boot (ie, next-server and filename isn't set), you could use iPXE instead to boot FreeDOS via network.
I was able to boot FreeDOS using the following iPXE embedded script:
:retry_dhcp
dhcp
The imgargs is important as it won't boot otherwise.