(or flash BIOS without floppy or Windows OR CD-ROM)

This can be done!!! :o)

I have a PC with no floppy & no CD-ROM, it is running Sarge and has a second (empty) hard disk.

I needed to boot in DOS so I could flash the BIOS.

Add this to grub's config ( /boot/grub/menu.lst - I instinctively type vi etc because it's a config file, then realise it's in /boot/grub because it's for booting and needs to be in the boot partition (if that's partitioned)) :

 title           ["FreeDOS"] Image
 root            (hd1,0)
 kernel          /memdisk
 initrd          (hd1,0)/fdos1440.img

Download: Memdisk:

 http://syslinux.zytor.com/memdisk.php
 (I got the newest one out of the SysLinux 3.07 download - http://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-3.07.tar.gz although if you apt-get install syslinux you get one too /usr/lib/syslinux/memdisk which you could use, but that's currently 2.11-0.1 or so)

DOS floppy image:

http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/beta9sr1/fdos1440.img

In Linux use fdisk (or cfdisk as I did) to create a small partition at the start of the empty disk (I did ["8MB"])

    Device Boot      Start         End      Blocks   Id  System
 /dev/hdc1   *           1           1        8001    b  W95 ["FAT32"]

Use dosfstools mkfs.vfat to format the new partition:

 apt-get install dosfstools
 mkfs.vfat /dev/hdc1

mount it:

 mkdir /mnt/hdc1
 mount /dev/hdc1 /mnt/hdc1

copy memdisk and fdos1440.img and the flash program which you download from your hardware vendor into it:

boot, choose ["FreeDOS"] Image, Choose 1:

 1->["FreeDOS"]       (speedup, 386+)

Then choose 1:

 1) ["FreeDOS"] Beta9 ServiceRelease1 [2004-November-30]

Then choose 2:

 2. ["FreeDOS"] Safe Mode  (skip driver loading)

...and you should now find yourself at a nice little A:\>_ prompt :o)

 C:
 dir

then there you are :o) You can now flash your BIOS because you are in native DOS.

I'm wondering if you can use a loopback file within Linux as the root filesystem too, so you don't need a disk partition, now THAT would be scarey!!! :o)

This guy needed a CD-ROM:

(wimp!)