4

I'm running Kubuntu 12.04. I need to update my motherboard BIOS. The Arch Linux Wiki says, "By far the easiest way to make a bootable FreeDOS USB Stick is using unetbootin." So I did that.

Using UNetbootin I succeeded in installing FreeDOS 1.0 (fdboot.img) on the USB stick.

Now, however, I am having a hard time figuring out though how to add files so that I can access them from FreeDos.

The Arch Linux wiki says, "Finally, you may copy everything you want to flash there (BIOS, firmwares, etc)." I did that and then I rebooted into FreeDos. The files were no where to be found. I had a "A:>" prompt with only FreeDos system files. No other drives were available and the files I had copied to the root of the USB stick could not be found.

BTW, my BIOS image is 4.0 MB in size.

5

If the images are too large for a floppy, the same Arch Linux wiki has the instructions.

If your flash image is too large for a floppy, go to the FreeDos bootdisk website, and download the 10Mb hard-disk image. This image is a full disk image, including partitions, so adding your flash utility will be a little trickier:

# modprobe loop
# losetup /dev/loop0 <image-file>
# fdisk -lu /dev/loop0

You can do some simply math now: block size (usually 512) times the start of the first partition. At time of writing, the first partition starts at block 63. This means that the partitions starts at offset 512 * 63 = 32256:

# mount -o offset=32256 /dev/loop0 /mnt

Now you can copy your flash utility onto the filesystem as normal.

Once you're done:

# umount /mnt
# losetup -d /dev/loop0

The image can now be copied to a USB stick for booting, or booted as a memdisk as per normal instructions.

Check that the device is not mounted:

lsblk

Copy the image:

sudo dd if=/location/of/the/img/file.img of=/dev/sdx

Note:

  • Make sure have unmounted the device first.
  • The ‘x’ in “sdx” is different for each plugged device. You might overwrite your hard disk if you mix its device file with that of the flash drive!
  • Make sure that it’s as “sdx” not as “sdxn” where ‘n’ is a number, such as ’1′ and ’2′.
  • 2
    You can also boot directly from the image file with grub. The keyword is "loopback". At the end of this article you can find an example. – jofel Sep 19 '13 at 7:52
  • 1
    Rather than accept my answer, I would prefer to accept @jofel 's answer or a similar one. That approach sounds better to me. :-) – MountainX Sep 19 '13 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.