dst <= [usb1 mount-point path]
cp -arf ./diag/*/data/* ${dst}/
sed -e '/\.sys/ s,FREEDOS\\BIN,\FDOS,I' -i ${dst}/CONFIG.SYS
sed -e 's,=[^ ]*\(\\COMMAND.COM\),=\1,gI' -i ${dst}/fdconfig.sys
sed -e 's,\(SET DOSDIR=\).*,\1\\FDOS,I' -e 's,\(%dosdir%\)\\bin,\1,gI' -i ${dst}/fdauto.bat
sed -e "s/%[bram]\{0,3\}DRV%://gI" -e "s,%1:[%\\],,g" -i $(find ${dst} -iname \*.bat)
sed -e "s/bat %DRV%/bat ''/" -i ${dst}/TOOLS/BASE/me.bat
mv ${dst}/AUTOEXEC.BAT ${dst}/diag.bat
dst <= [usb1 mount-point path]
cp -arf ./bios/DOS/* ${dst}/
umount ${dst}/
usbdisk <= [usb disk device]
umount ${usbdisk}*
fdisk -l ${usbdisk} | grep ${usbdisk}1
sectors <= [usb disk p1 size in 512 byte sectors, biggest number]
image="fdos-p910-bios-diag.img"
dd if=${usbdisk} count=${sectors} | pigz - >${image}.gz
This action is not strictly needed for an once-a-time BIOS update process. It is important for having a long-lasting archive of the bootable FreeDOS image. This archive serves also as a forensic-like record of the exact environment used.
image="fdos-p910-bios-diag.img"
pigz -dc ${image}.gz > ${image}; losetup -Pf ${image}
[do whatever you like on loop device 1st partition]
losetup -D $(losetup -l | grep ${image} | cut -d' ' -f1)
WARNING!
It strongly suggested a cold reboot between HW diagnosys and BIOS update.
·NOTICE·
Intel Active Management Technology (AMT) is a hardware-based remote management system that allows IT administrators to monitor, maintain, and repair computers, even when they are powered off or the operating system is unresponsive.
WARNING!
Selecting IDG as a graphic card and disabling it, makes the system lose the monitor output. Moreover, removing the CMOS battery even for a long time, does not reset the BIOS configuration. To recover from that situation, I blindly tried sequences of ESC, F3, F4 and ENTER key pressing and CTRL-ALT-DEL to reboot.
vi /etc/default/grub
GRUB_TERMINAL="serial console"
GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200"
GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200n8 [...omissis...]"
systemctl enable serial-getty@ttyS0.service && update-grub && reboot
These screenshots above show the BIOS remote access by serial and the iAMT access by HTTP via 16992 port.
© 2025, Roberto A. Foglietta <roberto.foglietta@gmail.com>, CC BY-NC-ND 4.0