[ previous ] [ next ] [ threads ]
 
 From:  "Mike Maltese" <mike at pcmedx dot com>
 To:  <m0n0wall at lists dot m0n0 dot ch>
 Cc:  "Juan P. Ruiz" <JP at subnetangel dot com>
 Subject:  Re: [m0n0wall] HOW TO MOUNT THE generic-pc-pb22r566.img in BSD??
 Date:  Sat, 13 Dec 2003 13:56:00 -0800
> 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!!!!

Here you go in 18 easy steps:

gzcat generic-pc-pb22r566.img | dd of=new_mono.img
vnconfig vn0 mw_tmp.img
mount /dev/vn0 /mnt
cp /mnt/mfsroot.gz /tmp
umount /mnt
gunzip /tmp/mfsroot.gz
vnconfig vn1 /tmp/mfsroot
mount /dev/vn1 /mnt
cd /mnt
You'll have the tree here, so edit away....
cd /some/where/else
umount /mnt
gzip -9 /tmp/mfsroot
mount /dev/vn0 /mnt
cp /tmp/mfsroot /mnt
umount /mnt
vnconfig -u vn0 && vnconfig -u vn1
rm /tmp/mfsroot.gz

Now you can transfer your new image (new_mono.img) to your CF card.