Hi,
the following short guide / script can be used to boot the Free Dos ISO image from USB Stick and update your Motherboard Bios.
You have to install Grub2 and Grub4Dos to your USB Stick.
Download and copy the FreeDos Iso image fdbasecd.iso to <YOUR-MOUNTED-USB-DEVICE>/
Copy the Script to <YOUR-MOUNTED-USB-DEVICE>/boot
Copy your Bios files to <YOUR-MOUNTED-USB-DEVICE>/boot/bios
And finaly run the AddBiosFlashFiles.sh to update the FreeDos ISO image with your Bios files.
Optional copy linux iso files to <YOUR-MOUNTED-USB-DEVICE>/boot/iso
and boot it with Grub2.
@ciscosurfer: please add the instructions to your first post
Detailed instructions as comments in the script...
Code:
#!/bin/sh
#
# AddBiosFlashFiles.sh --- The Flash Bios Integrator by Muschl
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 1. Install Grub2 to your USB Stick
# grub-install --no-floppy --root-directory=/mnt/<YOUR-MOUNTED-USB-DEVICE>
#
# 2. Install Grub4Dos to your USB Stick
# wget http://downloads.sourceforge.net/project/grub4dos/GRUB4DOS/grub4dos%200.4.4/grub4dos-0.4.4.zip
# unzip grub4dos-0.4.4.zip
# cp ./grub4dos-0.4.4/* /mnt/<YOUR-MOUNTED-USB-DEVICE>/boot/grub
#
# 3. Change Grub2 Configuration, Add Menue Entry
# vi /mnt/<YOUR-MOUNTED-USB-DEVICE>/boot/grub/grub.cfg
#
# menuentry "Switch to Grub4Dos" {
# linux16 /boot/grub/grub.exe
# }
#
# menuentry "Ubuntu 10.04 Netbook Edition" {
# loopback loop /boot/iso/ubuntu-10.04-netbook-i386.iso
# linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/boot/iso/ubuntu-10.04-netbook-i386.iso noeject noprompt --
#
# 4. Change Grub4Dos Configuration, Add Menue Entry
# vi /mnt/<YOUR-MOUNTED-USB-DEVICE>/boot/grub/menu.lst
#
# title FlashDos (cp Bios files to /boot/bios & run AddBiosFlashFiles.sh)
# find --set-root /fdbasecd.iso
# map /fdbasecd.iso (0xFF)
# map --hook
# root (0xFF)
# kernel /isolinux/data/memdisk
# initrd /isolinux/data/fdboot.img
#
# 5. Download FreeDos
# wget http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.0/fdbasecd.iso
# mv ./fdbasecd.iso /mnt/<YOUR-MOUNTED-USB-DEVICE>
#
# 6. Install ISO Update Script for Flash Bios Files
# mkdir -p /mnt/<YOUR-MOUNTED-USB-DEVICE>/boot/iso
# mkdir -p /mnt/<YOUR-MOUNTED-USB-DEVICE>/boot/bios
# cp ./AddBiosFlashFiles.sh /mnt/<YOUR-MOUNTED-USB-DEVICE>/boot
#
# 7. Create Directory for the Motherboard Bios (like: /boot/bios/msi-k9a)
# 8. Copy your bios flash files into the created Motherboard Bios directory
# 9. Run this Script with sudo to integrate the bios flash files into fdbasecd.iso
#
work=$(pwd)
error=0
rights ()
{
if [ "$(id -u)" != "0" ]; then
echo "!-This script must be run as root or with sudo-!" 1>&2
exit 1
fi
}
clean ()
{
echo "+ Clean up..." 1>&2
umount $work/source
rm -rf $work/target $work/source
}
error ()
{
if [ $? != 0 ]; then
error=1
quit
fi
}
quit ()
{
{
if [ $error != 0 ]; then
echo "!-ERROR-OCCURRED-! Please look into the logfile." 1>&2
fi
}
clean
exit
}
rights
clean
echo "+ Create directorys..." 1>&2
mkdir -p $work/source $work/target
error
echo "+ Mount ISO file..." 1>&2
mount $work/../fdbasecd.iso $work/source -o loop,ro
error
echo "+ Copy ISO content..." 1>&2
cp -R $work/source/* $work/target
error
echo "+ Create Bios directory..." 1>&2
mkdir -p $work/target/bios
error
echo "+ Copy Bios files..." 1>&2
cp -R $work/bios/* $work/target/bios
error
echo "+ Create ISO image..." 1>&2
mkisofs -lrJ -V "FreeDos FlashDos" -no-emul-boot -boot-load-size 4 -b isolinux/isolinux.bin -c isolinux/boot.cat -input-charset utf-8 -o fdbasecd.iso $work/target
error
echo "+ Update Boot Image..." 1>&2
mv -f $work/fdbasecd.iso $work/../
error
quit
Bookmarks