First, I've never used Solaris but I believe most of what can be done in Linux also applies to Solaris. Correct me if I'm wrong.
This solution is just a theory I have, never tried it out so if anyone knows if this'll work... otherwise, try this at your own risk
The idea is to first create a file to use as swap space. Then boot from for example a boot diskette and use a partitioning program to delete the swap partition and create a new one. And after that create a filesystem on that partition. Reboot and mount it where it's needed...
1. Create an empty file, say /myswap, with 10MB of size (or whatever you want it to be)
# dd if=/dev/zero of=/myswap bs=1024 count=10000
2. Now create a swap area in the file
# mkswap /myswap
3. Remove any swap partition that is in /etc/fstab and put this line in the file:
/myswap swap swap defaults 0 0
4. Reboot, and boot from a boot diskette with fdisk and mkfs-tools. Start fdisk.
bootdisk# fdisk /dev/hdXX
Delete the swap partition, create a new partition (preferably where the swap partition resided). Create a filesystem, for example:
bootdisk# mkfs.ext2 /dev/hdXX
5. Reboot.. Mount your new fresh partition where it's needed, say /home
Edit /etc/fstab ...
Or is there simply a more simple (correct) way?