{"id":81,"date":"2009-08-11T11:01:00","date_gmt":"2009-08-11T01:01:00","guid":{"rendered":"https:\/\/www.serenux.com\/?p=81"},"modified":"2021-01-14T11:09:56","modified_gmt":"2021-01-14T01:09:56","slug":"howto-flash-your-bios-without-a-boot-floppy-disk-using-ubuntu","status":"publish","type":"post","link":"https:\/\/www.serenux.com\/index.php\/2009\/08\/11\/howto-flash-your-bios-without-a-boot-floppy-disk-using-ubuntu\/","title":{"rendered":"HowTo: Flash your BIOS without a boot floppy disk using Ubuntu"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">All current \u201cIBM-Compatible\u201d PC\u2019s use a Basic Input\/Output System also known as a BIOS. It\u2019s a program that tells the PC how to start up when you switch it on, raises any critical faults with the system and then passes control to an operating system on a boot medium.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As time goes on, like any program, bugs are found, improvements are made, and the manufacturer of your PC\u2019s motherboard will provide updates to the BIOS, usually supplied as a small downloadable file. Normally it is usually intended that you reboot your PC onto a DOS-compatible boot floppy disk and run the BIOS update program to install the new BIOS firmware. These days this process has been a bit simplified what with Windows users generally being able to do this from within Windows itself and even more recently, from the BIOS itself or even though starting the system on a FAT16-formatted USB stick.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is all well and good, but what if you have an older system that cannot be flashed from Windows? What if you don\u2019t even have Windows? What about a system that still relies on booting from a floppy disk to flash the BIOS? I don\u2019t know about you, but I highly doubt any of the remaining floppy disks in my garage work anymore, and besides that, there\u2019s a good chance that the floppy drive itself on older PC\u2019s probably doesn\u2019t work anymore.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So what can you do?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Well, we can utilise a floppy disk&nbsp;<em>image<\/em>&nbsp;that ultimately boots from your hard-drive, but acts and operates exactly like a DOS floppy disk would.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Pre-requisites:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>A boot floppy disk image. You can grab from from the&nbsp;<a href=\"https:\/\/web.archive.org\/web\/20160311191119\/http:\/\/www.fdos.org\/bootdisks\" target=\"_blank\" rel=\"noreferrer noopener\">FreeDOS<\/a>&nbsp;project. FreeDOS is a compatible open source re-invention of Microsoft or IBM DOS. For our needs, we will use the 1.44MB OEM floppy which has just enough on it to boot the disk and that\u2019s it. The filename is called FDOEM.144.gz.<\/li><li>Some free space under \/boot. This won\u2019t be a concern for most users, but some people, including myself, choose to partition off space for \/boot rather than include it as part of the root filesystem partition. You will need about 2MB of space.<\/li><li>Some floppy disk image manipulation tools. We will be using MTools for the task, available in the Ubuntu repositories.<\/li><li>The new BIOS file for your motherboard.<\/li><li>The DOS-based BIOS flashing program executable.<\/li><li>OPTIONAL: Wine may be required if the BIOS file is provided as a self-extracting Windows executable. In most cases, the flashing program is usually included in the same archive.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">These instructions were written with Ubuntu Jaunty in mind but should work on any version of Ubuntu.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Process:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>First up, download the FDOEM.144.gz file from the\u00a0<a rel=\"noreferrer noopener\" href=\"https:\/\/web.archive.org\/web\/20160311191119\/http:\/\/www.fdos.org\/bootdisks\" target=\"_blank\">FreeDOS<\/a>\u00a0website.<br><\/li><li>Extract the image file from the archive either using Ubuntu\u2019s archive manager, or at a terminal use the command:<br><br><code>$ zcat FDOEM.144.gz >dosfloppy.img<\/code><br><\/li><li>Now we need to install some tools so we can manipulate the image (note that you may already have these tools installed):<br><br><code>$ sudo apt-get install syslinux mtools<\/code><br><\/li><li>Extract your BIOS file from the archive you downloaded from your motherboard\u2019s manufacturer. If the file was called \u201cbios123.zip\u201d, unzip it with the following command:<br><br><code>$ unzip bios123.zip<\/code><br><br><em>NOTE: If your BIOS\u00a0file is a self-extracting executable (eg: \u201cbios123.exe\u201d, then install WINE with:<\/em><br><br><code>$ sudo apt-get install wine<\/code><br><br>\u2026and then execute the Windows binary via Wine with:<br><br><code>$ wine bios123.exe<\/code><br><br>\u2026then let the self-extractor extract the files. Retrieve the BIOS file (and if available, the BIOS flashing program executable) from what was extracted.\u00a0<br><\/li><li>Let\u2019s copy the BIOS file and the flashing program onto the boot floppy image. In this example, the BIOS file is called \u201cbios123.bin\u201d and the flashing program is called \u201cflash.exe\u201d:<br><br><code>$ mcopy -i dosfloppy.img bios123.bin flash.exe ::<\/code><br><\/li><li>Now let\u2019s list the contents of the floppy image to confirm that the files were copied:<br><br><code>$ mdir -i dosfloppy.img ::<br>Volume in drive : is FREEDOS<br>\u00a0\u00a0 \u00a0 Volume Serial Number is 188F-6C25<br> Directory for ::\/<br> COMMAND\u00a0 COM\u00a0\u00a0\u00a0\u00a0 66090 2003-12-10\u00a0\u00a0 7:49 sys\u00a0\u00a0\u00a0\u00a0\u00a0 com\u00a0\u00a0\u00a0\u00a0\u00a0 9221 2005-07-18\u00a0 19:58<br> AUTOEXEC BAT\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 67 2004-02-22\u00a0 10:16 CONFIG\u00a0\u00a0 SYS\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 52 2004-02-22\u00a0 10:17<br> README\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1486 2004-02-22\u00a0 12:50 BIOS123\u00a0 BIN \u00a0 1048576 2009-08-11\u00a0 22:34<br> FLASH \u00a0\u00a0 EXE\u00a0\u00a0\u00a0\u00a0 26351 2009-08-11\u00a0 22:34<br> 7 files\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1 151 843 bytes 258 048 bytes free<br> $<\/code><br><\/li><li>The floppy disk is ready! Now to set it up so we can boot it.<br><br><code>$ sudo mkdir \/boot\/biosflash<br>$ sudo cp dosfloppy.img \/usr\/lib\/syslinux\/memdisk \/boot\/biosflash\/<\/code><br><\/li><li>Now we need to make an entry in the GRUB boot menu for it so we can choose it as a boot option when we start the PC. First open the GRUB menu.lst file in your favourite editor:<br><br><code>$ sudo gedit \/boot\/grub\/menu.lst<\/code><br><\/li><li>Scroll right down to the very bottom of the file and add the following lines:<br><br><code>title Boot floppy for BIOS flashing<br>kernel \/boot\/biosflash\/memdisk<br>initrd \/boot\/biosflash\/dosfloppy.img boot<\/code><br><br><em>NOTE: If your \/boot directory is on its own partition (like how I have it on my own system), you need to omit the \u201c\/boot\u201d bit from all lines above, thus:<\/em><br><br><code>title Boot floppy for BIOS flashing<br>kernel \/biosflash\/memdisk initrd \/biosflash\/dosfloppy.img<br>boot<\/code><br><\/li><li>Save your changes and quit the editor.<br><\/li><li>You are now ready to boot! Shutdown and restart your system. When your GRUB menu appears, you will see an entry called \u201cBIOS floppy for BIOS flashing\u201d at the bottom of the menu. Select it and you should very quickly be presented with the familiar A:\\> prompt. You can now launch your BIOS flashing program and flash your BIOS!<br><\/li><li>When you are done with the floppy environment, just press CTRL + ALT + DEL to reset your PC (or after a BIOS flash you should ideally physically switch off and then back on instead).<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">You\u2019re done!&nbsp;<img decoding=\"async\" src=\"https:\/\/web.archive.org\/web\/20160311191119im_\/http:\/\/www.serenux.com\/wp-content\/themes\/grey-opaque\/images\/smilies\/icon_smile.gif\" alt=\"Smilie: :)\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>All current \u201cIBM-Compatible\u201d PC\u2019s use a Basic Input\/Output System also known as a BIOS. It\u2019s a program that tells the PC how to start up when you switch it on, raises any critical faults with the system and then passes control to an operating system on a boot medium. As time goes on, like any [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-81","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/posts\/81","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/comments?post=81"}],"version-history":[{"count":1,"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/posts\/81\/revisions"}],"predecessor-version":[{"id":82,"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/posts\/81\/revisions\/82"}],"wp:attachment":[{"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/media?parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/categories?post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/tags?post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}