[ previous ] [ next ] [ threads ]
 From:  "a.gatta" <a dot gatta at tiscali dot it>
 To:  m0n0wall at lists dot m0n0 dot ch
 Subject:  [m0n0wall] OT Building custom bootable m0n0wall image
 Date:  Thu, 03 Aug 2006 09:07:51 +0200
Dear list,
I am tryng to build a custom m0n0wall img starting from the custom img 
provided by Peter Allgeyer (http://www.protec-t.de/m0n0wall/downloads/).

I am tryng to add ssh access using the m0n0-instmodules utility.

The script succesfully create the image but no a bootable one.

I edit m0n0-instmodules to see how the new image is created.

The script first create the new mfsroot with all the stuff from the 
module(s) installed and keeps the kernel of the original image.

Then it  puts all these things in the $imageCopy directory.

At this point the script begins to create the new image:

# Create the file system.
       system "dd if=/dev/zero of=$imageBin bs=1k count=$newImageSize";
       $node = mapFile($imageBin, 1);
       #system "disklabel -BR -b $bootDir/boot1 -s $bootDir/boot2 $node 
$label"; <--- I've put a comment since on freebsd 5.x disklabel has 
different options
       system "disklabel -BR $node $label";
       system "newfs -b 8192 -f 1024 /dev/${node}c";
       system "mount /dev/${node}c $mnt";
       system "cd $imageCopy; find . -print | cpio -pdmu --quiet $mnt";
       system "gzip -c -9 $imageBin > $tgtIso";

Finally the new image is ready.

But when I boot the system I get:

can't load 'kernel'
can't load 'kernel.old'

I've tried to take all the steps manually but I got the same results.

I guess this is a freebsd issue (not m0n0wall) but I cannot get througth 

Any idea ?