Personal tools

Flash Resize Script

From PFSenseDocs

Jump to: navigation, search

Skript: Resize Embedded Flash Image

I have freshly recreate a skript to create 128, 256, 512 or 1gb Images out of the original 64mb embedded one.

NOTE: This Skript works only on FreeBSD, feel free to modify it for Linux.

How to use: Save skript in your homedir as mkflash_new.sh

#> chmod +x mkflash_new.sh

Download latest snapshot from http://www.pfsense.com/~sullrich/ or get the official one. Get the pfSense.img.gz from there and place it in your homedir. Unpack pfSense.img.gz with:

#> gzip -d pfSense.img.gz

Be shure to get root-rights:

#> su

execute skript like: Usage: /home/marcel/mkflash_new.sh {128|252|512|1024} {Originalimage} Example:

#> /home/marcel/mkflash.sh 128 /home/marcel/pfSense.img

Voila, take a look on the new image-file:

#> ls -l /home/marcel/pfSense*
/home/marcel/pfSense-128MB.img.gz
/home/marcel/pfSense-128MB.img.gz.md5
/home/marcel/pfSense.img
/home/marcel/pfSense.img.gz

Have fun,

Marcel

Download the latest mkflash_new.sh from pfSense CVS. http://pfsense.org/cgi-bin/cvsweb.cgi/tools/builder_scripts/mkflash_new.sh

This article is part of the HOWTO series.