[ previous ] [ next ] [ threads ]
 
 From:  Roberto Zilli <r dot zilli at ingredium dot it>
 To:  "Juan P. Ruiz" <JP at subnetangel dot com>
 Cc:  m0n0wall at lists dot m0n0 dot ch
 Subject:  Re: [m0n0wall] HOW TO MOUNT THE generic-pc-pb22r566.img in BSD??
 Date:  Sat, 13 Dec 2003 22:54:20 +0100
Hi Juan,

ok, first of all create these 2 directory
/usr/local/m0n0/
/usr/local/m0n0/work

create the first file and the second file into /usr/local/m0n0:

#extract.sh
#!/bin/sh

imagefile=`find . -iname net*`
echo "I've found " $imagefile " image file."
mv $imagefile $imagefile.gz
echo "Unzip l'immagine..." $imagefile
gunzip -d $imagefile
echo "Creating virtual device..."
vnconfig -s labels -c vn0 ./$imagefile
mount /dev/vn0c /mnt
echo "Copying mfsroot.gz..."
cp /mnt/mfsroot.gz /usr/local/m0n0/work
cd /usr/local/m0n0/work/
umount /mnt
vnconfig -u vn0
echo "Unzip mfsroot.gz"
gunzip -d mfsroot.gz
echo "Creating virtual file system..."
vnconfig -s labels -c vn0 ./mfsroot
echo "Mounting virtual filesystem..."
mount /dev/vn0c /mnt
cd /mnt
echo "Now you can modify...."

modify with chmod +x extract.sh

Create the second file compress.sh:

#compress.sh
#!/bin/sh
imagefile=`find . -iname net*`
umount /mnt
vnconfig -u vn0
cd work
echo "Compressing the filesystem..."
gzip -9 mfsroot
cd ..
vnconfig -s labels -c vn0 ./$imagefile
mount /dev/vn0c /mnt
echo "Copying msfroot.gz"
mv work/mfsroot.gz /mnt
umount /mnt
vnconfig -u vn0
echo "Compressing image file " $imagefile
gzip -9 $imagefile
mv $imagefile.gz $imagefile
echo "Still programming flash with " $imagefile
gzcat $imagefile | dd of=/dev/ad8 bs=16k
pccardc power 0 0
echo "Flash Card OK!"

chmod +x extract.sh
chmod +x compress.sh

Now move or download the img file into
/usr/local/m0n0

Run the extract.sh
cd to /mnt
Here you have the complete m0n0wall file system
When you have finished...
run compress.sh

WARNING !!! Be shure that your Flash Card is on AD8!!! Put on the right 
name!!!
Enjoy
zr
 

Juan P. Ruiz wrote:

> 
>
>
>Sorry guys sent it as HTML
>
>Hello guys,
>
> 
>
>Manuel first of all WHAT A KICK AS FIREWALL all the props to you. Ok now
>here is my question.
>
> 
>
>I am trying to mount the generic-pc-pb22r566.img file in FreeBSD 4.9 but
>I really don't know how?? Im pretty new a this but, also I tried using
>the hackers guide but a lot of it is very helpful but im still having
>issues basically I want to mount it so I can then extract the MFSROOT.GZ
>files and edit them specifically the www directory jus changing the
>colors in the gui that's all but I don't want o change nothing else then
>I want to recreate the bin file and GZ it again and then place it back
>in to generic-pc-pb22r566.img so that I can put it on the compact Flash
>card. PLEASE HELP!!!!
>
> 
>
>Thank you
>
> 
>
> 
>
>SUBNETANGEL
>
> 
>
>jp at subnetangel dot com
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: m0n0wall dash unsubscribe at lists dot m0n0 dot ch
>For additional commands, e-mail: m0n0wall dash help at lists dot m0n0 dot ch
>
>  
>