Translation(s): none


(or "how to flash the BIOS on your Debian box without a floppy drive, or CD-ROM drive or Windows partition or USB boot or anything like that...")

OlivierBerger updated this for more recent grub config.

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 :

In case you use an old grub : ( /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

In case of a newer (in /etc/grub.d/40_custom) :

menuentry "FreeDOS (flash bios)" {
        insmod fat
        set root='(hd0,msdos2)'
        linux16 /memdisk
        initrd16 /fdboot.img
}

and run update-grub afterwards

Download: Memdisk:

I got the newest one out of the ?SysLinux (at the time 3.07) download

although if you apt-get install syslinux you get one too ( /usr/lib/syslinux/memdisk ) which you could use - I found the one on the web was a newer version at the time (Debian was 2.11-0.1 or so)

DOS floppy image:

(I've removed the link to the actual version because it's moved om from when I wrote this) -- For FreeDOS 1.0, download fdboot.img and that should work.

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 5, then type A:> C:

Or :

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 scary!!! :o)

This guy needed a CD-ROM:

(wimp!)