Howtos / Articles

Write m0n0wall image to CF card in Windows

This guide will outline how to write the m0n0wall embedded image to a compact flash card in windows.

In this ‘how to’, I will be using the embedded-1.33.img image.

Download the image file that suits your requirements from http://m0n0.ch/wall/

Download the physdiskwrite application from http://m0n0.ch/wall/physdiskwrite.php and extract it to the same folder that your m0n0wall image is saved in.

Open a command prompt window.

(Note: if you are using Windows Vista/Windows 7/Windows 2008, make sure you run the command prompt ‘as administrator’, otherwise the drives will not be available to write the image to.)

Change directory to the location you extracted the physdiskwrite.exe application to, and run the physdiskwrite.exe application with no parameters to see what options are available.

L:\>physdiskwrite.exe

physdiskwrite v0.5.2 by Manuel Kasper 

Usage: physdiskwrite [-u] [-d driveno] 

           -u    remove 2 GB restriction (WARNING!)
           -d    specify drive number (0..n) (no confirmation prompts!)

Make sure your compact flash card is now connected to your computer (via card reader or another method). Keep in mind that this will overwrite any data on the CF card, so make sure you have a backup of any files you may need later.

Run physdiskwrite.exe with the m0n0wall image file as the only parameter. This will then ask you to select which drive you want the image written to.

L:\>physdiskwrite.exe embedded-1.33.img

physdiskwrite v0.5.2 by Manuel Kasper 

Searching for physical drives...

Information for \\.\PhysicalDrive0:
   Windows:       cyl: 1938021
                  tpc: 16
                  spt: 63
   C/H/S:         16383/16/63
   Model:         WDC WD10EAVS-00A4A1
   Serial number:      WD-WCAU44225522
   Firmware rev.: 01.01A01

Information for \\.\PhysicalDrive1:
DeviceIoControl() failed on \\.\PhysicalDrive1.

Information for \\.\PhysicalDrive2:
   Windows:       cyl: 3
                  tpc: 255
                  spt: 63

Information for \\.\PhysicalDrive3:
DeviceIoControl() failed on \\.\PhysicalDrive3.

Information for \\.\PhysicalDrive4:
DeviceIoControl() failed on \\.\PhysicalDrive4.

Which disk do you want to write? (0..2)

In this example, the compact flash card is PhysicalDrive2, so enter in ’2′ and hit enter. Hit ‘y’ and enter to confirm the drive selection.

Which disk do you want to write? (0..2) 2
About to overwrite the contents of disk 2 with new data. Proceed? (y/n) y
Found signed compressed image file
10485760/10485760 bytes written in total

L:\>

It may take a minute to write the image to the compact flash card.

If you get any errors while writing, make sure nothing is accessing the CF card at the time of writing (eg. explorer windows). If unsure, take the CF card out the reader, insert it back in, and try to write the image again.

Once the program has finished, you can take out the CF card from the PC and insert it into its intended device and set up m0n0wall.



Share this howto article!
  • Facebook
  • Twitter
  • Reddit
  • email

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>