I needed to flash the BIOS of one of my old server motherboards and to my dismay found the only way to do so was via DOS boot image. It was not straightforward so I thought I’d write it down. Thanks to pingtool & tummy.com for the information I needed to pull it off.
First, obtain a copy of FreeDOS ISO and extract it to a directory
- mount -o loop <freedosISO.iso> <mount directory>
- rsync -aP <mount directory> <directory you want files to copy to>
Next, copy the necessary flash utilities and firmware files to that same directory as above.
Lastly, use genisoimage to create a new ISO image based on the above folder. Modify -o output to wherever you want the ISO to go.
sudo apt install genisoimage
cd <folder you copied your files to>
mkisofs -o /tmp/freedos_biosupdate.iso -q -l -N \
-boot-info-table -iso-level 4 -no-emul-boot \
-b isolinux/isolinux.bin \
-publisher "FreeDOS - www.freedos.org" \
-A "FreeDOS beta9 Distribution" -V FDOS_BETA9 -v .
From here you can take the ISO and mount / burn it as needed. It will boot into FreeDOS. Tell it to go to a shell and away you go.
My new job has a BYOD policy, which means I can use my personal phone for work use. Before I ascribed to their policy I wanted to make sure my phone was in pristine condition. I wrote earlier about how I rooted and flashed a custom ROM for my phone. This will explain how to un-do all of that and restore it to pristine factory condition.
I got my information from here, which is a great guide on how to do this. I will mirror the files mentioned there as it’s well known that XDA mirrors come and go.
Here is the rundown:
- Download Samsung USB drivers from here and install them.
- Download ODIN 3.09 here (alternate)
- Download PIT file for the S4 here (alternate)
- Download full wipe stock firmware here (make sure you’ve backed up anything important) (alternate)
- Unzip everything into a common directory
- Run ODIN and flash back to factory
- Put your phone in ODIN mode by turning the phone off, then pressing and holding power and volume down at the same time. A message will appear, press volume up to confirm and enter ODIN mode.
- Plug your phone into USB and run ODIN on your PC. Make sure the odin log says Added!! If it doesn’t, drivers are not installed properly.
- Check AP and then press the AP button to specify the firmware file (wait a minute for md5 verification)
- Press the PIT button and select the PIT file downloaded
- Press start. It will take about ten minutes.
When I first tried to do this I soft bricked my phone. I was very confused because everything seemed to be going fine and then suddenly FAIL
Complete(Write) operation failed.
<OSM> All threads completed. (succeeded 0 / failed 1)
I scratched my head for quite some time before I came across came across this post suggesting it’s a bad USB cable / port. Sure enough, I switched out the cable I was using with the official cable the phone came with, and it worked beautifully!