I have a 8 GB pen drive with two partitions on it, one of 20 MB and the other of the remaining space (7+ GB). Windows detects only the first partition. How can I mount the second partition?
A complete format is a complete format, so to somehow have data survive this, you'd somehow need to convince the system that those sectors are bad (and remain so - which is harder!), and that should, in theory not get picked up by standard hard drive utilities.
This is not really a trivial task - this is one example with a linux file system, that uses a badblocks file to create a set of clusters marked bad and the equivilent for windows, which uses a low level NTFS editor to edit file system metadata (see the appendixes). In addition some would you notice the larger part of the drive's space is missing. A formatting option that rechecks for bad blocks (a windows non quick format, or a linux format with the right option) would probably catch the fact that they are not actually bad blocks.
In short? If you want a file system that survives a reformat, you need to go for a proper, readonly media option (so it can't be overwritten) with some form of encryption- everything else is insufficiently foolproof
Now if you just wanted to hide a partition from casual view, you could probably use diskpart or some other partition editor such as EaseUS partition tool to set it as hidden. This wouldn't make it impossible to format (you can see that there's a hidden partition from the disk manager snapon), but it would keep the drive from showing up as a drive letter, so would make it a little harder to accidentally format.