Tag Archives: flashing

Make FreeDOS boot ISO to flash BIOS

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.

Restore Verizon Galaxy S4 to factory firmware

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:

  1. Download Samsung USB drivers from here and install them.
  2. Download ODIN 3.09 here (alternate)
  3. Download PIT file for the S4 here (alternate)
  4. Download full wipe stock firmware here (make sure you’ve backed up anything important) (alternate)
  5. Unzip everything into a common directory
  6. Run ODIN and flash back to factory
    1. 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.
    2. 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.
    3. Check AP and then press the AP button to specify the firmware file (wait a minute for md5 verification)
    4. Press the PIT button and select the PIT file downloaded
    5. Press start. It will take about ten minutes.
  7. Profit!

pass

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

...
<ID:0/003> sbl1.mbn
<ID:0/003> sbl2.mbn
<ID:0/003> sbl3.mbn
Complete(Write) operation failed.
<OSM> All threads completed. (succeeded 0 / failed 1)
<ID:0/003> Removed!!
...

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!