How to flash the Bios using a DOS USB Flash drive
This tutorial might delete your hard-drive or usb-drive data, in case you do not understand how partitions work, avoid this tutorial
Install gparted and run:
sudo apt-get install gparted
sudo gparted
- Select the the USB drive, delete all partitions and click apply.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg89HOD82j9Pt97_GQgcLOFqSV9T5q0RFesCk23XPjhUFz5FMbKKh0dUGZ0sV9GNV6zFYxSTuQpXxjbmqu8XGtFQpKSPIUcI_tIGK7tkBECJD-6bYytfsD5jSs0C64VWc8rVv54P7u8WI_n/s400/gparted_delete_usb_partition.png)
- Create a new FAT16 partition, apply
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUCzspukWsXgTMmTl-EcF-9vnHR7kGpi0SptKlM_AwA8ZiCqVUvBCWyK6-6b4R3pkjrpDXu3QDdNgPr064xrNgcEK64WDtN1Y-xtgmFIWt04PunA40X5t_GquYwjaJhyNxGl8XpEuD6xkx/s400/gparted_create_usb_partition.png)
- Format FAT16 partition, apply
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSg9fQkIQmBPJkQihLW1cvGUdu7nC8M2JtiO0dH4GeFrnEQzgPOZqs5wBEC0HJdtaGuFMoI7cdn3w2Te4ZRaceY42Jn-ecXxb3YrKfvnY00eG2QILuv44p2VFyvjJXgZ0-T70kOMJh9OpA/s400/gparted_format_usb_partition.png)
- Set boot flag, set label to DOS
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEm2dA42W61B7uA4oyTxLx9wey_1FnscD775GqZtG-84FcNKQTzNnKu2KdgyNmaJ_DtJIajFTdqM9gVU-9j8_LqEs9dEZlUqJ2v8py0zu950UNNbGirkUFb3RK6wg-hfPHPZ3OWpEnBS49/s400/gparted_set_boot_flag_usb_partition.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvD4uDvtObfiv7EDNLkPvogG-UUionFoxA6-3gvkhAJ1-VEUEgzICehNUSYgoZNbg9rOqatEufNaILmvXpyWz8kO_ESsBVYW3LLniJ0zGZ2VFGRKI9_iqMJS1Lfhl-D-l2VuFvfEzdSWRF/s400/gparted_set_label_usb_partition.png)
After all this is done, you should have a pen with a DOS partition. The drive I'm using is assigned to sdf1 partition.
sudo apt-get install dosemu
# some usb drives mount on the same drive as the cdrom, so we are changing it to be safe
sudo gedit /etc/dosemu/freedos/autoexec.bat
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFVScDZrusnld6BI5C83ApwmjxlEyKrndpXRNosSKPN5fATG1KsZe4250JpLX_nYMsDEcjzcGNK6imN9NfUZ2CYNWQQVvju8dMZO1eIG3U45VVHJaKRPVUMbWC5g1OMVGC_7HL4mhtGQni/s400/gparted_edit_dosemu_autoexec.png)
Create this file /home/youruser/dosemurc
Put the correct partition used in gparted section:
$_hdimage = "drives/* /dev/sdf1"
Save the file and execute
sudo dosemu -f /home/youruser/dosemurc
# as you can see the flash drive was assign to drive E under DOS
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeGEA_5gfMeyPYsQgSiHq_cudnf9JZwHf6-61Nj8ZEfmPfWADdvDDpNvCj03fLSlj7dAKQIH9_o95nLYrIoe5SGsMQBksSvQJGbhTmS7EOgNe7OKMG5j1h_403lTLT6cC-FUfwI6CCepTE/s400/gparted_dosemu_bootwindow.png)
Type
> Z:
to change to the drive that contains the OS binaries and then type
> sys E:
to copy all needed files to make DOS boot.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYuRnaki0Dj1E0es08yV6YGOms-fsT8T7MAMEKSBGLBwr7uTY_8IkDeXpL3Nqhh7wL2Ak7qCebjBaZ1_ALLXlAfSjjY5BbKDcPEa8jwu2xbpTrgcR4d1TMNjfdBgA0xHX1i_K04figXTcS/s400/gparted_dosemu_sys_usb_drive.png)
You can close dosemu, and remove the USB drive.
Plug it again to see a DOS drive on the desktop.
Now copy all the needed files to flash your bios.
NOTE: I'm not sure, but I think FAT16 should only work for USB drives with 4GB partitions or lower, so if you have a USB drive bigger than 4GB just create a partition with less than 4GB, and leave the rest as free space.
Install gparted and run:
sudo apt-get install gparted
sudo gparted
- Select the the USB drive, delete all partitions and click apply.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg89HOD82j9Pt97_GQgcLOFqSV9T5q0RFesCk23XPjhUFz5FMbKKh0dUGZ0sV9GNV6zFYxSTuQpXxjbmqu8XGtFQpKSPIUcI_tIGK7tkBECJD-6bYytfsD5jSs0C64VWc8rVv54P7u8WI_n/s400/gparted_delete_usb_partition.png)
- Create a new FAT16 partition, apply
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUCzspukWsXgTMmTl-EcF-9vnHR7kGpi0SptKlM_AwA8ZiCqVUvBCWyK6-6b4R3pkjrpDXu3QDdNgPr064xrNgcEK64WDtN1Y-xtgmFIWt04PunA40X5t_GquYwjaJhyNxGl8XpEuD6xkx/s400/gparted_create_usb_partition.png)
- Format FAT16 partition, apply
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSg9fQkIQmBPJkQihLW1cvGUdu7nC8M2JtiO0dH4GeFrnEQzgPOZqs5wBEC0HJdtaGuFMoI7cdn3w2Te4ZRaceY42Jn-ecXxb3YrKfvnY00eG2QILuv44p2VFyvjJXgZ0-T70kOMJh9OpA/s400/gparted_format_usb_partition.png)
- Set boot flag, set label to DOS
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEm2dA42W61B7uA4oyTxLx9wey_1FnscD775GqZtG-84FcNKQTzNnKu2KdgyNmaJ_DtJIajFTdqM9gVU-9j8_LqEs9dEZlUqJ2v8py0zu950UNNbGirkUFb3RK6wg-hfPHPZ3OWpEnBS49/s400/gparted_set_boot_flag_usb_partition.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvD4uDvtObfiv7EDNLkPvogG-UUionFoxA6-3gvkhAJ1-VEUEgzICehNUSYgoZNbg9rOqatEufNaILmvXpyWz8kO_ESsBVYW3LLniJ0zGZ2VFGRKI9_iqMJS1Lfhl-D-l2VuFvfEzdSWRF/s400/gparted_set_label_usb_partition.png)
After all this is done, you should have a pen with a DOS partition. The drive I'm using is assigned to sdf1 partition.
sudo apt-get install dosemu
# some usb drives mount on the same drive as the cdrom, so we are changing it to be safe
sudo gedit /etc/dosemu/freedos/autoexec.bat
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFVScDZrusnld6BI5C83ApwmjxlEyKrndpXRNosSKPN5fATG1KsZe4250JpLX_nYMsDEcjzcGNK6imN9NfUZ2CYNWQQVvju8dMZO1eIG3U45VVHJaKRPVUMbWC5g1OMVGC_7HL4mhtGQni/s400/gparted_edit_dosemu_autoexec.png)
Create this file /home/youruser/dosemurc
Put the correct partition used in gparted section:
$_hdimage = "drives/* /dev/sdf1"
Save the file and execute
sudo dosemu -f /home/youruser/dosemurc
# as you can see the flash drive was assign to drive E under DOS
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeGEA_5gfMeyPYsQgSiHq_cudnf9JZwHf6-61Nj8ZEfmPfWADdvDDpNvCj03fLSlj7dAKQIH9_o95nLYrIoe5SGsMQBksSvQJGbhTmS7EOgNe7OKMG5j1h_403lTLT6cC-FUfwI6CCepTE/s400/gparted_dosemu_bootwindow.png)
Type
> Z:
to change to the drive that contains the OS binaries and then type
> sys E:
to copy all needed files to make DOS boot.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYuRnaki0Dj1E0es08yV6YGOms-fsT8T7MAMEKSBGLBwr7uTY_8IkDeXpL3Nqhh7wL2Ak7qCebjBaZ1_ALLXlAfSjjY5BbKDcPEa8jwu2xbpTrgcR4d1TMNjfdBgA0xHX1i_K04figXTcS/s400/gparted_dosemu_sys_usb_drive.png)
You can close dosemu, and remove the USB drive.
Plug it again to see a DOS drive on the desktop.
Now copy all the needed files to flash your bios.
NOTE: I'm not sure, but I think FAT16 should only work for USB drives with 4GB partitions or lower, so if you have a USB drive bigger than 4GB just create a partition with less than 4GB, and leave the rest as free space.
Try UNetbootin. I posted up brief instructions here.
ReplyDelete