[ previous ] [ next ] [ threads ]
 From:  "Lee Sharp" <leesharp at hal dash pc dot org>
 To:  <m0n0wall at lists dot m0n0 dot ch>
 Subject:  Re: [m0n0wall] Installing m0n0 from linux
 Date:  Tue, 29 Nov 2005 19:37:19 -0600
From: "Paul Fournier" <august70 at thefourniers dot net>

> Can someone tell me how I can install the image onto a disk from a running
> linux box.
> I have a running linux box and a drive that will be the going into the
> m0n0wall box, I would like to know
> How from linux I can put the image on the second drive and if I need to 
> use
> fdisk to create a partition and drive type.  TIA

As long as we are all pitching in here... :-) Another good example is from 
Chris Buechler's website for his live installer...

2.3.1. IDE hard drive
Run the command "atacontrol list" and you will get output similar to the 

  su-3.00# atacontrol list
  ATA channel 0:
  Master: ad0 <WDC WD200EB-75CSF0/04.01B04> ATA/ATAPI revision 5
  Slave: ad1 <WDC WD800AB-22CBA0/03.06A03> ATA/ATAPI revision 5
  ATA channel 1:
  Master: acd0 <_NEC CD-RW NR-7800A/10DA> ATA/ATAPI revision 0
  Slave: no device present

The example system has two IDE hard drives, ad0 and ad1, and a CD-RW drive. 
Hard drives will be shown as 'adX', while CD and DVD drives will appear as 
'acdX'. Find the appropriate adX device. If you have more than one IDE drive 
in the machine, make sure you get the right one. To be on the safe side, 
unplug all hard drives other than the desired target drive during this 
process. If you accidentally overwrite a drive you didn't intend to, your 
data is gone.

If you aren't sure which drive is which, see the description of the drive. 
WDC means the drives are Western Digital, and WD200EB and WD800AB are the 
model numbers. If you Google for the model number, you will find the 
capacity (if that isn't already apparent). On these Western Digital drives, 
the 200 in the model number indicates 20 GB, and the 800 indicates 80 GB. 
For the example, we will use ad0, and the standard PC image.

  gzcat /usr/m0n0wall/generic-pc-1.11.img | dd of=/dev/ad0 bs=16k

And you're done. Shut down the system, place the hard drive in the 
destination machine (if it isn't already there) and boot it to start 
m0n0wall. See the official Users Guide for instructions from this point.

2.3.2. SCSI hard drive
Run the command "camcontrol devlist" and this will list all SCSI devices on 
your system, with output similar to the following.

  su-2.05b# camcontrol devlist
  <ADAPTEC RAID-5 320R> at scbus2 target 0 lun 0 (pass0,da0)
  <SEAGATE ST39204LC 0005> at scbus2 target 3 lun 0 (pass1,da1)
  <ESG-SHV SCA HSBP M10 0.05> at scbus2 target 6 lun 0 (pass2)

This particular system has an Adaptec RAID controller with a single RAID 5 
array (da0), and a single Seagate SCSI drive (da1). Note that this 
controller is not actually supported in the default m0n0wall images. You 
would have to build a custom kernel to use it. I don't have any boxes with 
SCSI drives that aren't on a RAID controller, so this is the best I can do 
for the example. Find the appropriate daX device. For the example, we will 
use da0, the RAID array.

  gzcat /root/m0n0wall/generic-pc-1.11.img | dd of=/dev/da0 bs=16k

And you're ready to run m0n0wall from the hard drive selected.